How to get help for any command
Overview
Most built-in CMD commands explain themselves through help command or command /?.
Help output shows syntax, options, and examples. In syntax lines, brackets usually mean optional text; do not type the brackets themselves.
helplists many built-in commands.help copyexplains a specific CMD built-in.command /?also works for many executable programs.
Commands to try
Type each command at the prompt, then press Enter. Replace sample names and paths with ones that exist on your computer.
Commands are generally not case-sensitive, but preserving the spelling shown here makes scripts easier to read.
help
help copy
copy /?
robocopy /? | more
Useful options and details
Options change how a command behaves. Add spaces exactly as shown, and use the command's built-in help when an option is unfamiliar.
A path containing spaces must be enclosed in double quotes, such as "C:\My Files".
- Pipe long output to
more; press Space for another page or Q to stop. - Text such as
sourceanddestinationrepresents values you supply. - Online examples may target PowerShell or Linux, so verify that they are labeled for Command Prompt.
Tips and common mistakes
Check the current folder and read the command output before assuming an operation succeeded.
Practice with disposable files first. Commands that delete, overwrite, or stop a process may not offer an Undo button.
- Read whether an option deletes, overwrites, or forces an action before running it.
- A slash option such as
/Scan mean different things for different commands. - If
helpdoes not recognize an external program, try its/?,-h, or--helpoption.
Safe practice
Create a temporary practice folder under your user profile so the examples cannot affect Windows system files.
After each command, inspect the result with dir or another read-only command before continuing.
- Compare
help dirwithdir /?. - Find the option that makes
dirpause. - Quit paged help without changing files.