Re: adding leading zeros to a filename
From: Chris F.A. Johnson (cfajohnson_at_gmail.com)
Date: 01/28/05
- Next message: Frank: "mail alert depending on output"
- Previous message: rupert: "adding leading zeros to a filename"
- In reply to: rupert: "adding leading zeros to a filename"
- Next in thread: rupert: "Re: adding leading zeros to a filename"
- Reply: rupert: "Re: adding leading zeros to a filename"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 28 Jan 2005 19:38:12 GMT
On Fri, 28 Jan 2005 at 19:31 GMT, rupert wrote:
> I've tried unsuccessfully to find the answer to this, so am hoping
> someone here can help...
>
> I've got a directory of photos called:
>
> 1.jpg
> 2.jpg
>
> ....
>
> 10.jpg
> 11.jpg
>
> ...
>
> 100.jpg
> 101.jpg
>
> ...
>
> and I can't for the life of me work out how to write a script to add
> leading zeros to the filenames so they are in the form
>
> 001.jpg
> 002.jpg
>
> ....
>
> 010.jpg
> 011.jpg
>
> ...
>
> 100.jpg
> 101.jpg
>
> ...
This must be a popular class; this has been asked (and answered)
several times in the last few days. The class could use a lesson on
searching the archives.
--
Chris F.A. Johnson http://cfaj.freeshell.org/shell
===================================================================
My code (if any) in this post is copyright 2005, Chris F.A. Johnson
and may be copied under the terms of the GNU General Public License
- Next message: Frank: "mail alert depending on output"
- Previous message: rupert: "adding leading zeros to a filename"
- In reply to: rupert: "adding leading zeros to a filename"
- Next in thread: rupert: "Re: adding leading zeros to a filename"
- Reply: rupert: "Re: adding leading zeros to a filename"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|