avoiding console window display when scheduled task runs batch file

Posted by cherouvim on Super User See other posts from Super User or by cherouvim
Published on 2010-05-05T10:47:20Z Indexed on 2012/06/23 9:20 UTC
Read the original article Hit count: 252

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?

© Super User or respective owner

Related posts about windows-xp

Related posts about command-line