r/PowerShell • • Nov 19 '25

Question Help with folder rename script

Hello, Looking to bulk rename 100s of folders. I have a CSV which contains the full folder name

E.g

C:\dump\folder 1

and next to it what i would like the folder to be renamed, again full folder path rather than just new name

C:\dump\folder renamed

This CSV structure contains multiple sub folders all listed with full folder path rather than just folder name

What would the script be to bulk rename them

CSV titles are old and new

Do i need to ammend so its not full folder path but just folder name for the subfolders etc.

Thanks

4 Upvotes

5 comments sorted by

View all comments

Show parent comment

3

u/ashimbo Nov 19 '25

FYI, you should format your code when including it in your comment or post. Also, you should edit your post to include the code and what happens when you run the code.

Also, before running something like this, create or copy the folders in a new location, and edit the .csv to reflect the new location. You do not want to test something like this in production.

With all that said, what happens when you run your script?