Welcome to WebmasterWorld Guest from 54.221.54.252

Forum Moderators: phranque

Message Too Old, No Replies

Batch rename files

     
6:07 pm on Sep 27, 2004 (gmt 0)

Full Member

10+ Year Member

joined:Aug 16, 2004
posts:293
votes: 0


Hi,

I have a large series of HTML files, which were created by a batch program. These files are currently sequentially named, file_1.html, file_2.html.

I also have one thumbnail .gif associated with each file, each with compeltely unique names.. "bluewidget_blah.gif".

I need to batch rename the HTML files to the same name as the .gif's. The file that bluewidget_blah.gif belongs to should take on its name, so, bluewidget_blah.html.

The good thing is that both sets of files are A-Z sorted, therefore there is at least some connection. I suppose the sequential creation time of the HTML files could also be used for association.

I cannot find a utility that will do this. Can someone please help..

6:24 pm on Sept 27, 2004 (gmt 0)

Full Member

10+ Year Member

joined:Sept 23, 2004
posts:229
votes: 0


Hi Flyerguy,

If you have OSX, there's a script built in for this inside of Applescript.

6:27 pm on Sept 27, 2004 (gmt 0)

New User

10+ Year Member

joined:June 1, 2004
posts:33
votes: 0


Hello flyerguy. A Perl script should be able to do this. Do you know it, or another scripting language?
7:36 pm on Sept 27, 2004 (gmt 0)

Full Member

10+ Year Member

joined:Aug 16, 2004
posts:293
votes: 0


Hey,

I'm WinXP and want to do this on my comp then upload to server. Not sure about Perl support on my server but it seems like there must be a utility to do this on PC. Thanks.