1

I have noticed there are multiple ways to get help information within the Windows command line (cmd) using the help, ?, /? tokens.

For example, these are valid:

help tasklist
help find
tasklist /?
netstat ?
netstat \?
netstat /?
find /?

These are not valid:

help netstat
tasklist ?
tasklist \?
find ?

It seems a bit unpredictable.

  1. As asked in the title, is there an universal token/keyword to pull the help for a cmd command?
  2. Bonus question. Is there perhaps a way of knowing which command works with which token?
1

1 Answer 1

0

Is there an universal token/keyword to pull the help for a cmd command?

Short answer. No.

help token

The help "token" is actually calling the help.exe utility stored in C:\Windows\System32\help.exe. If you type help or help.exe within CMD, you will be able to see all the commands that the help utility knows about.

Luckily if you run help + any command, it should tell you what to type to get the help. Often, you will need to type /?.


? token

As for the ? token, it will not work with commands that expect a text argument as the ? will be interpreted literally and not as an option. Commands such as find, findstr, replace, mkdir and other will not show help if passed ?. Specify the ? is an option using /? to show the help for commands expecting text arguments.

Until proven wrong, I believe you can safely assume that that if an utility does not appear on the help list cmd /k help, you should use /? to get its help.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .