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.

Add Date/Time to Input File after Workflow ran

rockeylearning
8 - Asteroid

Hello Community!

 

Is there a way to add date/time stamp to the Input file after the workflow ran? I did a search but I don't see anything close to renaming the Input file.

 

My Input file always have the same name, and after the workflow run, I need to add the date/time stamp, as every day a new file is drops in the Input folder. 

 

Thank you!

4 REPLIES 4
Deano478
12 - Quasar

Hey @rockeylearning fist you need to use a Foemula tool to create a new field called Filepath or something like that and in there provide the location of where the output file is so for example it would look like this: 

"C:\Users\Tom.Test\Documents\Altyerx Output\123"+DateTimeFormat(DateTimeNow(),"%d%m%Y")+".xlsx|sheetname"

Then  at the bottom of the output file config you will need to check the little box that says Take File/Table Name From Field and then in the drop down underneath choose 'Change Entire File Path'. and in the last box choose the filed File path that you created in the formula

 

NOTE: If output is on share drive use the UNC path

ed_hayter
13 - Pulsar

Are you worried about the file being replaced by a new file everyday? In other words File1.xlsx comes in everyday so without renaming File1.xlsx from the day before then File1.xlsx will overwrite the old file each day?

 

If so rewriting the file with DATETIMETODAY() added to the filename would ensure when you run it the next day it targets the new file.

 

image.png

rockeylearning
8 - Asteroid

@ed_hayter yes, that's correct, I don't want the File1 to be overwritten the next day when a new file drop. I will test out your method.

rockeylearning
8 - Asteroid

@Deano478 thanks, I'll try your method as well

Labels
Top Solution Authors