I would like to rename multiple files (add an extension).. i can use zmv of zsh with
autoload zmv
zmv -n '(**/)(*)' '$1$2.myextension'
but this will rename also all the dirs that are inside the current dir… what can i do to rename only files (recursively) and avoid dirs renaming?
From here:
so I think the
(.D)is what you require. The ‘period’ indicates matching on regular files (not directories) and theDenables theGLOB_DOTSoption.