I do contract work for a living, which could include writing a program such as this. However, I don’t do people’s homework for them. That just robs them of an education.
You have my full permission to implement this project any way you please.
I want to automate that process.
Here is how it works. You tell the program the root directory of your website on hard disk. It takes a snapshot of all the file names and where in the directory tree they appeared. You then use whatever tools you want to create new directories, move files around, delete files, add files etc. Then you ask the program to take a second snapshot. It then does its best to guess the old and new name of each file. It creates a file giving old and new name for you to review. If there are any errors (which could only happen if you don’t use unique filenames), you manually correct the old:new list.
Then you turn the utility loose patching all the HREFs. It is not quite as simple as a Funduc Search and Replace. You probably want to generate minimal relative links, e.g. you don’t specify the filename for a link to another place in the same file. You don’t specify the path if source and target are in the same directory. You use ../ if the target is in the mother directory of the source, etc.
You might even post your old:new list so people who have extensive references into your website can automatically update all their links too. This features give this project some great commercial potential. To apply link fixes, other websites will need your utility. It will then occur to them to post their fixes in that format too, in a chain reaction taking over the web. Eventually this may evolve into a global system of instantly updating global links.
To allow for the possibility that you split a file, not just moved it, the old:new list could also contain individual NAME tags so you can track their new locations. This project should integrate with the HTML File Splitter Project.
Microsoft tackled a problem similar to this, creating a distributing a continuously updated table of contents for MSDN. They offer their source code based on XML.
![]() |
and suggestions to improve this page to Roedy Green : | ||
| Canadian Mind Products | |||
| mindprod.com IP:[65.110.21.43] | |||
| Your face IP:[38.103.63.18] | The information on this page is for non-military use only. | ||
| You are visitor number 3,511. | Military use includes use by defence contractors. | ||
| You can get a fresh copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) | ||
| http://mindprod.com/project/htmllinkpatcher.html | J:\mindprod\project\htmllinkpatcher.html | ||