Created
December 11, 2011 20:37
-
-
Save tdegrunt/1462607 to your computer and use it in GitHub Desktop.
ZSH: zmv example, renames files, uppercase base name, lowercase extension
This file contains hidden or 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
zmv '(*.mkv)' '${(U)1:r}.${(L)1:e}' # current directory only | |
zmv '(**/)(*.mkv)' '$1${(U)2:r}.${(L)2:e}' # recursive traversal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
zmv '(??).mkv' 'S01E$1.mkv'
zmv -n '(??)*.avi' 'S01E$1.avi'