The CSS HTML Validator command line processor (cmdlineprocessor.exe) can be run from a command prompt and will accept arguments passed to it from the command line.

The executable file to run when using command line arguments is called cmdlineprocessor.exe. This executable understands command line arguments and will call the validator engine (in a DLL) to perform the correct job.

NOTE: In 2022/v22+, a duplicate file named chvcmd230.exe is also included. This is the same file as cmdlineprocessor.exe except the filename is different (the filename is shorter and contains the version). If desired, chvcmd230.exe can be used instead of cmdlineprocessor.exe.

hmtoggle_plus1A note about processing multiple files and efficiency
hmtoggle_plus1Important notes and tips

Command Summary

IMPORTANT: Specify any options before the primary command (before any -b-f-q, etc; see below for the options).

NOTE: There are additional commands that are used for integration with 3rd party products, but they are not listed here. To see those commands, please visit the developer section on our website.

Command

Description

<filename>

Validate <filename> using the options set in the Classic Page in the Validator Engine Options

-1

Show the Validator Engine Options Dialog

-2

Show the Configuration Editor Dialog

-3

Show the Batch Wizard Options

-4

Show the Editor Options

-b

Open the Batch Wizard

-b <filename>

Open the Batch Wizard and process the target list specified by <filename>; see Batch Wizard Commands

-bx <filename>

Open the Batch Wizard and process the target list specified by <filename>, where x specifies the tool to use; see Batch Wizard Commands

-c <filename>

Use the Convert Text File Format Tool on <filename>

-e <filename>

Validate <filename> and output the results; for more information visit the Developer Information Page

-f <filename>

Run the commands in <filename>; see Using -f to Execute Commands

-l <filename>

Use the Lowercase Tool on <filename>

-o <filename>

