Article View: comp.lang.perl.misc
Article #330Perl script question for gurus
From: chris abraham
Date: Wed, 27 Aug 1997 00:00
Date: Wed, 27 Aug 1997 00:00
59 lines
2266 bytes
2266 bytes
I am resending this for a friend; please respond to <mark@tmn.com>
I'm trying to write a quick script to rename a few thousand files in
sequential order. Before I tax my novice skills creating a bug-filled
script, I'd like to see if this has been done before and is sitting on
someone's harddrive.
Thanks for any help!
Sie koennen auf Deutsch antworten.
On peut repondre en Francais.
Se puede contestar en Espanol.
I'm trying to rename a few thousand files in sequential order.
ie.
I have:
I want to change it to:
blah.txt --> 00000001.txt
blub.txt --> 00000002.txt
this.txt --> 00000003.txt
that.txt --> 00000004.txt
etc.txt --> 00000005.txt
and so on...
At a later date, more files will show up, so I'd like to be able to start
at whatever number I choose.
ie.
>what number do you want to start at?
2409
>ok
blah.txt --> 00002409.txt
blub.txt --> 00002410.txt
this.txt --> 00002411.txt
that.txt --> 00002412.txt
etc.txt --> 00002413.txt
I'll probably be running off a Windows box... I've heard there are
differences in the versions of perl.
Cheers, and thanks!
Mark Harrison
--
chris abraham <chris@urban.net> +1 202.452.7442 <http://www.urban.net>
the urban design group po box 15163 washington dc 20003-0163 usa
"peculiar travel suggestions are dancing lessons from god."
Technical Details
Message-ID:
<Pine.SOL.3.96.970825153417.22465A-100000@purple.tmn.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1133f4,bbbaaa795486a906,start X-Google-Attributes: gid1133f4,public X-Google-Thread: 10f591,bbbaaa795486a906,start X-Google-Attributes: gid10f591,public X-Google-Thread: 112333,bbbaaa795486a906,start X-Google-Attributes: gid112333,public X-Google-Thread: fa0ae,bbbaaa795486a906,start X-Google-Attributes: gidfa0ae,public X-Google-Thread: f72c1,bbbaaa795486a906,start X-Google-Attributes: gidf72c1,public From: chris abraham <chris@purple.tmn.com> Subject: Perl script question for gurus Date: 1997/08/27 Message-ID: <Pine.SOL.3.96.970825153417.22465A-100000@purple.tmn.com> X-Deja-AN: 268941265 Organization: CAIS Internet Reply-To: chris abraham <chris@purple.tmn.com> Newsgroups: comp.lang.perl.misc,comp.lang.perl.modules,comp.lang.perl.tk,de.comp.lang.perl,fr.comp.lang.perl