Saturday 8 November 2014

Bulk Filename Rewriting

In zsh you'll find zmv (autoload zmv) and in zmv it's easy to rewrite bulk files.  For example, I had some downloaded files that were something.mp3?id=8795294528 etc and wanted to cut off the cruft at the end.

zmv '(*.mp3)*' '$1'