Skip navigation.

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

anzah 19. June 2008, 22:08

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.

Patooti 30. June 2008, 12:13

perl is godly

Black_Claw 15. July 2008, 20:49

Spaces sux :lol:

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies