rename is also a supported method in perl as well... so instead of using system() in perl scripts, you can just use rename.
rgds Frank -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Sridhar Dhanapalan Sent: Monday, 23 September 2002 4:12 PM To: [EMAIL PROTECTED] Subject: Re: [newbie] File conversion I've got two possible solutions. The first is a Perl script I found somewhere (attached) which is designed to change the case of filenames. The second is the 'rename' command, which is part of the util-linux Mandrake package (type 'man rename' for details). On Mon, 23 Sep 2002 08:52:44 +0100, "Tony S. Sykes" <[EMAIL PROTECTED]> wrote: > It works fine on my 8.2, try using `ls` instead of * (Use the single > quote from the key next to the one). > > -----Original Message----- > From: John Richard Smith [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 23, 2002 8:16 AM > To: Anuerin G. Diaz; NEWBIE 1 > Subject: Re: [newbie] File conversion > > > Anuerin G. Diaz wrote: > > >hi john, > > > > sorry for replying direct but i cant post to the list. ;-) > > > > here is one post from the local LUG here in the Philippines which > >seems to be what you want... > > > >[quote] > >Because FAT is not case sensitive and most, if not all, UNIX > filesystems > >are. A short script I got from a list of tips as a newbie might help: > > > > $ for i in *; do mv "$i" "`echo "$i" | tr A-Z a-z`"; done; > > > >This renames every file in the current directory to all lowercase > >filenames. I've added double-quotes around the back-ticked "converter" > >to allow it to handle filenames with embedded spaces as well. > >[/quote] > > > >ciao! > > > >John Richard Smith wrote: > > > > > >>For reasons I need not go into, I transfer *.JPG files across from > >>Windblows to Mandrake and work on them in gimp,and > >>when I'm finished I have a montage of prints I wish to assemble > >>as a composite. > >> > >>I've hit a snag. > >> > >>Winblows names it's files in higher case. > >>Montage(the programme, part of image magic) seems only willing > >>to work with lowercase named files. There are too many to manually > >>retype. > >> > >>How can I convert windblows named *.JPG files to *.jpg named > >>files on the command line ? > >> > >>John > >> > >> > >> > > > > > Here is some of my first efforts, > ]# cd /mnt/ext2-vol6/downloads2/digitalcam/set002 > > set002]# $ for i in *; do mv "$i" "`echo "$i" | tr A-Z a-z`"; done; > bash: syntax error near unexpected token `do' > > set002]# $ for i in *; do mv "$i" "`echo "$i" | tr A-Z a-z`"; > bash: syntax error near unexpected token `do' > > set002]# $ for i in *; mv "$i" "`echo "$i" | tr A-Z a-z`"; done;bash: > syntax error near unexpected token `;' > > set002]# $ for i in * do mv "$i" "`echo "$i" | tr A-Z a-z`"; done; > bash: syntax error near unexpected token `;' > > > As a bash script newbie I'm obviously doing something > quite wrong here. Any idea what it is, as I think this > will work when I learn how to prpoperly execute it. > Incidentally, I note there is a pipe so it's a two > part operation inwhich the standard output of the first part is fed > directly into the standard input of the second > element. > John -- Sridhar Dhanapalan "We like to think of ourselves as the Microsoft of the energy world" -- Kenneth Lay, former CEO of Enron
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
