Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Create Folders and Subfolder

amitanthem145
5 - Atom

Hi,

 

I want to create a folder when I enter name in the input box. Like If I enter AK1. AK1 folder should generate. 

 

amitanthem145_0-1644832176222.png

When I create AK1, subfolders TeradataExtracts and workspace should be generated, like-

amitanthem145_1-1644832433201.png

And in workspace, folders should be generated for current datetime like this-

 

amitanthem145_2-1644832525502.png

And in datetime folders for we have to write data example.xlsx. All steps are like mkdir.

 

Thanks 

 

 

 

2 REPLIES 2
mbarone
16 - Nebula
16 - Nebula

Hi @amitanthem145 .  The way to do this with Alteryx is to use the Run Command Tool (links to Tool Mastery Index, but here's a link to the help files for the tool as well).  First create your paths using some combination of a formula tool or even a directory tool.  However you want to dynamically create those full paths - up to you.  You would create a .bat file with a mkdir command for each one you want.  And then the Run Command tool will execute that .bat file.


So the .bat file would have have a bunch of lines like this:


mkdir "M:\Avg_SD_Trend_Vars\Data\Archives\2022\2022_01"
mkdir "M:\Model_Outputs\ASODiscountSensitivity\ToBeScored\Scorecard_Data\2022\2022_01"
mkdir "M:\Model_Outputs\ASORetention\ToBeScored\Scorecard_Data\2022\2022_01"

 

And then the you'd connect that to the Run Command tool and configure it per the links above.  Give it a shot and let us know if you have any trouble.  

Labels