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.
Best Answer
\\C:\LGR_Back_Up\LGR_A\
is not a valid network path.If
LGR_Backup
is on the local drive, then useC:\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\