Naming files within specified folder

I have the following situation now: Within a given folder, I would like all files to have the same names, differentiating only by the (#). Example: “Test”, “Test (1)”, “Test (2)”, …, and so on until all files in that specified folder have the same name.
Any suggestions on how to do it?

Hi @
I would suggest you use this sequence:

Get folder content and save all file names into a list variable “filenames”
For each element from “filenames”:

Replace text in element “Test<counter>” (or whatever your new filename should be) and write it into “filenamenew”
Increase counter+1
Keystrokes Win-R
Keystrokes cmd.exe
Keystrokes ENTER (opens DOS command prompt)
Keystrokes “ren element filenamenew” (use the DOS command for renaming files, remember you need to add the filepath before both filenames)
Keystrokes ENTER

I believe there is no other way yet to rename files and you need to go via the DOS command as they said here:

Hope that helps!

Sorry I cannot send you a script as my RPA Express is not working :frowning:

1 Like

It’s already a big help. Thank you very much

1 Like

One more hint: as the keystrokes command is quite slow I recommend putting the whole command for renaming of the files into a variable (e.g. “commandline”), then copy that variable to clipboard and use CTRL-V in the command prompt instead of typing it letter by letter. That is much faster.

1 Like

Hi Tim! What is the problem with your RPA Express?
Did you log a ticket for our customer support tea at rpaexpress@workfusion.com ?

Hi Alesia
the same one I had previously reappeared. I have not yet logged a ticket