Tables derived from File List - Branching and Merging

This may not be possible with out scripting but wanted to throw it up into the air and see what comes back down.

I have a table (Table1) of file names and extensions collected from a directory. Some of these files are CSV and some are XLS. I would like to export the CSV files to XLS and then end up with a set of XLS files that I can then move to a new location for downstream processing by an external system.

I can do all of the moving etc using a NON-EeasyMorph solution and even a CLI tool to convert CVS into XLS. But thought that I would use EM to do the CSV to XLS conversion and if possible all of the file transport as well.

My approach so far is to get the first table of files (Table1) and filter it down to only include XLS and CSV files. Then derive 2 separate tables from this 1 with only XLS (Table2) and 1 with only CSV (Table3).

Then the idea was to add an ExportExcel Trasnformation to Table3 which would create a set of new XLS files in a temporary location and then calculate a new table file list (Table4) and merge it into the my XLS only table (Table2).

Then I have a Table of XLS file, names and paths that I can do whatever I need to with.

The problem for me is that here seems to be too many moving parts that could go pear shaped leaving files all over the place.

Any ideas?

I would calculate converted XLS file names (full paths) in Table3, and then use Iterate transformation to call a helper project that simply reads a CSV defined by a parameter, and then immediately exports it to an XLS which name is also defined by a parameter (so 2 transformations in total). The Iterate transformation would simply assign the parameters with input and output names from Table3 and call the helper project.

After iteration you will end up with a list of paths of converted XLS files which you can simply append to Table2 using Append transformation. No need to scan file names again in Table4 as they are already pre-calculated.

All in all I don’t see any need in external scripting here – files can be converted and moved solely by means of EasyMorph.