Perform the same transforms on many files

<< Click to Display Table of Contents >>

Navigation:  How do I? >

Perform the same transforms on many files

You can perform the same set of transforms on multiple inputs in one operation using batch processing or command line arguments.

 

Example 1

To convert a folder full of .json files to .csv files:

 

1.Select File>New to create a new .transform file.

2.Drag one of the .json files onto the Center pane. Ensure the options (encoding etc) are correct in the Right pane.

3.Click on the To File button at the bottom of the Left pane and set the location of a .json file to create. Ensure the options (encoding etc) are correct in the Right pane.

 

convert CSV to JSON

4.Select File>Batch Process.

5.In the Batch Process window change the .json file name to *.json, so that all the .json files in that folder will be processed.

 

batch convert CSV to JSON

 

6.Press the Process button. A .csv file will now be created for each .json file in the folder. In the example above {test} will be replaced by the filename of the input file with alias test (if you just output to output.csv then you would be continually overwriting the same file).

7.Select File>Save to save your .transform for future use.

 

If you want to process input files from another folder then click Add to add a new row and change the input folder.

 

Example 2

To merge multiple .csv files into a single .csv file:

 

8.Select File>New to create a new .transform file.

9.Drag one of the .csv files onto the Center pane. Ensure the options (encoding etc) are correct in the Right pane.

10.Click on the To File button at the bottom of the Left pane and set the location of a merged.csv file to create, in a different folder to the input .csv files. Ensure the options (encoding etc) are correct.

 

 

batch-example-4

4. In the Right pane set Write Mode to Append and check write header and if file empty. This ensures that only one header will be written, rather than one for every input file.

 

batch-example-3

 

 

5.Select File>Batch Process.

6.In the Batch Process window:

change the input .csv file name to *.csv, so that all the .csv files in that folder will be processed.

Check clear 'Append' outputs before first append so that any existing data in the output file is cleared before we start appending to it.

 

join multiple CSV

 

7.Press the Process button. A single merged.csv file will now be created that contains a concatenation of all the other .csv files.

8.Select File>Save to save your .transform for future use.

 

If the headers are different orders in different .csv files, then you can Stack by header name in your .transform to get a consistent column order before outputting.

 

batch-example-6

 

batch-example-7