Home:ALL Converter>Windows Batch File - Move File not working in Task Scheduler only

Windows Batch File - Move File not working in Task Scheduler only

Ask Time:2009-06-20T02:00:31         Author:Scott

Json Formatter

I have a file that I'm try to move via a batch file on a timed schedule.

move sourceFile destinationFile.

Destination file is on a mapped network drive Z.

So for example, the command would be:

move C:\myfile.txt Z:\myfile.txt

When I execute the batch file in Windows by double clicking it, it works fine. But when I schedule it via Task Scheduler, it doesn't work.

I added in:

net use Z: \myipaddress

to see if the problem was a resolution issue, but this also works only with the batch file directly, not in Task Scheduler.

The task is running with the highest privileges as Administrator.

OS = Windows 2008 server.

Any ideas?

Thanks.

Author:Scott,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/1019263/windows-batch-file-move-file-not-working-in-task-scheduler-only
yy