Using FME I want to copy a set of files in 1 directory to a different and then add a new file extension (whilst retaining the old).
I have created a workflow which works by reading all files within a directory, I then use the AttributeExposer, FilenamePartExtractor and StringConcatenator to obtain the details of existing filename and also create the new name. I then use a fanout on the text writer to output to the new directory. The problem is that I think it is inefficient as the contents of the files are being read in and then processed, when this only needs to be completed at file level and not contents level.
The input files are essentially text files from a mainframe, and named as user id and mainframe report output number, i.e.
asd0122.012
asd0122.013
asd0122.014
I am keen to retain the existing 'extension' as this provide information of report request order and therefore want to produce the following
asd0122.012.txt
asd0122.013.txt
asd0122.014.txt
I imagine that python script could be used to do this, could any one help? (Typically I know how to rename using ms dos, but do not know if I can 'call' or run an ms dos command within FME.)
The source and destination locations are known and will not change (or perhaps parameters could be used to add extra longevity to the process?).
(Source) e.g. C:\\project\\abc\\data\\input
(Destination) e.g. C:\\project\\abc\\data\\intermediate\\01\\01
Any help or advice would be appreciated,
I am using 2013sp1 build 13448
Regards,
Rob