Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Input File - AUDIT Issue

AnkitDesai
6 - Meteoroid
Hello, Is there a way to move the input file from one folder to another once the workflow is completed. Things I am looking out for : 1. Move the Raw file from the Input folder to a different folder say Input1, post the workflow is completed ( so that there are no chances of using the same Input file for the next run) 2. Simultaneously, save the Raw input folder with today's date for future Audit requirements I was able to get it rename the Raw file with today's date but unable to perform first Step. Please help to check and assist on same. Thanks
5 REPLIES 5
JoeS
Alteryx
Alteryx

Hi @AnkitDesai 

 

With Alteryx is the Run Command tool, you can use this to external applications/processes. I'd use this to run a batch file that did the rename/move process.

 

You could use Alteryx to write the batch file if necessary, or if you were able to write a generic script, you can execute it via the events within a workflow.

 

This doesn't quite do exactly what you are after, but hopefully gives you a good start, but let me know if you still need a hand:

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Using-Run-Command-to-Move-files/td-p/8...

AnkitDesai
6 - Meteoroid
Hello Joe, Thanks for sharing the below article. I am just confused with respect to bat file creation, could you please help to elaborate on same?
JoeS
Alteryx
Alteryx

Sure, that will teach me to be a little lazy and not answer properly!

 

If you create a batch file that looks like:

 

cd "C:\Users\jstrellis\Dropbox (Alteryx, Inc.)\MyDocuments\Community\RenameFolder"
Ren "OrignalName" "OrignalName_%date:~6,4%%date:~3,2%%date:~0,2%"
mkdir "C:\Users\jstrellis\Dropbox (Alteryx, Inc.)\MyDocuments\Community\RenameFolder\Rename"

 

And then run this as an event after your workflow has finished, that should do the trick.

 

cd changes the directory to the parent folder you are working in.

ren will rename a folder in that directory, in my example above I have the folder OriginalName, that gets renamed to add "_YYYYMMDD" on the end of it.

I then make the original folder again.

 

I think that should do what you need.

AnkitDesai
6 - Meteoroid

thanks Joe, just tweeked and created a bat file  and wohhoooo, files moved.

 

Thanks again for your help....

JoeS
Alteryx
Alteryx

@AnkitDesai wrote:

thanks Joe, just tweeked and created a bat file  and wohhoooo, files moved.

 

Thanks again for your help....


Great stuff, glad you got it working!

Labels