The Link Checker CLI allows for non-interactive scanning and testing of website links. It is best suited for batch and scripting scenarios.
LNKCHK uri [OPTION...]
Parameter | Description |
---|---|
uri | Specifies the fully qualified address of the remote URL to scan. Only http and https schemes are supported |
/NOGET | The scanner uses HEAD requests for efficiency, falling back to GET if not supported. Specifying NOGET disables this fallback |
/NOEXTERNAL | Specifies that any external URLs will not be checked |
/OUT <file> | Writes scan results to a CSV file |
/H or /? | Display this message |
/LOG <file> | Writes output to a log file. If <file> is not specified, a default name will be used |
/LOGAPPEND | If set and the log file already exists, new data will be appended to the file, otherwise the file is overwritten |
/QUIET | Suppresses most standard output |
/PAUSE | Prompts the user to press a key before the program ends |
/NOLOGO | Do not display the startup banner and copyright message |
/VERSION | Display version information only |
/STATISTICS | Display execution statistics |
/NOCRASHREPORT | Disable automatic crash logging and solution checking |
/list-arguments | Displays how input arguments were interpreted, then exits without performing any actions |
As the scan progresses, it will print out each URL along with a status code. When scanning is complete, a summary block will be printed containing the following data
Parameter | Description |
---|---|
URLs scanned | Number of URLs processed |
URLs not found | Number of URLs that returned a 404 "Not Found" status |
Redirects | Number of URLs that redirect to another URL. If the OUT argument is used, redirect destinations can be found in the CSV file |
Errors | Number of URLs that reported an error |
Protocol Errors | Number of URLs that were not scanned as not HTTP or HTTPS (e.g. data URLs) |
Internal URLs | Number of URLs found internal to the website being scanned |
External URLs | Number of URLs found external to the website being scanned |
The following exit codes can be returned by either the wcopy.exe
or lnkchk.exe
CLI tools.
Code | Description |
---|---|
0 | Success. The operation completed without any errors. |
1 | Invalid parameter. An invalid value was supplied. |
2 | The URL to download, or WebCopy project, was not specified. |
3 | A filename was specified, but the file was not a WebCopy project. |
1000 | Exception. The operation encountered an unexpected exception. |