Can any one please tell me How to rename all files in a folder using UI Path?

Can any one please tell me How to rename all files in a folder using UI Path?

1 Like

Hi welcome to the community!
You can get all file names like this: Directory.GetFiles(“c:\folder”) and assign it as value for a string array type variable, then you a for each with that same variable, inside the loop you use move file activity and use item as source and the new filename as destination.

1 Like

Hi @madhan_pm,
you can also do this by using Command Prompt

use “Start Process” activity and pass arguments as specified in the above link. This maybe a little bit faster when comparing with iterating on the file list.

Thanks

I would suggest to use LongPathTool program. It resolves problem regarding source path too long.