Home / Blog / Post
Bulk Reneame File Extentions In Bash
Added on 14th June 2019 in Snippet

Change Extention

The following will rename all files with the exention .old to .new

for f in *.old; do mv $f `basename $f .old`.new; done;

Append

The following will append the extention .new to all iles

for f in *; do mv $f `basename $f `.new; done;

Remove

The following will remove the extention .removeme from all files

for f in *.removeme; do mv $f `basename $f .removeme`; done;

Hi there, I am christopher shaw, a software developer form South Yorkshire, England.

I love tinkering with all things tech, and opened this website as a web presence for myself and a place to keep my notes and snippets. Hopefully you will find something here to help

Christopher Shaw