We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Rename a file after a Dynamic input tool

SWerbecki
5 - Atom

Hello!   

I'm feeding a dynamic input tool a file path that I am constructing with a formula tool.   

I want to rename this file after I read it with the Dynamic input or at the end of the workflow. 

For example:

File name: Mydata_07212025.txt

Rename to: Processed_Mydata_07212025.txt

 

Thank you!

 

 

5 REPLIES 5
abacon
12 - Quasar

@SWerbecki I would try this, just append the desired text in front of the filename field in a formula tool.

 

Bacon

 

image.png

HannahBrauer223
6 - Meteoroid

My first thought was to use a Block Until Done tool so that you can read back into the same file to give it a new name. However, since the name is changing, it won't find the original file but instead create a new file with the new name. Is that an option? Or you could add a row or column in the existing file that says "processed". My final thought it to use another RPA type software that checks to see if an output exists related to that file, then rename/move/delete the original file. 

 

Hannah Brauer

Crowe LLP

jrlindem
11 - Bolide

If you're trying to rename the original source file, after it's read and pulled into your workflow:

The solution I would recommend is:

  1. Read the file into your workflow
  2. Use run command tool to rename and/or move the file
  3. Optional:  Use another run command tool even later in the workflow to remove or archive the original source file depending on your needs

 

jrlindem_0-1753210415113.png

 

Bottom line is you can use command prompt language via the run command tool to manipulate files on your computer!

 

jrlindem_1-1753210830154.png

 

SWerbecki
5 - Atom

Thank you for the solutions!  

Gaurav_Dhama_
12 - Quasar

You can read the file as normal, also import the file full path.
Towards the end of your workflow when you are writing an output, use a block until done and attach an append tool to its 2nd or 3rd anchor.
on source side of append tool, join the input tool file path. Ensure that you take out only one row, use unique or summarize or sample, that will be your choice.
After the append tool use the run command tool to rename the file.

This method will ensure that your whole process run successfully then only rename the file to processed.

Labels
Top Solution Authors