Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
We’re experiencing technical issues with our vendor that are affecting license activations for Designer Desktop. We don’t yet have an estimated resolution time. We apologize for the inconvenience and will share updates as we have them.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Alteryx to search folder and create a subfolder while generating output

AmritaUpadhyay
7 - Meteor

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?

 

4 REPLIES 4
alexnajm
18 - Pollux
18 - Pollux

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...

flying008
15 - Aurora

Hi, @AmritaUpadhyay 

 

Maybe you can explain your want by a sample case detail?

Ben_H
11 - Bolide

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

arunkumark_21
8 - Asteroid

Hi @AmritaUpadhyay 

 

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

Labels
Top Solution Authors