The CheckLinks tool now also finds broken http and https links in addition to finding broken local relative links.
The syntax for running the tool is, for example:
C:\> Checklinks2 "C:\OutputFolder" "C:\LogFolder"
For info about the existing tool, see http://techwritingengineer.com/automated-qa-checking-for-broken-links-in-your-flare-output/
This sounds good. But when I run it nothing happens: no error message but no text file either.
Any ideas what the problem might be?
If no broken links are found, no log file is produced. I can see how it would be nice with a log file either way, so I’ve updated the tool. Download it again and try it out – If there are no broken links, the log file will reflect that! https://dl.dropboxusercontent.com/u/4378241/CheckLinks/CheckLinks2.exe
Great, thanks. That works fine. It doesn’t like it if you leave trailing backslashes in the paths though. I get:
Unhandled Exception: System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
at System.IO.Path.GetFileName(String path)
at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
at System.IO.File.WriteAllText(String path, String contents)
at HREF_CHECKER.Module1.WriteLogFile(String logText, String logPath)
at HREF_CHECKER.Module1.Main()
Feature request: print some output on the command line – e.g.
“x broken links found. See log file ”
Thanks again. That’s a really useful little tool.
In my previous comment I used angle-bracketed text which disappeared on submit.
After “See log file” add the path/name of the log file.
Glad you find it useful! I’ve added the feature you requested, but I’m afraid you’ll have to live with not using trailing backslashes, at least not for now 🙂
https://dl.dropboxusercontent.com/u/4378241/CheckLinks/CheckLinks2.exe