Geek Rant dot org

 

Thu 2006-06-01

Fun with wildcards and DOS 8.3 filenames

Filed under: — daniel @ 17:35

I’ve found under some circumstances, new versions of Windows (XP and 2000, using NTFS) are still looking at the DOS 8.3 versions of filenames when using wildcards.

Real world example: a set of files such as tpo12345.xml tpo12346.xml tpo12347.xml etc. To find these, you’d use a wildcard such as tpo?????.xml

If you have a file called tpo1234567890.xml, it shouldn’t match using this wildcard, but it does, because the filename’s backward-compatible short version (in DOS 8.3 format) is something like TPO123~1.XML, which matches. It appears to only happen when the first part of the wildcard (without the suffix) is 8 characters long.

So it may be ten years since most of us said goodbye to short filenames, but it seems they’re still with us. I wonder if Windows Vista will still use them?

Digg this

One Response to “Fun with wildcards and DOS 8.3 filenames”

  1. mgm Says:

    The famous Raymond Chen expands on this issue in his blog at http://blogs.msdn.com/oldnewthing/archive/2005/07/20/440918.aspx.

    Note to disable the 8.3 name creation on XP NTFS partitions, use the command “fsutil.exe behavior set disable8dot3 1″
    http://support.microsoft.com/kb/121007/

Leave a Reply


26 queries. 0.382 seconds. Powered by WordPress