To start Command Prompt, open the Start menu and search for cmd; the search
results should contain an entry for Command Prompt.
rem This is a commentrem The prefix ## indicates an output linerem The echo command displays its argumentsecho hello world
rem Example: run multiple commands on the same lineecho hello & echo world
rem Example: the dir commandrem The current directory is C:\testrem The "." entry is a reference to the current directoryrem The ".." entry is a reference to the parent directorydir
rem Example: specifying optionsrem Options are specified using a slashrem The /b option instrcuts dir to use a bare formatdir /b
rem Example: combining optionsrem The /a option instrcuts dir to show all contentsrem The /b option instrcuts dir to use a bare formatdir /a /b
rem Example: sorting the output of dirrem The /a option instrcuts dir to show all contentsrem The /b option instrcuts dir to use a bare formatrem The /o:s option instrcuts dir to sort by file sizedir /a /b /o:s
rem Example: getting helprem The /? option instrcuts tree to show its help messagetree /?
helphelp