I have about a hundred or so .csv files. They all live in different folders on the same network. In a database table I have the path and name of each file (something like: "M:\\ExampleFolder\\Example.csv"). As I process each record, I just want to copy each source .csv file to a folder called "D:\\Temp" and rename it "Final.csv". So "M:\\ExampleFolder\\Example.csv" would get copied to "D:\\Temp\\Final.csv" when that record was processed. The next record in the table might be "D:\\ATotallyDifferentFolder\\Different.csv". When that record gets processed I want that file to replace/become the new "D:\\Temp\\Final.csv". I can't seem to figure out how to use the File Copy writer to do this. Any help would be appreciated. Thank you.
Solved
Copy random .csv file to one name.
Best answer by nielsgerrits
You can use the specific parameters for this writer to do that:
- filecopy_source_dataset
- This is the source path
- filecopy_dest_filename
- This is the new name, in your case "Final.csv"
Set Dataset to C:\\ and Subfolder name to Temp and you are good to go.
Also see the documentation. This is one of the not so intuitive writers in my opinion.
As an alternative you can use a SystemCaller with dos commandline like copy and xcopy.
Reply
Rich Text Editor, editor1
Editor toolbars
Press ALT 0 for help
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.