mf_2 Posted July 6, 2007 Share 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 Link to comment Share on other sites More sharing options...
Yzöwl Posted July 6, 2007 Share 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 Link to comment Share on other sites More sharing options...
mf_2 Posted July 8, 2007 Author Share 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. Link to comment Share on other sites More sharing options...
Yzöwl Posted July 8, 2007 Share Posted July 8, 2007 Yes, the following:Copy [source] [destination] >Nulwill suppress the echoing of 'copied n file(s) successfully' Link to comment Share on other sites More sharing options...
LeveL Posted May 18, 2008 Share 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. Link to comment Share on other sites More sharing options...
Idontwantspam Posted May 18, 2008 Share 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. Link to comment Share on other sites More sharing options...
jaclaz Posted May 18, 2008 Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now