mf_2 Posted July 6, 2007 Posted July 6, 2007 Hello,I run a bunch of batch commands at the end of my Unattended DVD. Via '@echo off' I was able to hide the command prompt, however lots of commands still send s "Operation completed successfully". Is there a way to suppress those messages?Reg.exe is one example, and it doesn't feature a switch to turn these messages off, so is there a global option to turn those messages off?Thanks for your help,mf_2
Yzöwl Posted July 6, 2007 Posted July 6, 2007 They are all adding information to the registry via the REG ADD command aren't they?If you were to use the syntax I again gave you here then you wouldn't need to ask this question!Clue: last four characters
mf_2 Posted July 8, 2007 Author Posted July 8, 2007 Sorry, I never saw your last reply in that other topic because my problem was solved meaning I didn't visit that topic anymore.Does the /f>Nul also work for copy commands? Whenever I copy a file, it shows me "Copied 1 file(s) successfully" or something like that. I'd liek to get rid of that too. "copy /?" didn't show anything useful, I only found a switch in there to skip the confirmation upon overwriting files.
Yzöwl Posted July 8, 2007 Posted July 8, 2007 Yes, the following:Copy [source] [destination] >Nulwill suppress the echoing of 'copied n file(s) successfully'
LeveL Posted May 18, 2008 Posted May 18, 2008 Yes, the following:Copy [source] [destination] >Nulwill suppress the echoing of 'copied n file(s) successfully'OK so, is there much this doesn't work for?Up to now it works for...DELREGEven though those command line programs do not show any support for >NulI guess its trial and error the same as always.
Idontwantspam Posted May 18, 2008 Posted May 18, 2008 Basically, in the windows command line, the > character sends the output of whatever you're running to whatever is to the right of the > character. So, if you were to do echo test > text.txtThen test.txt would say "test" inside. Nul happens to be special in that Nul is Nul - that is, it's not there. It's sort of like sending it to nowhere. So by sending the output to nowhere, there is no output. Be warned that using > repalces the existing file if there is already one, so in the above example, if test.txt had content already, it would've been erased. >> appends the output to an existing file or creates a new one if none exists, and may be more suitable for some situations.
jaclaz Posted May 18, 2008 Posted May 18, 2008 @mf_2Read here about REDIRECTION:http://www.robvanderwoude.com/redirection.htmlRedirection is not documented inside ANY command as it is a "generic" feature of the OS.Since some commands output to "standard error" instead of "standard output" in some case you will need to use the:command > NUL 2>&1syntaxjaclaz
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now