Output redirection is obtained by adding
> <file> to the command line.
htlatex "other options..." "--interaction=nonstopmode" > filename
will record the session in
filename. This works on Unix shells and also with the Windows command line interface.
If no record is needed, use
> filename on Unix systems and
on Windows (see https://stackoverflow.com/questions/313111/dev-null-in-windows). Note that
filename is an arbitrary file name possibly including a path, but of course the user should be able to write in the pointed at directory.
Depending on the system setup,
> filename might refuse to execute, if the file already exists. With a Bash shell, use
>| filename for overriding the
noclobber option; other command shell may have different workarounds.