title: File Move Scheduled Tasks not running bat file
body: <p>I know this question might have been asked in other ways, but all the things I have read and tried had not yet fixed my problem, so I am hoping to get some help here with context to my issue. </p>
  
  <p>The problem:<br>
  I need to move files from a local drive to a network drive (the network drive is a SharePoint mapped library) on my server in Windows Azure (don't think the azure part matters, but it provides context).   </p>
  
  <p>My thought was to schedule a task that will run a bat file to move the files I need moved and do so frequently (every 5 to 10 minutes).  The batch file I have created does what I need it to when I manually run the batch file but not when the task runs it.  </p>
  
  <p>Here is the batch file:</p>
  
  <pre><code>echo Write log file &gt; LogStart.txt
  C:\Windows\System32\robocopy.exe "\\PCICSWKS001\D$\ToBeMoved" "V:" /s /e /MOV /r:0 /W:0
  echo Write log file &gt; LogEnd.txt
  </code></pre>
  
  <p>You can see that it writes a log file before and after running robocopy.exe.<br>
  When the task runs it does write both of these log files so I know that the batch file is at least running.<br>
  You can also see that I have tried using the UNC path for the drive in the source, that is because I was reading that the task scheduler might not be able to pick up properly on the drive letters. When I put the machine name in for the destination and run the batch file myself or with the scheduler it errors.  </p>
  
  <p>Here is the action taken by the task:  </p>
  
  <p><a href="https://i.stack.imgur.com/xl7Sq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xl7Sq.png" alt="1"></a></p>
  
  <p>Here is the task general tab </p>
  
  <p><a href="https://i.stack.imgur.com/JbEKE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JbEKE.png" alt="2"></a></p>
  
  <p>Any assistance would be much appreciated.  </p>