Alteryx Designer Desktop Discussions

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

Rename File Dynamically and Copy to Different Path

KamenRider
Bolide

Hi Guys especially to @DavidP 

 

I found your sample workflow and would like to ask for the configuration of the copy template.bat. I do have a formatted template where I wanted to be rename and copy it to other folder. The format of the name changes everyday because I'm using formula "DateTimeToday()".

 

Rename.JPG

 Hope to hear any answer. Thanks for the assistance.

 

Kamen

14 RÉPONSES 14
Felipe_Ribeir0
Nébuleuse

Hi @KamenRider 

 

Maybe this topic could help you: https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Batch-macro-to-filter-countries-and-ou...

 

It is a different approach (using python), but it works.

 

If you want a direct link to the macro that is doing it: https://community.alteryx.com/t5/Community-Gallery/Copy-files-between-folders/ta-p/1056621

 

 

KamenRider
Bolide

Hi @Felipe_Ribeir0 

 

Thanks for the suggestion. My concerned now is how to rename the copied file with blob tool on it. Can you help me please?

 

Kamen

Felipe_Ribeir0
Nébuleuse

Hi @KamenRider 

 

Test this workflow, it is not using the blob tool to rename.

 

https://community.alteryx.com/t5/Community-Gallery/Copy-files-between-folders/ta-p/1056621

 

You can just feed the macro with the current filepath and the new filepath (renamed) and it will work.

Felipe_Ribeir0_0-1674060704164.png

 

 

KamenRider
Bolide

Hi @Felipe_Ribeir0 

 

I tried your file renaming macro using python and I'm somewhat lost with the formula. Can you or someone to please assist me to correct it. Sample new name format is 2023-01-19_Thailand New Report.xlsx.  The error shows below.

 

NewFilename.PNG

Also is it possible to connect the renaming workflow as shown below. The goal is to copy the file to designated folder and rename.

 

Connect.PNG

Please advise. Thanks.

 

Kamen

KamenRider
Bolide

Hi @Felipe_Ribeir0 

 

Below screenshot shows the error when I run the workflow for the 2nd time. This time the file is existing and would like to update it by overwriting. Please advise if there is something we can do to fix your macro.

 

Error for 2nd run of workflow.PNG

Hoping to hear from your the soonest.

 

Thank you for your continued assistance.

Kamen

Étiquettes