You are here: Reference Manual > FME Server Console > Command Line Options > Argument Quotation and Escaping

Argument Quotation and Escaping

Interactive Command-Line and Batch-File Modes

In interactive and batch-file modes, the following rules apply for arguments:

  • An argument must be provided as a list of values separated by one or more whitespaces. For example:

run_workspace Samples/easyTranslator.fmw --SourceDataset_GENERIC C:/FMEData/parcel_K25.dwg

  • An argument that contains whitespaces must be surrounded by quotes ("):

run_workspace Samples/easyTranslator.fmw --SourceDataset_GENERIC "C:/FME Data/parcel_K25.dwg"

  • An argument that contains quotes must be surrounded by quotes, and the internal quotes must be escaped as double-quotes ("") .
  • For example, consider the following string literal, which contains quotes around each value containing whitespace, and an additional set of quotes around both values to accommodate the whitespace between them:

    ""C:/FME Data/parcel_K25.dwg" "C:/FME Data/parcel_K24.dwg""

    To provide this string literal as an argument to the command line, the following must be specified:

    """""C:/FME Data/parcel_K25.dwg"" ""C:/FME Data/parcel_K24.dwg"""""

    Full example:

    run_workspace Samples/easyTranslator.fmw --SourceDataset_GENERIC """""C:/FME Data/parcel_K25.dwg"" ""C:/FME Data/parcel_K24.dwg"""""

Single-Shot Command-Line Mode

In single-shot command-line mode, the FME Server Console does not apply any transformation to the command line arguments it receives. For more information about how escaping and quotations are handled by command shell, please refer to your operating system shell documentation.