Subject: Re: how to rename multiple files?
From: James Bagley Jr. (james@thelostnet.net)
Date: Fri Feb 22 2002 - 12:19:53 AKST
You will have to play with the formatting a little, but:
for file in *
do
mv $file `echo $file | awk -F\- '{ print $3 "-" $4 }'`
done
On Fri, 22 Feb 2002, Justin Dieters (RPKA) wrote:
>
> Hello all. I'm sure this is possible with some sort of script mumbo-jumbo,
> but I was hoping there was a quick and dirty solution. Is there a way to
> rename more than one file at the same time? For example, my mp3 files are
> currently in the format of 'Artist - Album - Track# - Name.mp3' and I want
> to rename them all to just 'Track# - Name.mp3' because they currently are
> too long for their names to fit properly on a CD.. currently everything
> more than 64 characters gets chopped off... It gets tedious renaming dozens
> and dozens of files.. :)
>
> Thanks,
> Justin
>
>
>
>
>
>
>
>
-- ... Any resemblance between the above views and those of my employer, my terminal, or the view out my window are purely coincidental. Any resemblance between the above and my own views is non-deterministic. The question of the existence of views in the absence of anyone to hold them is left as an exercise for the reader. The question of the existence of the reader is left as an exercise for the second god coefficient. (A discussion of non-orthogonal, non-integral polytheism is beyond the scope of this signature.)
This archive was generated by hypermail 2a23 : Fri Feb 22 2002 - 12:20:10 AKST