Create a folder where the workflow is saved
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi community,
I have a workflow that I plan to send to other people on my team. However, I do not want them to have to change the output file path on every file when they go to run it (There is at least 10). I want the files to be saved in a folder called "TABLES" that needs to be created in the same location where the workflow is saved. I know you can create a generic file path like so ".\Tables\File1.csv" and that will save how I want it to. Unfortunately this will fail if the folder "TABLES" hasn't been created. Any suggestions on how to check and create this folder if it doesn't exist or to allow the output tool to create the folder itself?
Thanks for the help!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@rybog98 You could use an event that runs before the workflow like so. This would create the table folder before the workflow is run if it doesn't already exist.
/cif not exist "Table\" mkdir Table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
That worked perfectly! Thank you. @patrick_digan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @patrick_digan How to write the code if I need to create the folder somewhere else, i.e. not under the same folder as the current workflow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@JokeFun
You can define the target folder as Working Directory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Qiu ,
Thanks! This works!
