Alteryx Designer Desktop Discussions

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

Copy and Paste Excel from one folder to another and add date

Wixard
8 - Asteroid

 

Hi all,

 

Have searched the forum and found a few similar solutions, but they either do not work for me when I hit run, or are massively convoluted for what I thought was a simple process.

 

I would like to copy and paste an Excel workbook from one folder to another - and for the pasted workbook add current date in the format DDMonYY - e.g. 27Jul21. So obviously would have to be dynamic.

 

So input file: Workbook.xlsx (stays in the same folder untouched)

Output file: Workbook 27Jul21.xlsx (copied to a different folder)

 

Wondering if there was an easy way of doing this using max 4 or so tools/connections?

 

 

Many thanks!

16 REPLIES 16
atcodedog05
22 - Nova
22 - Nova

Hi @Wixard 

 

I have a method for you. Something I picked up from @AkimasaKajitani cant be thankful enough.

 

Workflow:

atcodedog05_0-1627409677157.png

 

1. In blob input tool configure the template file.

atcodedog05_1-1627409462585.png

2. In formula tool set the new filepath. This way we can generate filenames with date.

3. Configure the blob output tool to output the file to the location taking it from the field.

atcodedog05_2-1627409529887.png

 

Try and let me know.

 

Hope this helps : )

 

Wixard
8 - Asteroid

Hi @atcodedog05 

 

This looks super promising - only problem is when I try and download your canvas says "couldn't download - no file"

atcodedog05
22 - Nova
22 - Nova

Try this @Wixard 

Luke_C
17 - Castor

Hi @Wixard 

 

@atcodedog05 blob method is super simple, here is the other option using the run command tool. You just need to update the directory and some of the formulas to use your file paths:

 

Luke_C_0-1627410403384.png

 

Wixard
8 - Asteroid

@atcodedog05 

 

Absolutely brilliant! This is exactly what I was looking for!

 

Could I ask for one more thing, if its possible that is. Is there a way of just taking the original file name without having to hard code it directly in formula tool?

 

In other words, no matter what the file is called, it will just replicate what the file was originally called, and then stamp the date as per your solution.

Wixard
8 - Asteroid

Thanks a lot @Luke_C 

Wixard
8 - Asteroid

Is it possible to use Wildcards in the Blob input tool?

 

For example Workbook*xlsx

 

I don't seem to be able to make it work

 

atcodedog05
22 - Nova
22 - Nova

Hi @Wixard 

 

Use the wild card in directory tool to get the full names of the files and then pass it to blob tool. 

 

Hope this helps : )

Wixard
8 - Asteroid

Thanks for the super quick reply. I'll give it a try!

Labels