CopyFiles Sections

[<CopyFiles-section-name>]
<destination-file-name>[, <source-file-name>][, <temporary-file-name>][,<flag>]
[<destination-file-name>[, <source-file-name>][, <temporary-file-name>]][,<flag>]
   .
   .
   .
 

Lists the names of files to be copied from a source disk to a destination directory. The source disk and destination directory associated with each file are specified in other sections of the INF file. The file-list-section name must appear in the CopyFiles item of an Install section.

Note that you can specify the copying of a single file in the CopyFiles item of the Install section itself, without building a Copy Files section. To do this, use the special character @ to force a single file copy. An example of using the @ character in a CopyFiles-type item is in the Install section reference topic. Copying a single file in this way is somewhat limited because the source and destination filenames must be the same in this case and you cannot use a temporary file.

destination-file-name
Name of the destination file. If no source filename is given, this is also the name of the source file.
source-file-name
Name of the source file. If the source and destination filenames for the file copy operation are the same, this is not required.
temporary-file-name
Name of a temporary file for the file copy operation. The installer copies the source file but gives it the temporary file name. The next time the operating system starts, it renames the temporary file to the destination file name. This is useful for copying files to a destination which is currently open or in use by Windows.
flag
Optional parameter used to indicate a file that is critical to the installation process. For those files that the copy operation cannot be skipped during the installation process, set the flag parameter value to 2.

This example copies three files:

[CopyTheseFilesSec]
file11                     ; copies file11
file21, file22, file23     ; copies file22, temporarily naming it file23
file31, file32             ; copies file32 to file31
 

All the source filenames used in this example must be defined in a SourceDisksFiles section and the logical disk numbers that appear in the SourceDisksFiles section must have been defined in a SourceDisksNames section. As an alternative, you can use a LAYOUT.INF file to supply this information.