Moving Files with Windows Server 2008 Task Scheduler

Older versions of Windows would have issues with allowing you to use the UNC path to a file or directory in the command prompt/batch file. The normal fix for this was to create a mapped drive letter to the machine you wanted to access from the dos shell. Windows Server 2008 fixed this, thereby causing more problems.

I created a batch file that moved/copied a file in a local directory to a mapped network drive “B:\”. This batch ran just fine in my tests. On Windows Server 2008, when I ran it as a scheduled task that did not need to be logged in to run, the move/copy would not happen. It wasn’t until I changed the line to copy to in the batch file from “B:\directory” to “\\machine\directory” that it finally worked.