Open <filename> in the editor (can be a URL starting with http:// or https://)

-q

Sends a quit signal to the editor/Batch Wizard

-s <filename>

Use the Remove Tags Tool (Strip Tags Tool) on <filename>

-t <filename>

Use the Template Tool on <filename>

-u <filename

Use the Uppercase Tool on <filename>

-v <filename>

Validate <filename> and open the results in the viewer specified in the Validator Engine Options

-w <URL>

Open <URL> in the integrated editor (automatically prepends http:// if needed)

Option Summary

NOTE: Specify options before the main command (before any -b, -f, -q, etc).

Option

Description

-bwofile <filename>

Specify a Batch Wizard options export file to load before the main command (New v22.01)

-debuglog

Adds the -debuglog option when starting the editor; visit Editor Command Line Arguments for more information

-inifile <filename>

Specify an ini file (filename only or with a full path) to store the configuration in (the filename must exist or the option is ignored). This can be used as a way to use different profiles or "workspaces", or to run multiple instances simultaneously and independently. This feature uses "portable mode" with the specified ini file.

-minimize

Adds the -minimize option when starting the editor

-msgwindow <name>

Specify a custom window name (caption) for the message window. Typically this is only used if you want to run more than one instance of CSS HTML Validator at a time, like when processing multiple Batch Wizard jobs simultaneously.
Example: -msgwindow instance1
IMPORTANT: To avoid potential problems, use names consisting only of alphabetic characters and numbers, do not use names that differ only by case, and do not use "def" as a name.

-outputfile <filename>

Specify the output file, overriding the default
In v23.00+, specifying a file that ends in ".json" will automatically trigger JSON output

-rx

Change exit code based on value of x (see below for more information about the -rx option)

-veofile <filename>

Specify a validator engine options export file to load before the main command

-v0

Suppress the viewer when doing a validation; place before command argument

-xi

XML output override (-x0 - off, -x1 - on) (tick_16Pro, cross_16Home)

Primary Commands

IMPORTANT: Specify any options before the primary command (before any -b, -f, -q, etc; see below for the options).

Tools (tick_16All Editions)

cmdlineprocessor.exe -l <filename> - Use the Lowercase Tool on the file specified by filename. Note that -l is the letter L and not the number one.

cmdlineprocessor.exe -u <filename> - Use the Uppercase Tool on the file specified by filename.

cmdlineprocessor.exe -s <filename> - Use the Remove Tags Tool on the file specified by filename.

cmdlineprocessor.exe -t <filename> - Use the Template Tool on the file specified by filename.

cmdlineprocessor.exe -c <filename> - Use the Convert Text File Format Tool on the file specified by filename. The format converted to is specified by the last saved program options.

Show Dialogs

cmdlineprocessor.exe -1 - (tick_16All Editions) Show the Validator Engine Options. HTML Validator exits (does not continue running) when the Validator Engine Options are closed.

cmdlineprocessor.exe -2 - (tick_16Pro, cross_16Home) Show the Configuration Editor. HTML Validator exits (does not continue running) when the Configuration Editor is closed.

cmdlineprocessor.exe -3 - (tick_16Pro, cross_16Home) Show the Batch Wizard Options. HTML Validator will remain running when the Batch Wizard Options are closed.

cmdlineprocessor.exe -4 - (tick_16All Editions) Show the Editor Options. HTML Validator will remain running when the Editor Options are closed.

Other Primary Commands

cmdlineprocessor.exe -n windowname,messagenum,messageint - This causes HTML Validator to send the message WM_USER+messagenum to the window named windowname. LPARAM will be messageint.

cmdlineprocessor.exe <filename> - This causes HTML Validator to validate the document specified by filename. HTML Validator may ask you if you want to open the viewer application with the results or may automatically open the viewer, depending on the options set in the Classic Page in the Validator Engine Options. The -rx option can be used with this command to return the number of error messages or error+warning messages (see below). NOTE: Use the -o option to open a file in the integrated editor.

cmdlineprocessor.exe -v <filename> - This causes HTML Validator to validate the file specified by filename. -v forces the HTML Validator to open the results with the viewer, regardless of the options set in the Classic Page in the Validator Engine Options. The -rx option can be used with this command to return the number of error messages or error+warning messages (see below). NOTE: Use the -o option to open a file in the integrated editor.

cmdlineprocessor.exe -o <filename> - This causes HTML Validator to open the file specified by filename in the integrated editor. Filenames may be enclosed by quotation marks and should be if the filename contains space characters.

cmdlineprocessor.exe -q - If HTML Validator's editor is running, then this command sends a quit signal that causes it to exit. NOTE: Unsaved changes to documents, the configuration file, and the Batch Wizard target list will be lost if HTML Validator is closed in this manner. If the Batch Wizard is processing a target list, then HTML Validator will attempt to exit after the processing is completed and the job is done. cmdlineprocessor.exe will return (exit) and the command will complete when HTML Validator's editor exits and is no longer running in the system. If no instance of the editor is found, then this command will wait up to 10 seconds looking for an instance to send the quit signal to (this solves some possible timing issues).

cmdlineprocessor.exe -w <URL> - This causes HTML Validator to open the URL specified by <URL> in the integrated editor using 'Open from the Web'. If the URL does not start with "http://" or "https://" then "https://" is automatically prepended.

NOTE: The program options and configuration used to validate a document using a command line are those that are last saved and not necessarily those that are currently active if an instance of HTML Validator is running. This includes validating a document using an HTML editor that provides integrated support for HTML Validator. If you've made changes to the options or configuration, then make sure that these changes have been saved before calling the validator on a command line.

Command Line Options, Exit Codes, and More

IMPORTANT: Specify these options before the primary command (before any -b, -f, -q, etc).

hmtoggle_plus1Overriding the default output file with -outputfile
hmtoggle_plus1Overriding XML output with -xi
hmtoggle_plus1Specifying an options file with -veofile
hmtoggle_plus1Suppressing the viewer with -v0
hmtoggle_plus1Opening files in the editor
hmtoggle_plus1Exit codes, return values, and -rx