and I run "dir *.tst" at a cmd prompt, I get back all 3 files. Running "dir
*.ts?" and "dir *.t??" does the same thing. del works the same way (as
probably most wildcard cmds do).
This causes real problems if I want to delete all .res files but not .resx
files. Is there any way around this?
>If I have files
>
>test.tst
>test.tst1
>test.tst2
>
>and I run "dir *.tst" at a cmd prompt, I get back all 3 files.
>Running "dir *.ts?" and "dir *.t??" does the same thing. del works
>the same way (as probably most wildcard cmds do).
>
>This causes real problems if I want to delete all .res files but
>not .resx files. Is there any way around this?
For all that I know Windows does no handle more then 3 characters file
extension.
--
Jerry Maguire: Help me... help you. Help me, help you.
;-)
"Curt Dixon" <CurtDixon@discussions.microsoft.com> wrote in message
news:E191D3E6-5E0E-464E-875C-D577784B84A9@microsoft.com...
> If I have files
>
> test.tst
> test.tst1
> test.tst2
>
> and I run "dir *.tst" at a cmd prompt, I get back all 3 files. Running
> "dir
> *.ts?" and "dir *.t??" does the same thing. del works the same way (as
> probably most wildcard cmds do).
>
> This causes real problems if I want to delete all .res files but not .resx
> files. Is there any way around this?
Unless you turn off the "Short File Name" (SFN) facility, all file
names have both an SFN and an LFN. Commands using a wild
card will produce a match if either the SFN or the LFN matches.
You will now find that the LFN extension of "test.tst1" is ".tst1".
The SFN extension for the same file ist ".tst". In other words,
there is a match for *.tst.
"Curt Dixon" <CurtDixon@discussions.microsoft.com> wrote in message
news:0424B608-969C-4541-9928-E5057A68D0B7@microsoft.com...
> "Holz" wrote:
>>
>> For all that I know Windows does no handle more then 3 characters file
>> extension.
>>
>
> Then change them to 4 chars.
>
> test.test
> test.test1
> test.test2
>
> Now "dir *.test" returns 1 file. "dir *.tes" returns all files.
>
> There seems to be a special case bug when searching with 3 char
> extensions.
> No doubt left over from the 1980's DOS days.
Nope. Not a bug - it's part of the SFN translation. Use dir /x
to see what I mean.