How can I bulk rename multiple folders using a CSV file?

November 18, 2025 3 answers
Asked by CuriousCoder92
I'm looking for a way to bulk rename hundreds of folders based on a CSV file I have. The CSV contains the full paths for the original and the new folder names. For instance, one entry in the CSV might show 'C:dumpfolder 1' as the old folder name and 'C:dumpfolder renamed' as the new name. The structure lists multiple subfolders, all with their complete paths instead of just the folder names. Do I need to adjust the CSV to show only folder names for the subfolders? What would be the best script to use for this bulk renaming task?

Answers

TechSavvyMarv
You can actually use a simple Windows batch file for this! Just generate the commands needed with an Excel formula based on your CSV. Remember to rename the subfolders first before the parent folders to keep everything organized!
Reply to this answer
PythonWhiz87
If you're comfortable with Python, here's a quick script you can use: ```python import csv import os with open(r'c:pathtocsv.csv', newline='') as f: reader = csv.reader(f, delimiter=',', quotechar='"') for src, dest in reader: os.rename(src, dest) ``` This will read your CSV and rename the folders as you need!
Reply to this answer
PowertoyUser
You might want to check out PowerRename, which is included in PowerToys. It's said to be great for this kind of bulk renaming. Just keep in mind that it's more of a regex-based tool, so you might have to figure out the regex yourself if your paths are complex.

RegexMaster99: Yeah, it's powerful for sure! Just remember it doesnโ€™t have a direct feature for processing a CSV; youโ€™ll still do some setup to make it work how you want.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions