ROBOCOPY Copying directory from remote computer: error 'the network path was not found'

69,768

Solution 1

\\C:\LGR_Back_Up\LGR_A\ is not a valid network path.

If LGR_Backup is on the local drive, then use C:\LGR_Back_Up\LGR_A\.

If LGR_Backup is a folder in the root of C: on a remote computer, and you're trying to get at it via the C$ admin share, then you'd use \\Remote_Computer\C$\LGR_Back_Up\LGR_A\

Solution 2

In the end this is the script that I got to work:

rem # Script to connect:

NET USE \\192.168.10.90\IPC$

rem # Script to copy:

ROBOCOPY \192.168.10.90\lgrdata\ \ICOS\Analyser_backups\LGR_Flux\ /NP /TEE /E /dcopy:T /Z 

rem # Script to disconnect:

NET USE \\192.168.10.90\IPC$ /D

Thanks for all your help. I think this was a complicated, specific problem due to the folder structure of our instrument. I just couldn't figure out where the data was that I wanted to copy, and then I also problems using the following from the original script:

\\C:\LGR_Back_Up\LGR_A\ /Z

As Techie007 said, this is not a valid network path.

Share:
69,768

Related videos on Youtube

Robert Holden
Author by

Robert Holden

Updated on September 18, 2022

Comments

  • Robert Holden
    Robert Holden over 1 year

    I am trying to copy a folder from a remote computer using ROBOCOPY

    I'm using the following:

    NET USE \\192.168.10.90\IPC$ /u:server\[username] [password]
    
    ROBOCOPY \\192.168.10.90\home\lgr\ \\C:\LGR_Back_Up\LGR_A\ /Z
    
    NET USE \\192.168.10.90\IPC$ /D
    

    If I run this line by line, I get 'The command completed successfully'after the first line, followed by 'The network path was not found' after I enter the Robocopy commmand.

    I think this is because I am in the wrong location.

    When I log into the computer 192.168.10.90, using SSH, I get logged into the user's folder with the username I specified. This folder is contained withing the home directory, so the path is home/user. Where I want to copy files from is home/lgr/.

    Is it possible that once I log in from the command line with my first line of script, that I am taken to the user folder, so that my script is looking for the folder home/user/lgr/? If so, how do I navigate up one level?

    I hope this makes sense.

    • TheUser1024
      TheUser1024 about 10 years
      a few questions to get a clearer idea of your situation: After your first net use command, what do you see if you point an explorer to \\192.168.10.90 or to \\192.168.10.90\IPC$ ? The single backslashes seem suspicious, just a typo in the question?
    • Daniel B
      Daniel B about 10 years
      A network share cannot be the working directory of cmd.exe. Still, I believe your problem lies elsewhere.
  • Rik
    Rik about 10 years
    Shouldn't that last \\C$\LGR_Back_Up\LGR_A\ be \\remote_computer\C$\LGR_Back_Up\LGR_A\ (with the location of the remote computer after \\ )? Anyway, i think he wants ROBOCOPY \\192.168.10.90\C$\home\lgr\ C:\LGR_Back_Up\LGR_A\ /Z (if the whole C-drive is correctly shared).
  • Ƭᴇcʜιᴇ007
    Ƭᴇcʜιᴇ007 about 10 years
    @Rik Whoops, yes. :)
  • Robert Holden
    Robert Holden about 10 years
    Thanks for your help. I got it working. Can post how I did it if anyone is interested?