RSS

 
WinEdt Macro Library  | HTML previous macro  | next macro

checklinks

Description

This macro checks all links in a HTML project and generates a log file.

The macro understands and checks the following links:

  • relative paths (like ../../up.html)
  • file with browser-like path specification (file:///C|/Programs...)
  • internal or external references (#annote or foo.html#mark)
  • folders (folder/)

It does not follow links beginning with http:// or ftp://, news: or mailto:

You can start from any file you want. The macro will not only check the links in that file, but follow the links until it has checked all linked files. It won't get stuck in a loop because it tests if a file has already been checked. Because it is independent from WinEdt's Tree feature, you don't have to have the Tree built nor a Main File set. On the contrary, the macro can build a list of all existing and checked files to be shown in the Tree window.

The log file will be parsable by WinEdt, i.e. you can browse through the errors with Search | Errors.

Note that while Windows's filesystem, on which this macro relies, is case-insensitive, Unix servers are usually case-sensitive.

Installation

Put the file in the %b\Macros\HTML\.
If you want, you can create a menu entry for it.

Download

HTML/checklinks.edt

Macro contributed by Robert <w.m.lgmx.net>.

WinEdt Macro Library  | HTML previous macro  | next macro