Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Copy Files from Multiple Folders into One Destination Folder with certain conditions

geeklarokcmie
8 - Asteroid

I need help with the below two workflows

 

1) To copy all files whose names start with "Detail" and created date is between 09-01-2025 to 09-30-2025 from one folder path (including subdirectories) into a single destination folder

 

2) To copy all files when created date is between 09-01-2025 to 09-30-2025 from one folder path (including subdirectories) into a single destination folder and add the created date in the file name.

 

Let me know if this can be achieved via Alteryx. Thank you

3 REPLIES 3
abacon
13 - Pulsar

@geeklarokcmie Yes this is possible. The filtering of the folders is quite easy actually. Use a directory tool, select include subdirectories. Then in the data flow, use a regular filter tool to filter to your specific criteria. The directory tool output is the metadata on each file brought into the data flow so you can filter on the file name, created date, modified date, etc.

 

Now, copying files from one folder to the next is technically not native to Alteryx, however, you can use python within the workflow to do this. What I would do is pull out the files you need, pass into a python tool, then use python to copy the files fed into it to the desired folder. I am not a python wizard so I can't whip up a script to do this off the top of my head but from what I remember, it's not a super difficult script. When I used the python tool heavily, I was able to put together scripts quite easily using web searches and our company's AI LLM (copilot).

 

This will do exactly what you need all within the Alteryx workflow.

 

Bacon

dreldrel
9 - Comet

Apart from Python tool, you can usethe  run command tool to move or copy files as well

https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Move-file-with-Run-Command-too...

geeklarokcmie
8 - Asteroid

My colleague was able to assist me with the solution. Appreciate your responses. 

Labels
Top Solution Authors