Robocopy Copying Directory from Remote Computer: Error 'The Network Path Was Not Found'

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.

2

4 Answers

\\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\

3

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.

OK, you missed some of the net use command

[left out drive letter to attach network storage to]

Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.