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.

moving old report/file to archive before running the workflow

Alteryx_user_aK
8 - Asteroid

Hi,

 

I have scheduled a workflow which runs every Friday creating output file (CSV) with datestamp. when the scheduler run on next Friday, the file created on previous Friday should be archived (removed from current location) in archive subfolder (in same dir).  Since file name is changing every week, I can't sue run time command option.

 

basically, at any given time the folder should keep latest report only.

 

Please let me know how to work on this task

 

Thanks in advance

 

AK

 

 

3 REPLIES 3
Felipe_Ribeir0
16 - Nebula

Hi @Alteryx_user_aK 

 

One way of moving files between folders is by using this macro: https://community.alteryx.com/t5/Community-Gallery/Move-files-between-folders/ta-p/998936

 

Christina_H
14 - Magnetar

The two ways I know of copying a file to a new location are either to use a Run Command tool or Blob Input/Output.  In either case you're going to need the correct file name, but you can either create the filename by calculating the previous report date or use a Directory tool to check the folder.

 

However you also want to delete the original file from the folder.  You can't do that with Blob tools as far as I know, but you can with Run Command.  Again, you'll need the correct file name.

Piyali_517
5 - Atom

Hope this helps

Labels