I’m looking for a reference regarding the syntax of the help displayed for a dos command.
I didn’t find anything with Google.
I need this because I’m writing a batch and I want to provide help for this batch regarding arguments and options.
I know I could deduce it from the help of existing dos commands, but it would be great if there was a full reference about it.
You mean the syntax as in the following?
That’s easy. Things in square brackets can be omitted. The
[...]at the end indicates that you can supply more files if you wish, it doesn’t have to be just one.There are also alternatives sometimes:
indicated by curly braces while alternatives are separated by
|. Also noteworthy here:/dat the end is only valid if you also provided/ssince there are two nested levels of brackets.There is no strict syntax definition and you can usually figure out some other aspects, like the
[...]on your own. Many examples need a bit interpretation (which mostly is obvious, though). E.g.date:You can supply a date in a weird format as the first argument, but that’s very easy to guess. And no, it doesn’t tell you to supply literally
mm-dd-yy, but that’s why humans read that description, not machines.EDIT: I just noticed that Technet even gives a summary of the syntax at the bottom of each article: