Hello Everyone,
I need a help.
Actually I want whenever Alteryx is going to generate the output I want it to search for the folder of todays date and then create a subfolder inside that todays date folder and generate the output in that subfolder. How can we do this in Alteryx?
There are a few community posts that go through creating folders via a Run Command - I would search those to see as that is the only way I am aware of to create a folder within Alteryx. Here is one of them for example: https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Create-Folders-and-Sub-folders...
Hi @AmritaUpadhyay,
There is another way to generate a folder in Alteryx, which is to use the render tool.
For example, you create some kind of dummy data, and render that as a pdf to the location you want, it will generate the missing folders in the path as part of outputting the file.
The downside of course is you have a dummy file that you don't actually need. It's quite easy though if you struggle with the run command tool.
So you set up your routine to run this part first before outputting your file to the newly generated path.
Amusingly, the way to delete the dummy file if you didn't want it there is to use the run command tool!
Ben
I would suggest you try out python tool as well for this purpose.
Command tool has one problem as it is difficult to pass parameter without using control parameter.
You can try to create a column using formula tool and pass this column to a python tool and use the below command
from ayx import Alteryx
import os
path = Alteryx.read("#1")
path_str = path["Test_Path"][0] #Change Test_Path to your column name
isExist = os.path.exists(path_str)
if not isExist:
# Create a new directory because it does not exist
os.makedirs(path_str)
print("The new directory is created!")
Hope it works!
Arun
User | Count |
---|---|
109 | |
89 | |
77 | |
54 | |
40 |