Rename multiples Word file base on key value in Excel data

How can I rename files in a folder to its corresponding values using key, key may not be exact to the file name part but both the keys and part of the file name has similar name which is A1.

Cheers

Hi @superpunchypp ,
You need rename multiples file base on old name ?
Could you please talk more about requirements
or show input and expect output
regards,

MASTER FILE.xlsx (19.5 KB)
1.File- A2.docx (15.4 KB)
1.File- A1.docx (15.3 KB)
the file which i sent the key may not be exact to the file name part but both the key and parts of the file name has similar name which is A1 or A2, so i want it to change to its corrsponding names, i think could use the position of the common name which is A1 or A2 im not sure.

Cheers

Hi @superpunchypp ,
eg:
‘1.File- A1.docx’ will be rename to ‘John.docx’
‘1.File- A2.docx’ will be rename to ‘Tom.docx’

that’s right?

1 Like

‘1.File- A1.docx’ will be rename to ‘1.File- John.docx’
‘1.File- A2.docx’ will be rename to ‘1.File- Tom.docx’

just change the A1 or A2 to the name

1 Like

Oh, I see it, it’s too easy,
we can use if file name contain to rename

could you show me your UiPath process as im still quite new

Ok, wait me, I will code for you

1 Like

any updates

cheers …

Hi any updates on this thanks!

Hi @superpunchypp ,
Rename.zip (68.5 KB)
You can check it
hope it help,

1 Like

Hi could you explain each part and how it works , thanks

Cheers

Also i noticed that you used the position from right and left, because some files name might be long, in excel file the 2nd and 3rd position will always be the same as the last 2 position in the docx file name is it possible to change to this?

I will take the amount you gave me
That is extracting the “Key” to rename and get the value in the Excel file
What are your file names? Can you provide more and complete?
I believe that’s correct because I took the ending and removed the “.docx” part, will this ending be correct for all word files, is there a file in “.doc”,…?

3.Letter of appoint.docx (13.8 KB)
4.ABC Declaration Form- A1.docx (22.9 KB)
I have these 2 extra files one does not need rename but will it skip it and the other file one needs but since its spelling is longer i dont think it works now. do let me know

Cheers

Any updates

Cheeerss

3.Letter of appoint.docx
it’s not match with anything in “Key”
→ keep
4.ABC Declaration Form- A1.docx
with my way → will get “A1”

1 Like

Hi, now i got a new issue, because in my new excel there is same A1 but different meaning, E.G. one of the row key is the next row is , but since now it kept taking the Date and saying “Rename File: The source file does not exist.” Do let me know how to fix this after that is done

Cheers

I need a specific request so it can be processed
I want to know if the previous problem has been resolved
If there is another problem, you can create another topic

Ok if i create another one but is using this same proccess, do i create new one?