Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

How to create a dynamic output folder?

I have a workflow that needs to save the reports to a new folder with a date stamp each month. I figured how to date stamp the actual files but don't know how to create the dynamic folder with the date stamp. Hopefully I've attached my sample workflow correctly. I just need help creating the folder \Dynamic 20170719\. I hope I've explained myself correctly. Thank you! Monica

@mocalvo I would use the MKdir command and create a temp bat file to do that. I've attached a working version on my end. You can tweak the formula tool to get the folder naming convention just right. I wasn't sure if you wanted a monthly or daily folder, and whether you wanted the dashes in the folder name. You can use the DateTimeFormat function if you wanted to get rid of the dashes in the folder or file name.


EDIT: the first file had a small issue with the data coming into the append tool. It has been corrected.

Thank you so much for such a quick response! The workflow worked great on my end to create the folder. I just need to figure out why all of my data didn't work it's way to the final file. Only one row was populated. Thanks!
That was my fault :) I put an updated file out there but I wasn't fast enough. I accidentally connected the sample tool to the append fields tool.
You are awesome...thank you for your help! My browser at work isn't letting me click on the "Accept As Solution" button. I'll click on it when I sign in from home. I've already shared your solution with my co-workers. We are very grateful!

Hey, I am getting the error "Error: Run Command (50): The external program "%temp%bat.bat" returned an error code: 1"

How can I fix this?

You can check the .bat file.
In that file check the folder path contains spaces or not. If it contains spaces then eliminate spaces from the mentioned folder path.
Your folder path should be without spaces.
Eg: C:/Users/FolderName