Discussion:
erase *.tmp also lists *.tmpl files - how to avoid
(too old to reply)
Jonathan de Boyne Pollard
2010-03-15 04:39:20 UTC
Permalink
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<blockquote cite="mid:7vGdnXjsP-d2JQHWnZ2dnUVZ_r-***@westnet.com.au"
type="cite">
<blockquote>
<pre>erase *.tmp</pre>
</blockquote>
<p>deletes both files. How can I avoid this?
</p>
</blockquote>
<p><a
href="http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/win32-cli-search-wildcard-matching.html">Use
a different command interpreter, turn off short filenames</a>, or don't
use wildcards with the <code>ERASE</code> command.</p>
</body>
</html>
Stefan Kanthak
2010-03-15 15:10:44 UTC
Permalink
"Jonathan de Boyne Pollard" <J.deBoynePollard-***@NTLWorld.COM> wrote:

[ gibberish HTML ]

Crossposts over DIFFERENT hierarchies are EVIL!

Stop posting HTML! Use properly formatted text/plain instead, as
recommended in <http://www.ietf.org/rfc/rfc1855.txt>!

And correct your Web page: the registry setting Win95TruncatedExtensions
(which causes the trouble here) was introduced with NT4!

Stefan
Jonathan de Boyne Pollard
2010-03-15 20:11:21 UTC
Permalink
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<blockquote
cite="mid:4b9e4dfc$0$6978$***@newsspool4.arcor-online.net"
type="cite">
<p>Crossposts over DIFFERENT hierarchies are EVIL!</p>
</blockquote>
<p>Codswallop.&nbsp; Cross-posting is a good thing, and there's nothing
inherently wrong about cross-posting to newsgroups in different
hierarchies.&nbsp; Indeed, the reasons <em>for not</em> cross-posting to,
say, every <code>comp.os.msdos.*</code> newsgroup are reasons <em>for</em>
cross-posting to newsgroups in different hierarchies where Win32
command interpreters and their search wildcards are discussed.<br>
</p>
<blockquote
cite="mid:4b9e4dfc$0$6978$***@newsspool4.arcor-online.net"
type="cite">
<p>Stop posting HTML! Use properly formatted text/plain instead, as
recommended in RFC 1855!</p>
</blockquote>
<p>You clearly haven't read that RFC.&nbsp; Here's a hint, kiddo:&nbsp; The
reason that you won't find anything in the RFC supporting your daft
notion is that it's a daft notion, based upon folk wisdom that has
passed through a Chinese Whispers effect.&nbsp; The actual, true, division
in Usenet is between <em>text</em> and <em>binaries</em>, wherein
hyper<em>text</em> falls very much on the text side.&nbsp; It is <em>binaries</em>
that one shouldn't post to text newsgroups, not hyper<em>text</em>.&nbsp;
Binaries are MIME body part types like <code>audio/*</code>, <code>video/*</code>,
and <code>image/*</code>.&nbsp; The <code>text/*</code> body part types
are, as the designation states, text.<br>
</p>
<blockquote
cite="mid:4b9e4dfc$0$6978$***@newsspool4.arcor-online.net"
type="cite">
<p>And correct your Web page: the registry setting
Win95TruncatedExtensions (which causes the trouble here) was introduced
with NT4</p>
</blockquote>
<p>Clearly, since you obviously read it to follow the hyperlink in it,
that message wasn't the "gibberish" that you are trying to pretend it
to have been. It's always amusing when the people post responses such
as thise where they undermine themselves in their very posts. The
all-time favourite is foolishly posting "Usenet is ASCII." (It isn't,
of course, and this is <a
href="http://faqs.org./faqs/usenet/what-is/part1/">a 25-year-old FAQ
answer</a>.) in a non-ASCII character set, with gobsmackingly
clue-deficient "<a
href="news:///hm49g5$g97$***@news.eternal-september.org">Usenet is
American</a>." silliness coming a close second, but you're doing fairly
well with this runner up.<br>
</p>
<p>Microsoft, on the page hyperlinked to, says Windows NT version 5.2
and later, by the way.&nbsp; You should take this up with Microsoft.<br>
</p>
</body>
</html>
Stefan Kanthak
2010-03-15 23:43:15 UTC
Permalink
"Jonathan de Boyne Pollard" <J.deBoynePollard-***@NTLWorld.COM> wrote:

Your attribution line is missing!
Post by Stefan Kanthak
Crossposts over DIFFERENT hierarchies are EVIL!
Codswallop. Cross-posting is a good thing, and there's nothing inherently wrong about cross-posting to newsgroups in different
hierarchies. Indeed, the reasons for not cross-posting to, say, every comp.os.msdos.* newsgroup are reasons for cross-posting to
newsgroups in different hierarchies where Win32 command interpreters and their search wildcards are discussed.

Your line length sucks!

Crossposting over DIFFERENT hierarchies is EVIL!
microsoft.* originates ONLY on msnews.microsoft.com, which but does not
carry alt.* and comp.*.
Post by Stefan Kanthak
Stop posting HTML! Use properly formatted text/plain instead, as recommended in RFC 1855!
You clearly haven't read that RFC.
Oh yes, especially the parts that read:

| - Make things easy for the recipient.

| - Limit line length to fewer than 65 characters and end a line
| with a carriage return.
Post by Stefan Kanthak
Here's a hint, kiddo: The reason that you won't find anything in the RFC supporting your daft notion is that it's a daft notion,
based upon folk wisdom that has passed through a Chinese Whispers effect. The actual, true, division in Usenet is between text and
binaries, wherein hypertext falls very much on the text side. It is binaries that one shouldn't post to text newsgroups, not
hypertext. Binaries are MIME body part types like audio/*, video/*, and image/*. The text/* body part types are, as the
designation states, text.

Your line length still sucks!
Post by Stefan Kanthak
And correct your Web page: the registry setting Win95TruncatedExtensions (which causes the trouble here) was introduced with NT4
[ even more gibberish ]
Post by Stefan Kanthak
Microsoft, on the page hyperlinked to, says Windows NT version 5.2 and later, by the way. You should take this up with Microsoft.
And you can't even read Microsoft web docs right.
Get a copy of the NT4 resource kit docs.

PLONK
Stefan
George Orwell
2010-03-16 00:21:26 UTC
Permalink
You Cocksucker!

Quit Posting In HTML!
Crossposts over DIFFERENT hierarchies are EVIL!

...-...



Il mittente di questo messaggio|The sender address of this
non corrisponde ad un utente |message is not related to a real
reale ma all'indirizzo fittizio|person but to a fake address of an
di un sistema anonimizzatore |anonymous system
Per maggiori informazioni |For more info
https://www.mixmaster.it
Konrad Kullig
2010-03-17 14:12:34 UTC
Permalink
set in the registry:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"Win95TruncatedExtensions"=dword:00000000
Note: This works for all file copies created after this change in the registry.
So when it should work wor for older files you have to copy all these files, e.g. the entire drive.


"Jonathan de Boyne Pollard" <J.deBoynePollard-***@NTLWorld.COM> schrieb im Newsbeitrag news:***@J.de.Boyne.Pollard.localhost...
erase *.tmpdeletes both files. How can I avoid this?

Use a different command interpreter, turn off short filenames, or don't use wildcards with the ERASE command.
Laurent Jumet
2010-03-17 14:27:14 UTC
Permalink
Hello Konrad !
erase *.tmp deletes both files. How can I avoid this?
Normally, TCC allows to exclude using this syntax (not tested, this was in the manual of 4NT):

DEL *.tmp[!l]
--
Laurent Jumet - Point de Chat, Liège, BELGIUM
KeyID: 0xCFAF704C
[Restore address to laurent.jumet for e-mail reply.]
orpy
2010-03-17 22:43:35 UTC
Permalink
Post by Stefan Kanthak
"Jonathan de Boyne Pollard"
erase *.tmp
deletes both files. How can I avoid this?
Use a different command interpreter, turn off short filenames, or
don't use wildcards with the ERASE command.
cutting off the third answer, that no way solves the problem in the object,
i have interest in the other solutions:

what does "different command interpreter" mean? I don't know, can you tell
me something about?

Anyway, does turning off short filenames really work for this problem?
Steve Fabian
2010-03-18 01:41:10 UTC
Permalink
orpy wrote:
| cutting off the third answer, that no way solves the problem in the
| object, i have interest in the other solutions:
|
| what does "different command interpreter" mean? I don't know, can
| you tell me something about?

Microsoft's and IBM's command.com (as well as its clones in DR-DOS, FreeDOS,
etc.), MS' CMD.EXE for Windows NT+ and IBM's CMD.EXE for OS/2 are command
interpreters (or using better terminology command processors). So is every
"shell" of the *nix world. JP Software's 4DOS.COM (a version distributed as
NDOS.COM with Norton Utilities), 4nt.exe and tcc.exe are substantially more
sophisticated command processors for the PC/MS-DOS and MS Windows platforms,
which have an internal option to turn off processing short filenames.

| Anyway, does turning off short filenames really work for this
| problem?

Yes. That option prevents a file which has both an LFN and an SFN from being
processed based on its SFN. In JPsoft's command processors there are
functions to convert between the LFN and SFN. Note that two files with the
same long file name and extension, but in different directories, may have
different SFNs in those directories. JPsoft's command processors for
PC/MS-DOS (4dos.com) and OS/2 (4os2.com) are now unmaintained freeware.
Fully maintained free JPsoft command processors are also available for the
WinXP and later MS platforms ("limited edition" versions) which support
searching for LFNs only.
--
HTH, Steve



--- news://freenews.netfront.net/ - complaints: ***@netfront.net ---
Jonathan de Boyne Pollard
2010-03-18 05:07:14 UTC
Permalink
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<blockquote cite="mid:4ba15b2e$0$821$***@reader5.news.tin.it"
type="cite">
<blockquote type="cite">
<blockquote
cite="mid:7vGdnXjsP-d2JQHWnZ2dnUVZ_r-***@westnet.com.au" type="cite">
<blockquote>
<pre>erase *.tmp</pre>
</blockquote>
<p>deletes both files. How can I avoid this? </p>
</blockquote>
<p><a
href="http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/win32-cli-search-wildcard-matching.html">Use
a
different command interpreter, turn off short filenames</a>, or don't
use wildcards with the <code>ERASE</code> command.</p>
</blockquote>
<p>cutting off the third answer, that no way solves the problem in
the object, i have interest in the other solutions:
</p>
<p>what does "different command interpreter" mean? I don't know, can
you tell me something about?
</p>
</blockquote>
<p>Indeed, and I already have.&nbsp; If you re-read the message that you
indirectly replied to, you'll find that it contains a hyperlink to a
WWW page that names one of the alternative command interpreters that
one can use, and that in its turn hyperlinks to that command
interpreter's documentation where you can find out even more.&nbsp; I've
restored the hyperlink in the quotation in this message.<br>
</p>
<blockquote cite="mid:4ba15b2e$0$821$***@reader5.news.tin.it"
type="cite">
<p>Anyway, does turning off short filenames really work for this
problem?
</p>
</blockquote>
<p>Yes.&nbsp; Here is the problem not occurring on an NTFS volume on a
Windows NT system with short filenames disabled:</p> <blockquote> <pre>[c:\test]rem &gt; test.tmp1</pre> <pre>[c:\test]dir /x/m/k</pre> <pre>10-03-18&nbsp;&nbsp; 4:46&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;DIR&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .
10-03-18&nbsp;&nbsp; 4:46&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;DIR&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ..
10-03-18&nbsp;&nbsp; 4:46&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; test.tmp1

[c:\test]cmd /c erase *.tmp
Could Not Find C:\test\*.tmp

[c:\test]erase *.tmp
4NT: The system cannot find the file specified.
"C:\test\*.tmp"
&nbsp;&nbsp;&nbsp;&nbsp; 0 files deleted

[c:\test]
</pre>
</blockquote>
<p>Notice the lack of a short filename for the search wildcard to
match. I've run both command interpreters, to show that this is not a
command interpreter artefact. Moreover, 4NT here is a significantly
out-of-date version, that pre-dates the feature that turned off SFN
searching (which was introduced quite a few years ago).&nbsp; As mentioned
on the WWW page, the current versions, that <em>have</em> that
feature, will ignore search wildcard matches for short filenames even
for files created <em>with</em> short filenames, such as files on FAT
volumes and files created on NTFS volumes before one turned off short
filename creation.<br>
</p>
</body>
</html>
Tim Meddick
2010-03-18 19:41:17 UTC
Permalink
You are not turning off short filenames to cure the problem.

What you are doing is turning off the [Win95] effect of not recognising filename
extensions greater than three characters - i.e. "Truncated Extensions"

Thus, even though Win95 had Long File Names (the first Win ver to do so) it did not
recognise, for example, the difference between *.tmp and *.tmpl files.

So turning OFF the registry setting (i.e. setting it to zero)
"Win95TruncatedExtensions" you thereby enable WinXP to always recognise the
difference between a three and a four-letter filename extension!

If the setting is ON (i.e. set to 1) then WinXP will treat *.tmp and *.tmpl files as
if they were the same. Therefore, make sure it is set to zero :

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"Win95TruncatedExtensions"=dword:00000000

==

Cheers, Tim Meddick, Peckham, London. :-)
Post by Stefan Kanthak
"Jonathan de Boyne Pollard"
erase *.tmp
deletes both files. How can I avoid this?
Use a different command interpreter, turn off short filenames, or
don't use wildcards with the ERASE command.
cutting off the third answer, that no way solves the problem in the object, i have
what does "different command interpreter" mean? I don't know, can you tell me
something about?
Anyway, does turning off short filenames really work for this problem?
Laurent Jumet
2010-03-19 01:31:32 UTC
Permalink
Hello Tim !
Post by Tim Meddick
You are not turning off short filenames to cure the problem.
What you are doing is turning off the [Win95] effect of not recognising
filename extensions greater than three characters - i.e. "Truncated
Extensions"
Thus, even though Win95 had Long File Names (the first Win ver to do so) it
did not recognise, for example, the difference between *.tmp and *.tmpl
files.
So turning OFF the registry setting (i.e. setting it to zero)
"Win95TruncatedExtensions" you thereby enable WinXP to always recognise the
difference between a three and a four-letter filename extension!
If the setting is ON (i.e. set to 1) then WinXP will treat *.tmp and *.tmpl
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"Win95TruncatedExtensions"=dword:00000000
As I suggested in a previous message, this works:

DEL *.tmp[!l]

Try with a DIR first:
DIR *.tmp[!l]
You see that .tmpl are not listed.

And let's suppose you'd like to exclude all files that have a fourth letter in their extension; you can use a range:
DEL *.tmp[!a-z]
--
Laurent Jumet - Point de Chat, Liège, BELGIUM
KeyID: 0xCFAF704C
[Restore address to laurent.jumet for e-mail reply.]
Jonathan de Boyne Pollard
2010-03-19 13:01:11 UTC
Permalink
Post by Tim Meddick
You are not turning off short filenames to cure the problem.
What you are doing is turning off the [Win95] effect of not
recognising filename extensions greater than three characters - i.e.
"Truncated Extensions"
M. orpy said
Post by Tim Meddick
cutting off the third answer, that no way solves the problem in the
Xe wasn't asking about what M. Kullig suggested, but about turning off
short filenames.

Loading...