Skip to content

Instantly share code, notes, and snippets.

@delucis
Created May 11, 2017 19:15
Show Gist options
  • Save delucis/928387f530d9e7ed3c3ebf220e09a3de to your computer and use it in GitHub Desktop.
Save delucis/928387f530d9e7ed3c3ebf220e09a3de to your computer and use it in GitHub Desktop.
Bash rename multiple files
# use string replacement to rename parts of all matching filenames
# based on http://stackoverflow.com/questions/7450818/rename-all-files-in-directory-from-filename-h-to-filename-half
for file in *.wav; do mv "$file" "${file/selection/substitution}"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment