Command line arguments

<< Click to Display Table of Contents >>

Navigation:  Reference >

Command line arguments

Easy Data Transform accepts the following command line arguments:

 

Argument

Description

<file name>

The .transform file to open at start-up.

-build

Output the Easy Data Transform build time and date.

-cli

Close the application once any processing on the opened file is complete.

-log <location>

Appends the command line output to the file at <location>. -cli must also be set.

-file <alias>=<location>

Sets the input or output file with the given alias to the location (path) specified. Input Excel files should include the sheet name, e.g. file.xlsx[sheet]. Output Excel files may optionally include a sheet name. The file type should be the same as the original.

-new_window

Don't load the last opened .transform file, even if open previous file at start-up is checked in Preferences.

-verbose

Output additional information to the terminal. Useful for debugging problems.

-version

Output the Easy Data Transform version number.

 

This allows you to run Easy Data Transform from the Mac Terminal or a script. For example:

 

To run /Users/andy/Documents/myfile 1.transform with the output with alias output1 output instead to /Users/andy/Documents/data1.csv:

 

/Applications/EasyDataTransform.app/Contents/MacOS/EasyDataTransform '/Users/andy/Documents/myfile 1.transform' -file 'output1=/Users/andy/Documents/data1.csv' -cli -verbose

 

To run /Users/andy/Documents/myfile2.transform with the input with alias input1 input instead from sheet sheet1 of /Users/andy/Documents/data 2.xlsx:

 

/Applications/EasyDataTransform.app/Contents/MacOS/EasyDataTransform /Users/andy/Documents/myfile2.transform -file 'input1=/Users/andy/Documents/data 2.xlsx[sheet1]' -cli -verbose

 

Use wildcards to transform multiple files in a folder:

 

for f in in*.csv; do /Applications/EasyDataTransform.app/Contents/MacOS/EasyDataTransform '/Users/andyb/Dropbox/cli/cli.transform' -file cli-in=$f -file cli-out=out-$f -cli -verbose; done

 

Use file name variables to dynamically change output file names based on input file names.

 

You can also use the Mac 'open' command:

 

open /Applications/EasyDataTransform.app --args /Users/andy/Documents/myfile\ 1.transform -file output1=/Users/andy/Documents/data1.csv -cli

open /Applications/EasyDataTransform.app --args /Users/andy/Documents/myfile2.transform -file 'input1=/Users/andy/Documents/data 2.xlsx[sheet1]' -cli

 

But note that no command line output is shown if you use 'open'.

 

Put single quotes (') around any arguments with spaces or a backslash (\) in front of each space (as shown in the examples above).

 

Input and Output items are referenced by their Alias field value.

 

Alias field

 

If you are using relative (rather than absolute) paths for input or output files, these will be relative to the folder the current working folder.

 

If you are using wildcards, then it is usually a good idea to output to a different folder to the one that you are inputting from.

 

Select File>Command Line... to show sample command line text which you can copy and modify. It will also warn you of potential issues.

 

To run on a schedule, call the command line interface (or a script file that calls the command line interface) from a scheduling program, such as launchd.

 

See also:

Batch processing

Run jobs on a schedule