How to rename multiple files at once using Excel (Windows)

Karina Adcock · 466K views · 2021 · 5:33

Open on YouTube

Home, DIY & practical skillsPython, Ruby & scripting languagesSoftware (other)tutorial

Why Stack Overflow recommends it

Stack Overflow users link it when answering questions about batch renaming files from a list or generating filename lists with cmd and Excel.

Recommended by 3 people across 3 different months, 2022 to 2024.

What it is

A short Windows tutorial by Karina Adcock showing how to rename many files at once. You build 'ren "old name" "new name"' commands in Excel, then paste the whole column into Command Prompt to run them in bulk.

What people said

Recommends ThorstenG · 2022-12 · Stack Overflow · on “Renaming files from a text list using powershell”

Despite this being an older thread, I wanted to offer another "brute force" option. CodeNagi's reply works well in PowerShell, although it took me a bit to get working. If you already have a list with file names (output.txt) consider using excel (or OpenOffice) and the command prompt cmd. This video is a step by step guide for some of this solution: [this video] Open cmd with administrator privileges. Create a list of your current (old) file names: cd H:\dev\extractedFiles1 dir > input.txt Open the input.txt (e.g. in Notepad). It should look like this: Volume in drive H is Windows Volume Serial Number is C123-4567 Directory of H:\dev\extractedFiles1 05/12/2022 11.24 . 05/12/2022 11.24 .. 05/12/20

Recommends Jesse · 2023-03 · Stack Overflow · on “How to rename files within subfolders in my working directory using Command Prompt”

I did eventually figure this out for anyone who may have the same issue. It may not be a single line of code, but it's what I could figure out by myself and still saves me a ton of time when I use it. To rename a single file with the name of its folder: cd subfoldername & ren "fileinsubfolder.pdf" "subfoldername.pdf" & cd.. Run this in the parent folder. It's actually 3 commands stitched together with "&". "cd" tells it to change directory to subfolder "subfoldername", then "ren" renames the file, then "cd.." changes the directory back to the parent folder (1 step forward in the directory tree, action, 1 step back in the directory tree). To rename all files within every subfolder, I used Exc

Recommends Deuteronomy93 · 2024-01 · Stack Overflow · on “Dir.bat equivalent that recognises Chinese characters”

I found a way based on this video: [this video] In the folder's explorer bar type "cmd" then press enter. Type "dir /b" then press enter. The result gives you the list of filenames in the folder, which includes Chinese characters. It doesn't give the full file path however.