There are some special considerations applicable to volumes which support long file names (including VFAT, FAT32, and NTFS volumes). All files on such volumes have a short (FAT-compatible 8.3) file name (SFN). A file which was created (or renamed to) a name which contains lower case letters or other characters not compatible with SFNs, or a name longer than 8 characters, or an extension longer than 3 characters, or more than one period (.) in its name will have both the long file name (LFN) specified, and an SFN automatically generated by the file system. The SFN associated with an LFN may change when the file is moved or copied even when the LFN is not changed.
When CMD performs a wildcard search, it searches for both forms of each file name. The long filenames are checked first, followed by the short file names. Matching files which have only a short filename will be found during the first search, because in that case the file system treats the SFN name as if it were a LFN.
For example, suppose you have two files in a directory with these names:
Long Name Short Name
Letter Home.DOC LETTER~1.DOC
Letter02.DOC LETTER02.DOC
A search for LETTER??.DOC will find both files. The second file (Letter02.DOC) will be found during the search of long filenames. The first file (Letter Home.DOC) will be found during the search of short filenames but will return LFN.
Because this dual search can result in some very unexpected or even disastrous results, TCC-RT defaults to searching only for the LFN. You can change the default with the Search for SFNs option in the OPTION / Startup dialog.
Take extra care when you use wildcards to perform operations on LFN volumes if you have set Search for SFNs, because you may select more files than you intended. For example, Windows often generates short filenames that end with ~1, ~2, etc. If you use a command such as:
del *1.*
you will delete all such files, including most files with long filenames, which is probably not the result you intended!