How can I convert all filenames and leading directories to titlecase (proper case) using zmv command.
One starting example I found to start with at :
autoload -U zmv
zmv '(*).(*)' '${(C)1}.$2'
The above would not work if files are within subdirectories.
or here
zmv '(**/)(*)~CVS~**/CVS' '${(C)1}${(L)2}'
To recursively lowercase files and directories where the name is not CVS. This one would try to copy lower-case filenames to title-case directories (which does not yet exist and hence would not work either.
The following works well if trying to convert to lowercase (from https://stackoverflow.com/a/152741/631775):
find my_root_dir -depth -exec rename 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \;
But I would like to make proper case here.