[OOZY] Renaming more than 200 pics
OOzy Pal
oozypal at gmail.com
Sun May 7 18:58:22 UTC 2006
On 5/7/06, gborzi <ulist at gs1.ubuntuforums.org> wrote:
>
> Try this
> > for i in *\ *; do newname=`echo $i|sed -e 's/ /-/g'`; mv "$i" $newname;
> > done
>
>
> --
> gborzi
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
Thank you; it worked. Now the names also contains "(" and ")" for
example, a name of file is like:
20051030-Layan-(2).jpg
as you can see the dashes is OK. Now, I want to remove "(" and ")"
because linux will also put a backslash b4 the "(". Moreover, if the
number is one digit I want to add a leading 0 so the name becomes
20051030-Layan-02.jpg.
I tried the following but no help
for i in *\(*; do newname=`echo $i|sed -e 's/ /-/g'`; mv "$i" $newname;
I got the following error:
mv: `20060124-Layan-(2).jpg' and `20060124-Layan-(2).jpg' are the same file
Thanks in advance
--
OOzy
More information about the ubuntu-users
mailing list