title: Batch file run as scheduled job returns 2147942659
body: <p>I have a simple batch file that moves files from one folder to another - the source folder is a network path in the form \SERVERNAME\g$\Extract. The full command is:</p>
  <pre><code>move \\SERVERNAME\g$\Extract\updates*.txt D:\Import\NewFiles
  </code></pre>
  <p>I can run this batch file manually and it works fine. However, I've set it up as a scheduled job (on the destination server) and every time it runs, it shows:</p>
  <pre><code>Task Scheduler successfully completed task &quot;\Transfer files&quot; , instance &quot;{3885bcd7-7b78-4de6-a95d-c6ab7b4d480b}&quot; , action &quot;C:\Windows\SYSTEM32\cmd.exe&quot; with return code 2147942401.
  </code></pre>
  <p>The job runs as a user who has full access to both the source and destination folders and has rights to &quot;Log on as a batch job&quot; as well. Both servers are Windows Server 2012.</p>
  <p>The job has the following specified:</p>
  <ul>
  <li>Run whether user is logged on or not</li>
  <li>Do not store password</li>
  <li>Run with highest privileges</li>
  <li>Configure for: Windows Server 2012 R2</li>
  </ul>
  <p>In the Action panel, I've put the batch file name in the Program/script box both with and without it's full path. I've also tried including and excluding the path in the &quot;Start in&quot; box.</p>
  <p>I've tried sharing the source folder, giving full control to the user the batch job is running as, and then using both the share name and the full network path but that also hasn't resolved the problem.</p>
  <p>Whatever I try, the task still completes with the same exit code and the batch file doesn't run.</p>
  <p>I've spent ages searching around for this and though there appear to be plenty of other people who've experienced this same exit code, none of the things suggested have worked.</p>
  <p>Can anyone suggest why this might be happening or what I can try to get round it? Is it something to do with the source folder being a network path?</p>
  <p>I'm under a bit of pressure to resolve this so any suggestions would be much appreciated.</p>
  <p>Thanks</p>