Created
April 3, 2014 13:43
-
-
Save Daniel-Wiedemann/9954599 to your computer and use it in GitHub Desktop.
Windows Command Line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To add a prefix to filenames in an folder. | |
1. open the command line window | |
2. go into the folder where are the files to add the "_prefix" | |
3. FOR /r "." %a in (*.*) DO REN "%~a" "prefix%~nxa" | |
You can also define which files should get prefixed | |
eg. only .txt files | |
FOR /r "." %a in (*.txt) DO REN "%~a" "prefix%~nxa" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To add a suffix to filenames in an folder. | |
1. open the command line window | |
2. go into the folder where are the files to add the "_suffix" | |
3. for %a in (*.*) do ren "%~a" "%~na_suffix%~xa" | |
You can also define which files should get suffixed | |
eg. only .txt files | |
for %a in (*.txt) do ren "%~a" "%~na_suffix%~xa" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment