obda.net

Convert Filenames Recursively to Lower Case

Add a comment

cheat-sheet articles are about code snippets that I need every once in a while, and which I constantly forget about.

Use zmv to recursively convert the names of all files and (sub-) directories within the current directory to lower case:

autoload zmv
zmv '(**/)(*)' '$1${2:l}'

If you want to convert to upper case instead of lower case, use :u instead of :l.