ROBOCOPY Copying directory from remote computer: error 'the network path was not found'
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.
Related videos on Youtube
Robert Holden
Updated on September 18, 2022Comments
-
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 ishome/user
. Where I want to copy files from ishome/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 about 10 yearsa 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 about 10 yearsA network share cannot be the working directory of
cmd.exe
. Still, I believe your problem lies elsewhere.
-
-
Rik about 10 yearsShouldn'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 wantsROBOCOPY \\192.168.10.90\C$\home\lgr\ C:\LGR_Back_Up\LGR_A\ /Z
(if the whole C-drive is correctly shared). -
Ƭᴇcʜιᴇ007 about 10 years@Rik Whoops, yes. :)
-
Robert Holden about 10 yearsThanks for your help. I got it working. Can post how I did it if anyone is interested?