Rename files in case the path contains spaces

I get an error when changing the name of a document, perhaps because a folder has space. What would be done in that case?

Thank you!!

“rename C:\Users\admin\Documents\bots\Rename File\RenameFile\oldfile.pdf newfile.pdf”

1 Like

Hello @Jose_Miguel_Almonte

Can you provide the error you are getting? As well can you send a screen shot showing how you are using the “Move File” activity?

Thanks,
Arran

1 Like

If you are renaming a file or directory with a space, the name must be surrounded by quotes.
Try this:

ren "C:\Users\admin\Documents\bots\Rename File\RenameFile\oldfile.pdf" "C:\Users\admin\Documents\bots\Rename File\RenameFile\newfile.pdf"

Hope it helps.

2 Likes