Welcome to WebmasterWorld Guest from 54.204.162.36

Forum Moderators: phranque

Batch rename files

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

10+ Year Member



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 Sep 27, 2004 (gmt 0)

10+ Year Member



Hi Flyerguy,

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

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

10+ Year Member



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

10+ Year Member



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.

 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month