How to rename a file using the "Copy/Move Files" node

Hi,

how can I rename a file using the "Copy/Move Files" node? 

Using the "List Directory" node + "URL to File Path" node + "Copy/Move Files"  I'm able to copy or move the file.

But I don't understand how to rename a file using the "Copy/Move Files" node.

Thanks!

Rename = Move. Just change the filename but not the path up to the filename.

Thank you very much Thor!

I'm sorry, I didn't get it. 

I use List File node + URL to File Path node + String to URI node + Copy/Move File node. I managed to try copy or move file from one folder to another folder but still not able to rename a file. 

Please advice. Thank you.

LM

@LM, I just got it working using some Java code for passing target path and do some filename cleaning / renaming.

The key is passing the Source and Target URIs in the Move/Copy node.

Look at the attached image to have an idea.

Hope it helps.

Angelo

 

 

List File node + URL to File Path node + String to URI node

As a side note: I believe you can use the "List Remote Files" node to directly get URIs.

Can you share your WF please?

Hi there @EvgeniyKvitnitskiy,

as @AngeloDV said some manipulation before Copy/Move Files node is needed. Here is workflow example which you can check. If any question feel free to ask.

https://kni.me/w/G_CxdyjiyMw5ijXY

Br,
Ivan

1 Like