Hi, I'm trying to find the most efficient way to rename certain files, without too many steps and variables etc. So far I have:
1) A job with the copy files step. I'm using the .*\.csv regex to import all csv's.
2) Some of the files have a date stamp that I want to remove. A transformation with a 3 steps. Get File Names > Get Variables > Process Files
I'm using this to retrieve a filename I know I need to change. Then using Get Variables to create a field from a variable with a specified output file. Then processing the file to change the name (move file).
I dont want to have too many of these process flows if at all possible, so that future changes aren't too difficult. Is there an easier way to do this? I've tried from within the copy files step but I couldn't seem to change the filename.
Edit:
The best I've got it so far is by using a switch case statement. 1 output per file I want to change the name for, 1 output for files that don't require a name change, and 1 for the rest that I want to delete. However, the move operation in the process file step doesn't seem to delete the original.
1) A job with the copy files step. I'm using the .*\.csv regex to import all csv's.
2) Some of the files have a date stamp that I want to remove. A transformation with a 3 steps. Get File Names > Get Variables > Process Files
I'm using this to retrieve a filename I know I need to change. Then using Get Variables to create a field from a variable with a specified output file. Then processing the file to change the name (move file).
I dont want to have too many of these process flows if at all possible, so that future changes aren't too difficult. Is there an easier way to do this? I've tried from within the copy files step but I couldn't seem to change the filename.
Edit:
The best I've got it so far is by using a switch case statement. 1 output per file I want to change the name for, 1 output for files that don't require a name change, and 1 for the rest that I want to delete. However, the move operation in the process file step doesn't seem to delete the original.