Created
October 3, 2017 17:07
-
-
Save mfd/4d854ca7b81aac5b987efaf08860378b to your computer and use it in GitHub Desktop.
Bulk Rename in osx terminal
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
# General format: | |
brew install rename | |
# General format: | |
rename -v s/OLD/NEW/ FILENAMES | |
# Where: | |
# - OLD is a regular expression | |
# - NEW is the replacement pattern | |
# - FILENAMES is a list of files to search/replace | |
# For example, to change all .JPG file extensions to .jpg. | |
rename -v s/\.JPG$/.jpg/ * | |
# To test it without actually renaming any files, use the -n flag: | |
rename -n s/\.JPG$/.jpg/ * | |
rename -nvs searchword replaceword * |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment