Skip to content

Instantly share code, notes, and snippets.

@dzzzchhh
Created June 10, 2022 06:26
Show Gist options
  • Select an option

  • Save dzzzchhh/473d8b4a7310fed1294b08af60cc73f1 to your computer and use it in GitHub Desktop.

Select an option

Save dzzzchhh/473d8b4a7310fed1294b08af60cc73f1 to your computer and use it in GitHub Desktop.
#!/usr/bin/env fish
function batch-ext-change
echo "Batch renaming files in the currect directory (recursively)"
read -l -P 'Old extension (without the "."): ' old_ext
read -l -P 'New extension (without the "."): ' new_ext
fd .$old_ext -X rename .$old_ext .$new_ext {}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment