title: Using xcopy to backup to networked hard drive?
body: <p>I'm wanting to create a batch file that will back up my computer. This is what I have right now:</p>
  
  <pre><code>@echo off
  :: variables
  net use U:\\...more stuff...
  set drive=U:\
  set backupcmd=xcopy /s /c /d /e /i /r /y
  
  echo ### Backing up My Documents...
  %backupcmd% "%USERPROFILE%\My Documents" "%drive%\My Backup\My Documents"
  
  echo Backup Complete!
  @pause
  </code></pre>
  
  <p>It's simple enough. It works fine for a drive that is physically attached to my computer. However, I have a networked drive that I'd like to use for this task. I've tried a few things I found on forums, but to no avail. In the above code, I started attempting to use "net use." When I run it, I get "invalid drive specification" or "network path not found." </p>
  
  <p>How can I get this to work?</p>
  
  <p>Any help is appreciated. </p>