Command files are an alternative method of batch processing FME workspaces. A command file is a file containing a list of FME-related commands, one command per line. Commands that can be processed include mapping file generation, running a workspace or mapping file, and even executing another batch file.
For example, the command file might contain lines such as:
c:\dxf2dgn.fmw --SourceDataset c:\in1.dxf --DestDataset c:\out1.dgn LOG_FILENAME c:\fme.log
Line continuation characters (\) can be used to split commands over several physical lines in the file.
Use the following syntax to run a command file:
fme COMMAND_FILE <commandFile>
Specifying Multiple Files in a Command File
The following rules apply when specifying multiple files, such as datasets, in a command file argument:
- If an argument contains white space, it must be surrounded by double quotes.
- The entire list of files must be surrounded by double quotes.
- To ensure they are included in the FME mapping file for the parser to interpret, the quotes delineating white space and the quotes around the entire list of file names must be escaped with a backslash (\).
- An additional set of quotes (not escaped) must be placed around the list of files.
fme.exe c:\temp\command.fmw --SourceDataset_ACAD "\"\"C:\FME Data\Data\Water\distribution_L25.dwg\" \"C:\FME Data\Data\Water\distribution_L26.dwg\"\"" --DestDataset_DGNV8 c:\temp\output.dgn