RUN > NUL Command Suppresses Output from MS-DOS CommandsLast reviewed: April 17, 1995Article ID: Q90034 |
The information in this article applies to:
SUMMARYYou can execute an MS-DOS command from the FoxPro Command window by using the RUN command. Any messages that the command writes appear on the screen. To suppress this output, use the following syntax in the Command window:
RUN > NUL <MS-DOS command>If the MS-DOS command executes successfully, no output appears on the screen. Otherwise, an MS-DOS error message appears. Alternatively, you can send the output of the MS-DOS command to a file, and use the NULL command to suppress the output from the screen. For example:
!DIR *.EXE > FILENAME.EXT < NULL -or- RUN DIR *.EXE > FILENAME.EXT < NULLNOTE: The following command
!NET USE \\PATH\PATHdisplays the message "Command completed successfully" or an error message if the command did not execute successfully. If you change the command to
!NET USE \\PATH\PATH > NULthe error message is suppressed.
MORE INFORMATIONFor example, the following command copies all files with the .DBF extension in the current directory to the floppy disk in drive A without displaying any message if the copy is successful:
RUN > NUL COPY *.DBF A:If the floppy disk does not have enough space to hold the files, an "Insufficient disk space" message appears on the screen.
|
Additional reference words: FoxDos 2.00 2.50 2.50a background turn off
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |