File Names and WildcardsWinOne® supports both long file names and wildcard characters. Long file names can only be used on a file system that supports long file names. In Windows NT this includes the NTFS and HPFS. Typically, long file names can including up to 255 characters. The VOL command displays particular information concerning a file system, such as the maximum number of characters allowed for a single file name.
Long file names can include space characters or special characters and more then one dot character. To specify a long file name that includes space characters or any special characters as a parameter to a command or program then the long file name, including the drive and directory, must be enclosed in between double quote marks (ie. ' " '). For example :-
"D:\WINDOWS\A LONG FILE NAME.TXT"
The use of double quote marks is necessary, otherwise a command would assume that many parameters have been specified when a file name includes space characters or WinOne® would assume some other course of action depending on the special character encountered. Space characters and special characters are allowed for short file names or 8.3 file names, including when WinOne® running on Win32s, and therefore when ever a file name contains space characters or special characters the complete file name MUST be enclosed in double quote marks. WinOne® includes pseudo file name completion using the TAB key. When using the TAB key, double quote marks will automatically be inserted when an expanded file name contains space characters or special characters.
All long file names have an equivalent 8.3 file name, since DOS programs do NOT recognise file names that include more then 8.3 characters. For example, the short file name for "A LONG FILE NAME.TXT" is :-
There is no need to convert a long file name (as above) when the long file name conforms to the 8.3 file naming convention for DOS programs.
Wildcard characters allow a set of files that share a particular pattern to be grouped together and specified as a parameter to a command. Wildcard characters include both the star character (ie. ' * ') and the question mark character (ie. ' ? '). The star character will match zero or more characters in a file name and the question mark character will match a single character. Most users would be familiar with the use of these wildcards. For example :-
Dot characters in file names are treated just like any other character when used in a file name and the file extension simply becomes the group of characters after the last dot character, that appears in a file name. Wildcards are not only matched with long file names, but they are also matched with the equivalent short file names. This can result in a long file name being accepted as matching a wildcard pattern even though it did not, since the short file name matched the wildcard pattern. Consider the following examples :-
Similarly, wildcards can appear anywhere in a file name. For example :-
Just as long file names required short file names to work with DOS programs when a long file name exceeded 8.3 characters, it should be no surprise that certain wildcards should be avoided with DOS programs. The last two groups of wildcard examples can lead to unexpected results when used with DOS programs and should be avoided. WinOne® commands, both internal and external, will function as expected, including when WinOne® running on Win32s. However DOS programs do not recognise these wildcards under any operating system.
The limitations with long file names and wildcards, outlined in this section, are not unique to WinOne® and they will arise with any Win32 program that use long file names and wildcards.
Copyright © 1995-2018 Lucien Cinc, All Rights Reserved
WinOne® is an Australian registered trademark
Go to the Australian Command Line Software web site.