batch file - How let cmd output less info -


i have batch file, example: test.bat, there 1 command in it:

echo hello 

then run it:

d:\cmd\test.bat 

then outputs result:

 //output begin                      -- blank line, don't want  d:\cmd\echo hello   -- not want  hello               -- want print line                      -- blank line, don't want neither.  //output end 

i want print output of commands run in batch file, here echo command.

but, there 2 blank lines, 1 @ head of result, , other 1 @ end of result. , d:\cmd\echo hello in result neither not want.

what should do? great, in advance.

just put

@echo off 

in first line of batch file. prevent output of command's invocation when run (as prepending command @), eliminates lines bother you.

taken http://ss64.com/nt/echo.html

type echo without parameters display current echo setting (on or off).  in batch files want echo off, turning on can useful when  debugging problematic batch script.  in batch file, @ symbol same echo off applied current line only.  command executed , takes effect next line onwards, @  rare example of command takes effect immediately. 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -