Skip to content

Instantly share code, notes, and snippets.

@k4gdw
Last active August 29, 2015 14:25
Show Gist options
  • Save k4gdw/0748b3b5002d5fb1d101 to your computer and use it in GitHub Desktop.
Save k4gdw/0748b3b5002d5fb1d101 to your computer and use it in GitHub Desktop.
A batch file (.cmd) to rename files to change underscores in the file name to spaces.
@echo off
REM I found this code here: http://k4gdw.us/1CSwWRX (StackOverflow)
setlocal enabledelayedexpansion
for %%a in (*_*) do (
set file=%%a
ren "!file!" "!file:_= !"
)
@k4gdw
Copy link
Author

k4gdw commented Jul 23, 2015

I found this code on StackOverflow and thought it should be in a gist.

@k4gdw
Copy link
Author

k4gdw commented Jul 23, 2015

I added a remark in the file to point to the original StackOverflow article.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment