Moving .html files while preserving hyperlink integrity?


I use a Windows-based program called <a href="">Coast Webmaster</a> for moving large numbers of HTML files in one directory to another directory. As you drag and drop each file or entire directory of files to new locations in the web root directory tree, this utility will find every <b>a href=</b> and <b>img src=</b> hyperlink in every HTML page and re-write it so the paths are correct. Very handy, but it does require you to do all your changes locally and then upload the pages into their new directories on your web server.

My question is this: Since I use BSDI Unix ISS4 for my web server, does anyone here know of a Unix-based program or Perl script that will allow me to move individual .html pages, or entire directories containing .html pages, to a new directory AND that will re-write all the local page and image links contained in those .html pages?


I use MGET for a similar purpose. It will get HTML files both locally and remotely and rewrite the URLs to work locally. However, what I use MGET for is to grap an entire web site so I can burn it do CDROM. It can be used for simply moving files and rewriting URLs as you indicated.

MGET is command line freeware that compiles under GCC. It is very feature rich for working with HTML files.

[Edited by Neo on 12-21-2000 at 03:03 PM]