Difference between revisions of "Rename all the file extenstions in a directory"

From thelinuxwiki
Jump to: navigation, search
(Created page with "Rename all the file extenstions in a directory(JPG to jpg in this example): for file in *.JPG ; do mv $file `echo $file | sed 's/\(.*\.\)JPG/\jpg/'` ; done")
 

Latest revision as of 16:03, 24 May 2013

Rename all the file extenstions in a directory(JPG to jpg in this example):

for file in *.JPG ; do mv $file `echo $file | sed 's/\(.*\.\)JPG/\jpg/'` ; done