Stopping System Messages in Consol

Windows specific questions.
Post Reply
xbgtc
Posts: 249
Joined: Oct 14, 2007 5:40
Location: Australia

Stopping System Messages in Consol

Post by xbgtc »

How do you stop the messages from showing in your consul program? eg. When doing a shell 'copy' command the system will always report "1 file copied" or when you run a program the program itself might have a message too and print that in consol so i want to stop these messages from appearing in the consol program - any idea? thanks.
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: Stopping System Messages in Consol

Post by caseih »

Can you redirect the output to NUL?

shell "copy foo bar > NUL"

or if it's still showing standard error,
shell "copy foo bar 2> NUL"
bcohio2001
Posts: 556
Joined: Mar 10, 2007 15:44
Location: Ohio, USA
Contact:

Re: Stopping System Messages in Consol

Post by bcohio2001 »

Why not just use

Code: Select all

FileCopy("File2Copy.bin", "FileWithThisName.bin")
Last edited by bcohio2001 on Jul 10, 2018 22:26, edited 1 time in total.
xbgtc
Posts: 249
Joined: Oct 14, 2007 5:40
Location: Australia

Re: Stopping System Messages in Consol

Post by xbgtc »

Thanks guys! Both of those worked well and the re-direct to null is especially useful :)
Post Reply