cancel
Showing results for 
Search instead for 
Did you mean: 

Rename and Move file do not work

Anonymous
Not applicable

Hi,
There are some files in a folder. I need to rename the file with today's date (For example: 05.05.2023_File Name). So, I used "copy file" to copy the file with new name. Then I used "delete file" to delete the old file. And finally, I used "move file" to move the file to another folder. Unfortunately, copy and move file do not work in my workflow. But delete file is working. Can anyone tell me where is the problem?

35556.png
35557.png

35558.png

35559.png
35560.png

1 BEST ANSWER

Helpful Answers

Mukeshh_k
MVP

Hi @Ekram Shihab - You can use both options - Copy File & Move File to Copy and Rename but you would have give proper name and extension - let's say for example - I wanted to move a Test.PDF from Folder A to Folder B and wanted to rename this file to Test2.PDF - I would do so by using Move File (If I don't want a copy in the original file location/wanted to delete the original file) or Copy file (If I want to have a original file in the source location or original file location):

35552.png
------------------------------
Kindly up vote this as "Best Answer" if it adds value or resolves your query in anyway possible, happy to help.

Regards,

Mukesh Kumar - Senior Automation Developer

NHS, England, United Kingdom, GB
------------------------------

Regards,

Mukesh Kumar

View answer in original post

5 REPLIES 5

HI Ekram Shihab,
Looks like  the destination path was incorrect you just need to give the foldername inthe destination path instead of giving the path including the filenam

It should be some thing like below.
"C:\***************\project 1\saved email"

-----------------------
If I answered your query. Please mark it as the Best Answer

Harish Mogulluri

Anonymous
Not applicable

The thing is that I need to rename the file name. But there is no option to rename the file in Utility- File Managemement. That's why I tried to rename the file using "copy file". What I understand from your information is that  using "copy file", I cannot rename the file. Is this right?

Mukeshh_k
MVP

Hi @Ekram Shihab - You can use both options - Copy File & Move File to Copy and Rename but you would have give proper name and extension - let's say for example - I wanted to move a Test.PDF from Folder A to Folder B and wanted to rename this file to Test2.PDF - I would do so by using Move File (If I don't want a copy in the original file location/wanted to delete the original file) or Copy file (If I want to have a original file in the source location or original file location):

35552.png
------------------------------
Kindly up vote this as "Best Answer" if it adds value or resolves your query in anyway possible, happy to help.

Regards,

Mukesh Kumar - Senior Automation Developer

NHS, England, United Kingdom, GB
------------------------------

Regards,

Mukesh Kumar

Mukeshh_k
MVP

Also for adding date to the new file name - I would create an expression like this and put this new file name along with the destination folder path * (Date “/“ can be replaced by “_” or “” to follow naming standards, Just put replace outside of below expression again and give arguments - Save this whole expression to New File Name Data Item - 

see below for expression:
35553.png

Regards,

Mukesh Kumar

Anonymous
Not applicable

For adding date with the file name, I created a data type as text. Then using calculation, I have found out the date and stored in the text data type.35554.png

35555.png