The echo command is used to print a statement by default to the screen.
example:
echo Good Morning
output:
Good Morning
note: quotes are not used and will be displayed in the output if used
other examples:
echo off/on - turns echo on or off, otherwise commands are visible
on the screen. Useful for bat files.
@echo off - the @ hides the line it precedes so use this for the first line.
echo. - displays a blank line
echo text > myfile.txt - writes to target location (myfile.txt), overwiting it if it exists.
echo text >> myfile.txt - appends to the target (myfile.txt)
echo "%username%"
Look into the FOR command. To repeat a command 10 times, we want to use this specific variation of the FOR command: FOR /L %variable IN (start,step,end) DO command [command-parameters] Example: Do the echo command on the values (1-10). FOR /L %i IN (1,1,10) DO echo %i
Get the Registry entry using regedit command. use the command from command prompt or copy that in a batch file and execute. Use errorlevel command to verify. hope this helps!! @echo off reg query RootKeyName\Path\To\Key\To\Query /v KeyName echo Does not Exist!!!!
Use the "dir" command (without the quotes) to see all files in the current directory. Use the "type" command (Just like before, no quotation marks.) followed by a file you want to look at to see the file's contents. Use the "echo" command (Okay, I think you get the point about the quotation marks now.) to print something to the screen. Not very useful. Is it? You can use the "echo" command to overwrite files too! For example, "echo Hello >> a.txt" will overwrite a.txt with the text "Hello." If a.txt does not exist, the echo command will create one.
just dispaly the environment variable : echo %USERNAME%
You can use "ver" command.
Use "exit" command..
You can use "ver" command.
the deleted file if ms dos can be recovered if you use the command mention below immediately,the command is : need External Dos commands and internal dos commands with their meaning
using the "echo ]" will disply the greater-than bracket on the screen. The echo command in general displays whatever text is typed after a space. The original question is: how to echo ">", not "]"!!! To display a pipe (|) or redirection character (, ^<, or ^| ). If you need to use the caret character (^), type two (^^).
1. Click on the Start Menu 2. Click on the Run command 3. Type in: cmd 4. Type in: help This should help you a lot with commands. Use: help <command> for details on a certain command. Example: help echo Use the echo command to make the batch file talk. Example is: @echo echo "This is what they will see" Make sure to include the ""s.
command prompt is like dos , the commands are almost the same to use command prompt search in start menu