Change the extension for a large number of files at once on the command line

repren is a great little utility program that lets you do in one line what many command line tools would require a little script.

Usually i find my minimal understanding to be enough; most things are pretty self-explanatory.

For changing the extension for a bunch of files at once, however, it was much easier to re-learn about the --literal option to not interpret anything as regex than to figure out what regex i would need to change

repren --renames --literal --from .txt --to .md .

Tip: Use -n or --dry-run to see what repren will do, without doing it.

(As an aside, honestly not sure why Write.as doesn’t use .md for the extension of their markdown-formatted posts in their basic export, but this makes the rename easy.)