Previous Next

INF RenFiles Directive

[DDInstall] |
[DDInstall.CoInstallers] |
[ClassInstall32] |
[ClassInstall32.ntx86] |
[ClassInstall32.ntia64]

 

Renfiles=file-list-section[, file-list-section]...
 
 

A RenFiles directive references an INF-writer-defined section elsewhere in the INF file, causing that list of files to be renamed in the context of operations on the section in which the referring RenFiles directive is specified.

A RenFiles directive can be specified within any of the sections shown in the formal syntax statement. This directive also can be specified within any of the following INF-writer-defined sections:

Comments

This directive is rarely used. The only files that can be safely renamed are those that were used only in earlier versions of the operating system, and are thus never used for the currently installed version. (For Windows XP and later, you can use the TargetOSVersion decoration to control version-specific installation behavior. See INF Manufacturer Section.)

Any file-list-section name must be unique to the INF file, but it can be referenced by CopyFiles, DelFiles, or RenFiles directives elsewhere in the same INF. Such an INF-writer-defined section name must follow the general rules for defining section names. These rules are described in General Syntax Rules for INF Files. For information about how to use the system-defined .nt, .ntx86, and .ntia64 extensions, see Creating INF Files for Multiple Platforms and Operating Systems.

Each named section referenced by a RenFiles directive has one or more entries of the following form:

[file-list-section]
 

new-dest-file-name,old-source-file-name
...

A file-list-section can have any number of entries, each on a separate line.

RenFiles-Referenced Section Entries

new-dest-file-name
Specifies the new name to be given to the file on the destination.
old-source-file-name
Specifies the old name of the file.

The DestinationDirs section of the INF file controls the destination for all file-rename operations, whatever the section containing a particular RenFiles directive, as follows:

Example

This example shows a section referenced by a RenFiles directive.

[RenameOldFilesSec]
devfile41.sav, devfile41.sys

See Also

AddInterface, ClassInstall32, CopyFiles, DDInstall, DDInstall.CoInstallers, DelFiles, DestinationDirs, InterfaceInstall32, SourceDisksFiles, SourceDisksNames, Version