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

Dynamic rename Input files when processed?

Hamder83
11 - Bolide

Hi 

Ive been googeling without luck. 

Every month i get lets say 50 invoice specifications from a carrier.
They come between the 1 and the 15.

So when i run the flow, i wanna rename the input file to processed - so i can exclude processed files in the inport.

But im not sure how to do this? 

Of if this is even the smartest solution?

 

12 REPLIES 12
DavidP
17 - Castor
17 - Castor

You could do this with the Rub Batch Command Tool. 

 

You can write a small (DOS) batch file to rename the file and execute the batch file with the Run Batch Command Tool

afv2688
16 - Nebula
16 - Nebula

Hello @Hamder83,

 

There are two ways to go with this. Either you could rename the file as you say, or you could have the files moved to a 'processed' folder.

 

For that, after the workflow has been processed I would run an application or leave for last in your actual workflow a run command wich would execute the process.

 

If you want me to make you an example let me know.

 

Regards

Assaf_m
11 - Bolide

Hi,

 

I don't believe you can rename an existing file using Alteryx but I would use the option "Output File Name as Field" and check if the current input file has been processed earlier.

 

Assaf_m_0-1579687720868.png

RolandSchubert
16 - Nebula
16 - Nebula

Hi @Hamder83 ,

 

what about adding an Event to the workflow? You can use a cmd file or a command (RENAME) to rename (or move) the files in the directory.

Would that be an approach?

 

22-01-_2020_11-00-25.png

 

Best,

 

Roland

Jonathan-Sherman
15 - Aurora
15 - Aurora

Perhaps when you read in your invoice could you also bring in the file name? Summarise by file name in a separate branch of the workflow and output append to existing to a table, bring this table earlier in the workflow and join on file name. Records falling out of the left side of the join are invoices you've not previously processed?

Hamder83
11 - Bolide

i Robert 

I have tried for a long time creating a bat file that can move the files for me.

But im clearly not good enough with my dos syntax to make one work.


cause beeing able to do this would solve a lot of issues for us, im many different aspets.

i tried something like this: 

but the run command is clearly not configued correctly:

Hamder83_0-1579688352724.png

Hamder83
11 - Bolide

Hi Jonathan 

That is a good idea 

And it could diffently work.

But when we are done doing the monthly invoicing we move the files ( getting ready for next month ) and to be sure all files are in the summary it would make that part easiere if it had a mark as Processed?

 

 

🙂

Jonathan-Sherman
15 - Aurora
15 - Aurora

A little confused on what you're asking here? Do you mean changing the name of the file to include "processed" or add a second field with "processed" on a separately outputted table I talked about previously? 

DavidP
17 - Castor
17 - Castor

Here's an example of renaming a file from Alteryx with the Run Batch Command.

 

It renames a file called oldfile,xlsx in C:\Test to newfile.xlsx

 

rename with Run Command.png

Labels