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.

Rolling over a file

vj28
8 - Asteroid

I'm in the process of automating a daily workflow, which when done manually goes like this : a file (say "process file 23/02/2025.xlsm") is opened, changes are made and the file is saved as "process file 24/02/2025.xlsm" (i.e a new file with the current date in it's name is made while the original file is kept intact) .

 

I'm not sure how to do this in alteryx. Note that the file has macros and formulas which shouldn't be affected. 

5 REPLIES 5
OTrieger
14 - Magnetar

@vj28 
Ok, if I understood correctly the question.

You can use a Directory tool, and then add a Formula Tool to get Today-1, put a Filter tool and then you will get the file from the prior day. Now you will send this file into a Batch Macro or Dynamic Input tool, and Renaming the file in the output path with your current date.
You could do it with RegeXReplace, or just hard coded the file path name using the Today function. 

vj28
8 - Asteroid

@OTrieger "Renaming the file in the output path with your current date." can this be done dynamically? I know the dynamic input tool takes file names dynamically, but how can a dynamic path be provided for the output tool? Thanks for the response

OTrieger
14 - Magnetar

Something on this lines
Path:

"\.....\.....\process file "+[Today]+".xlsm"

So while it is hard coded, you have the variable today which will give you the current date.

You will only need to format the data from 2023-02-2025 to 24/02/2025 

dwstada
11 - Bolide

one addition to OTrieger, after you create the filepath string using a formula tool like they suggested, use this option in the output tool with your newly created filepath column

 

vj28.PNG

vj28
8 - Asteroid

@OTrieger Thanks, but I should've been more specific about my issue : 

 

My workflow involves opening an existing file (say "process file 3/3/25.xlsm") that has three sheets, making changes to each sheet separately and then renaming the file to process file 3/4/25.xlsm 

 

Right now how I'm doing this is manually making a copy of process file 3/3/25.xlsm , in that copy making changes to each sheet in alteryx and then manually renaming the copy to process file 3/4/25.xlsm 

 

The solutions you and @dwstada suggested works when creating new files with single sheets, but overwriting existing files with MULTIPLE sheets and changing the date of that full file; how would I accomplish that?

 

 

Thanks again for the responses!

 

 

Labels
Top Solution Authors