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.

Using dynamic input tool to rename input files

Schajin
5 - Atom

Hello alteryx community, 


I am relatively new at this and could use some help. 


I currently have a flow that pulls on ~30 input files. Each week I receive 30 new input files and need to run the same flow again. Right now, I am manually selecting each input tool and changing the file path to the new file, but I think there should be a way to automatically update the files paths using the dynamic input tool!?

 

The 30 files sit in a directory like c\schajin\data\20NOV\file1.txt

 

Each week 30 updated files (identical file names and data structure) are added in a new folder c\schajin\data\27NOV\file1.txt

 

Instead of changing each of the file paths in the input tool from 20NOV to 27NOV, is there a way to use the dynamic input tool so that I just have to provide the new sub-folder name once and it automatically updates all the input tools?

 

Thank you so much!
Schajin

4 REPLIES 4
atcodedog05
22 - Nova
22 - Nova

Hi @Schajin 

 

Is 20NOV and 27NOV the current date or similar logic is used.

atcodedog05
22 - Nova
22 - Nova

Hi @Schajin 

 

Another workaround would be to use directory tool till c\schajin\data\

 

Directory tool will give you all the folders and files and it alo gives you timestamp

atcodedog05_0-1606284323108.png

 

Based on timestamp(LastWrite) you can filter the latest file and load the path to dynamic tool.

 

Here is a resource on it.

https://help.alteryx.com/current/designer/directory-tool

 

Hope this helps 🙂 Feel to ask if you have any questions


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

Schajin
5 - Atom

Hi atcodedog05, 

 

the date will not always be the current date and updates are run at irregular intervals, so there will not be a logic to the renaming. 

 

I was thinking I would create a text input where I type the new file path parameter, e.g., "03DEC" and then the tool would automatically update all the input file paths. That way I only have to type it once vs 30 times and avoid making errors.

 

Will try playing with the dynamic input tool and come back here with more questions if I have them. 

 

Thanks!

T_Willins
14 - Magnetar
14 - Magnetar

Hi @Schajin,

 

Another option is to convert the workflow to an app and use the Folder Browse tool to update the Input tool.  If you need more information on Analytic Apps, there are Interactive Lessons in the Academy or reach back out to the community and we can help.

Labels