Jump to content

Recommended Posts

Posted

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


Posted

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

Posted

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.

Posted

Yes, the following:

Copy [source] [destination] >Nul
will suppress the echoing of 'copied n file(s) successfully'
  • 10 months later...
Posted
Yes, the following:
Copy [source] [destination] >Nul
will 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...

DEL

REG

Even though those command line programs do not show any support for >Nul

I guess its trial and error the same as always.

Posted

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.txt

Then 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.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...