I'm trying to recursively search a directory tree to find all of the .asp files using the following command:
dir *.asp /s
For some reason, this returns not only the asp files, but also the aspx files.
How can I force it to ignore the aspx files?
|
I'm trying to recursively search a directory tree to find all of the .asp files using the following command: dir *.asp /s For some reason, this returns not only the asp files, but also the aspx files. How can I force it to ignore the aspx files? |
|||
|
|
For compatibility reasons, Windows generates a 8.3 name for every long file name created, and wildcard matching code ( The "extension" part of a 8.3 name is always created by simply truncating the last extension to at most 3 characters: When using the NTFS filesystem, 8.3 name creation can be disabled system-wide using:
However, this won't affect existing names. You will have to rename each file and then rename it back to its original name. See also: Directory search in Windows Command Prompt shows incorrect output! |
|||||||
|
|
Of course this varies according to what command interpreter's |
|||
|
|
|
Interesting - seems to be a bug... Considering, I would pipe it through find like so:
|
||||
|
|