Alteryx Designer Desktop Discussions

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

Directory tool does not expand the data

Manjari
8 - Asteroid

Hi All, 

 

how to extract the data from Directory tool. I get the File attributes and not the actual data. 

how can I get the data from Directory tool. 

Also, The input tool does not pick all the files from the folder, hence I cant use the input tool. 

 

5 REPLIES 5
Sebastiaandb
12 - Quasar

@Manjari 

Here you go!

 

Sebastiaandb_0-1645106502700.png

 

 

You need to use a macro and within the macro, you have to set the action tool the right way :-). It's just a batch macro that takes all filenames from the directory tool.

 

Hope it helps,

 

Greetings,

 

Seb

Luke_C
17 - Castor

Hi @Manjari 

 

To add on to @Sebastiaandb 's solution. This is expected behavior of the directory tool. You can pass it through to a batch macro as demonstrated above, or alternatively to a dynamic input tool.

 

Did you try using a wildcard in your normal input tool? For many file types this should work if the schema is consistent. For example, instead of specifying a specific file you can do C:\Filepath\*.csv and it will take all the csvs in that file path. 

Manjari
8 - Asteroid

Hi @Sebastiaandb, I tried your solution, but I find the output gives me the data of the first file (which is linked to the macro to be replaced after every iteration) multiple times. 

 

For eg. Here is a data set example attached: I have 2 files in a folder

1. Chocolate.xlsx 

2. Icecream.xlsx 

 

Chocolate.xlsx is linked to the macro when creating the macro. 

The output I get is:

 

ChocolateFile name
ChocolateChocolate
ChocolateChocolate

The Output is twice of the first file, Since I have 2 files. If I have 9 files with Chocolate will be present 9 times. 

 

@Luke_C : Yes, I tried the wildcard character, I have used it many times in the past It used to pick up all the files in the folder. But unfortunately for the original data set I have it picks 3 file out of 9. Really not sure why.

gabrielvilella
14 - Magnetar

Hi @Manjari, I tested with my macro and I am getting data from both of your files

gabrielvilella_0-1645154964699.png

 

Manjari
8 - Asteroid

@gabrielvilella : Thank you soo much. The macro worked like a charm. 

Labels