Alteryx Designer Desktop Discussions

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

List of File names and Content in it

mohit9garg
8 - Asteroid

Hi,

 

I have thousands of large excel files in a folder and each file contains data for a particular person. Eg, File 1 is for person A, file 2 is for person B..etc

 

Now I need a mapping of file name and person's name whose data is these in the file. Can someone help me with a workflow.

 

Thanks

Mohit

13 REPLIES 13
mohit9garg
8 - Asteroid

@Qiu  yes all the files are in .txt format.

 

Wondering, If I use Batch macro, which you gave me; do I need to make any change in it.

cgoodman3
14 - Magnetar
14 - Magnetar

In your original post you ask how to get an output with the file name and the person’s name.

 

Depending on the number of files, and to avoid using a batch macro you could just do the wildcard input like you already have set up. This will union all the data into one input. In the input tool configuration also select the option to output filename as a field.

 

Then in your workflow, use a summarise tool to group by Filename (the newly created field) and group by Name (the field containing the person’s name) and that will get you your desired output.

Chris
Check out my collaboration with fellow ACE Joshua Burkhow at AlterTricks.com
mohit9garg
8 - Asteroid

@cgoodman3 I hope you mean like below. But considering number of files and I need to run this workflow daily; I would prefer Dynamic Input.

 

Or let me know if this is only possible by Batch Macro.

 

mohit9garg_0-1611646071838.png

Thanks for sharing your website; this will definitely help me to overcome from my macro phobia.

cgoodman3
14 - Magnetar
14 - Magnetar

What I mean is this:

cgoodman3_0-1611653709578.png

 

1) in the file input add an asterix in the file path so that it acts as wildcard to read in all .txt files in that directory.

2) select output file name as a field

 

On the website there is this new post on resources for batch macros.

Chris
Check out my collaboration with fellow ACE Joshua Burkhow at AlterTricks.com
Labels