I have a workflow that creates about 40 reports that I would like to save to my gallery requiring little to no maintenance. With that said, I would like to configure the output to create a directory for 'year' if one does not exist, and create a subdirectory for the 'month' it one does not exist, and within the month the 40 reports for that month.
Please let me know if this is doable.
Solved! Go to Solution.
You can use Run Command to create folders
Your formula can have your bat script. Something like the below to create a folder for year 2022 and subfolder for Oct, if they don't exist.
You can update the formula according to the logic used in your analysis to decide on year and month.
'if not exist "E:' + datetimeformat(datetimetoday(),"%Y")+'/'+datetimeformat(datetimetoday(),"%B")+'" mkdir "E:'+ datetimeformat(datetimetoday(),"%Y")+'/'+datetimeformat(datetimetoday(),"%B")+'"'
Results:
Attached is the WF to provide guidance on the steps.
Cheers!
Another option, you can use this python macro that create folders, you just need to adapt to your situation: Create directory if not exists and save the ouput - Alteryx Community
If the provided answer helped you to solve the problem/was correct, please accept it as a solution :)
Thanks.