Home

Rename Multiple Files On The Command Line With zmv In zsh

This will rename all the [TODO: Code shorthand span ] files in the current directory to be [TODO: Code shorthand span ] files

bash
autoload zmv
zmv '(*).mdx' '$1.txt'

one liner:

autoload zmv; zmv '(*).mdx' '$1.txt'

autoload is require because [TODO: Code shorthand span ] isn't loaded by default

via NyxKrage on twitch

~ fin ~