Black_Claw was not here!

"Indeed, use Opera Mini..."

Bulk Renamer with one line command

,

It is easy to rename a single character from a bunch of file. For example, in your folder there is a few hundreds of file with "%" character on their names, and you want to change it to "_".

Use for i in *; do mv $i ${i/'%'/'_'}; done


{i/’%‘ = The character you want to replace

‘/’_‘}; = Replace it with "_"

Thanks to Mr. P.Y.A.P cheers

Scrooge McDuck, Mangkunegara, Pakubuwono, and Karapan SapiConky on Compaq Presario V3000

Comments

Antero Hytönenanzah Thursday, June 19, 2008 10:08:15 PM

For loops are quite fun. I tried to use sed inside for loop for more or less same thing, but things get quite tricky when there's spaces in filenames. Things are much easier when you let shell handle everything.

Zaki RahmanPatooti Monday, June 30, 2008 12:13:25 PM

perl is godly

Black_Claw Tuesday, July 15, 2008 8:49:31 PM

Spaces sux lol

Write a comment

New comments have been disabled for this post.