Select the product you need help with
- Internet Explorer
- Windows Phone
- More products
SHELL Redirected to NUL Device Suppresses MS-DOS Message
Article ID: 40592 - View products that this article applies to.
This article was previously published under Q40592
From a Basic program, you can invoke the SHELL statement to execute an MS-DOS command. Normally, many MS-DOS commands give you a confirmation message. If you want to suppress the message (thus making the SHELL operation less visible), you can redirect the standard MS-DOS output to the NUL device.
Here is an example:
The above statement copies file1 to file2 and redirects the success report "1 file(s) copied" to the NUL device, which is never displayed. You may do the same redirection to prevent the DOS success report from printing on the printer (PRN) device:
The above information applies to the following products:
Article ID: 40592 - Last Review: August 16, 2005 - Revision: 2.1