quickie

Slowping jingsu at cs.washington.edu
Mon May 22 20:58:20 PDT 2000


if you don't want to do the perl ;) you can always do a mini-shell
script...

for file in *; do mv $file ${file}.png; done

if you wanted to rename the extension (something I do all the time)

for file in *.mp2; do mv ${file} ${file%%mp2}mp3; done

On Mon, 22 May 2000, R. David Whitlock wrote:


> ok, here's a quickie:

>

> how would you rename all files in a directory to the same name plus an

> extension on the command line?

>

> for example, if I have 12 files named "1" "2" "3", etc, how to turn them

> all into "1.png" "2.png" "3.png", etc?

>

> -david

>

>

>

>




More information about the Linux mailing list