Any internal command that accepts multiple filenames will also accept one or more include lists. An include list is simply a group of filenames, with or without wildcards, separated by semicolons [;]. Only the first entry in each include list may specify a path. All files in an include list must be in the same directory. You may not add a space on either side of the semicolon. See the rule below to determine when a semicolon is part of a file name and when it is an include list separator.
For example, you can shorten this command which uses multiple file names:
copy a:\details\file1.txt a:\details\file1.doc c:
to this using an include list:
copy a:\details\file1.txt;file1.doc c:
Include lists are similar to multiple filenames, but have three important differences.
•First, you don't have to repeat the path to your files if you use an include list, because all of the included files must be in the same directory.
•Second, if you use include lists, you aren't as likely to accidentally overwrite files if you forget a destination path for commands like COPY, because the last name in the list will be part of the include list, and won't be seen as the destination file name. Include lists can only be used as the source parameter -- the location files are coming from -- for COPY and other similar commands. They cannot be used to specify a destination for files.
•Third, multiple filenames and include lists are processed differently by the DIR and SELECT commands. If you use multiple filenames, all of the files matching the first filename are processed, then all of the files matching the second name, and so on. When you use an include list, all files that match any entry in the include list are processed together, and will appear together in the directory display or SELECT list. You can see this difference clearly if you experiment with both techniques and the DIR command. For example,
dir \doc\*.txt *.doc
|will list all the .TXT files in directory \DOC\ with a directory header, the file list, and a summary of the total number of files and bytes used. Then it will do the same for the .DOC files in the current directory. However,|
|will display all the .TXT and .DOC files in directory \DOC\ in one list.|
Like extended wildcards and multiple filenames, include lists work with internal commands, but not with external programs (unless they have been programmed especially to support them).
Since a semicolon (";") is a valid (albeit unfortunate) character in a file name, you must quote any such name if you don't want TCC to treat it as an include list.
If a filename parameter includes a semicolon, TCC first attempts to find a filename containing an embedded semicolon. If found, that filename is used. If no file is found, the semicolon is considered to be an include list separator.
See also: Exclusion Ranges.