Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a small batch file which xcopies some files from one folder to another which I've scheduled (via windows scheduled tasks) to run every 1 hour:

@echo off
xcopy c:\foo c:\bar /E /C /F /Y

Since this is my workstation, I'm most probably doing work when the task executes, and then the black dos console window is displayed (lasts 2-3 seconds) and steals window focus.

I don't wish to see the files copied and of course the batch file does not ask for any user input. Is there a way to avoid displaying the console completely?

share|improve this question
More preferable answer to the one Oliver gave… – Efekt May 10 '14 at 5:45
up vote 7 down vote accepted

Same question & Answers on ServerFault: Run a .bat file in a scheduled task without a window

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.