Hi,
I have an issue with some backups. I'm reading a bunch of tables from a datebase, appending a prefix with a date stamp, and saving them individually as .csv files. Since the flow with these backups is to be run weekly, I would like it to automatically create a new folder with the date as the file name, and output the individual .csv backup files inside this folder.
Is this possible?
Solved! Go to Solution.
Hi @mikirkeby
You could use a Blocl Until Done tool and from the first output, create the folder (either with System Command, or the R tool); then from the 2nd output, write the CSV to that folder.
Hope that helps!
John
Something I do is use a formula field to dynamically build a path...
[File Name] = [FilePath] + [Source_FileName] + [FileNameExtension]
...where [FilePath] changes based on file and date, then set my output to take that full path...
Is this the method you're currently using?
How can I automatically create the folder using system command? (I don't R tool in my package)
A mock-up would be very nice, thanks!
Here you go Michael,
Stripped this down to the bare bones to demonstrate the concept. Note - this relies on you having a folder on your c:\ called Temp, but you should be able to amend as you need.
Thank you for following up with me - hopefully this solves your problem.
I would suspect that if you need to create some directories, then write a bunch of files, you'll need to wrap this in a macro. If that's the case - shoot over some sample data, and we can take the next step of showing you how to do both the folder creation, and then also writing the data into the files in the subfolder.
Cheers
Sean
Works Perfectly !!!
thanks @SeanAdams
Hi
I have used the Make Directory Batch to create my new folder structure and works great. However I am having trouble ensuring my output dynamically selects this new folder when saving the output.
Any advice?
Regards
David