Sunday, November 25, 2007

Rename multiple files

Ever tried to rename multiple files???? Recently, one of my friends asked me, is there a way to change only the extensions for a set of files. After googling for some time, I got the following. Its really good.

In Linux,

rename gif jpg *.gif

This command replaces the occurance of gif (first parameter) in the file names with jpg ( second parameter) on all files (starting from third parameter)

In Windows,
ren *.gif *.jpg

It really works. I never thought windows has such useful stuff :D. But it works only on the extension. If u want to change the file name, instead of extension, it definitely fails.

Linux still rocks :)