Help: Using Run Command tool to create a folder
- 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 all,
I have a workflow that gives me 3 excel file outputs at the end. When I run the workflow, I would like for it to automatically create a folder in a shared drive, with the folder named as "today's date" and have my 3 excel files saved in that folder
I heard that a run command tool can be used but I have absolutely no idea about the configurations. Does anyone know how to go about doing it / guiding me with the exact steps?
Also, a side question, is it possible to do this without a run command tool?
Thank you so much!
Solved! Go to Solution.
- Labels:
- Help
- Run Command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This thread (including the -p addition in the last post) walks you through the mkdir/alteryx interface and provides a batch macro in a workflow to show you how to implement...
I think the all important link didn't post so here it is again:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Eunice_97
Just a quick sample
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Just to add something, the -p does not work (or at least for me) in the Windows environment with mkdir or md. Instead I used the following command: "if not exist ." +[DirName] + " mkdir ." + [DirName]
The periods are there because I want the folders created at one level above "_externals".
Now just tweaking the workflow to guarantee the folders are created before the output tries to place files in them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
hey,
Just to add - i released a free tool on the Alteryx Gallery for this job:
https://community.alteryx.com/t5/Public-Community-Gallery/Create-Folder-Path/ta-p/928839
This uses the run command similar to as discussed above. Feel free to open the macro and see how it works (I haven't locked/encrypted the macro, so if you just want the logic it may be useful).
The logic is simple, an explained in the source above - i use a command to check if the folder path first exists, and if not, i use the mkdir command.
Hope this helps,
TheOC
