Supress Responses From Commands In Batch Files

Home -> Windows -> Batch File Programming

12337 views

From the computer of: AlexTheBeast (133 recipes)
Created: Dec 06, 2003


3 comments:
View all comments

Add a comment

Add to:
Add to stumbleuponAdd to del.icio.usDigg itAdd to FURL

This quick recipe describes how to supress responses to commands within batch files.

During the execution of your batch files, users can see your commands on the screen. Most of the time this is good for debugging purposes; however, often it's better to run your batch file silently.

Any command that is followed by "> nul" will not be shown on the screen. The greater sign directs the output to null (nowhere).

For example, copy *.* *.bak will show you as it copies all the files in the directory and renames them with the bak extension.

copy *.* *.bak > nul will silently complete its work without placing anything on the screen.

Subscribe to the Tech-Recipes Newsletter

You can get tips like this delivered in your email every week!

Enter your Email

We will never, ever sell your email address or spam you.




3 Recipe comments: View comments

Supress Responses From Commands In Batch Files by gmartin
Re: Supress Responses From Commands In Batch Files by qmchenry
slight correction by Anonymous



Related recipes:

  Supressing Prompts In Batch Files While Deleting All Files
  XP batch files: Create variable for current user account and find current user
  Create Batch File to Start or End Window Services
  Using variables in Windows batch files
  Batch Files : Get users default printer via registry (WinXP)
  XP Batch Files: Copy images from camera to pc and organize by date
  XCOPY command : Using the /EXCLUDE flag
  Batch File Converting of Video Files: SageTV example
  Windows XP/Vista: Use a Batch File for Quickly Restarting explorer.exe
  Date Calculation In Batch Files XP/2000

 

Sponsored links

 

Login

Nickname

Password

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.