Sorry, could not reply directly so had to create a new answer, this is the short form my longer reply has more details if interested so I will leave both...
His question is for a windows host to a nix host [dunno if Linux or Unix prolly Linux] so /home/ is shared by default in most cases the share in Windows would be \\IP OR FQDN or WindBind address [usually FQDN or IP as Linux by default does not handle Windbind unless you manually enable it]
So in Windows to Linux using more defaults than not
net use X: \\192.168.10.90\home\lgr /user:IP [or FQDN if IP fails] of server\username
[Windows in my experience does not handle IPs well within the user statement for specifying host to auth against usually has to be FQDN [full DNS like server.local not just server almost all DNS clients set name.local by default if you only know Windows host name add .local it may work for you or winbind but IP can work some times]
Robocopy X:\*.* C:\LGR_Back_UP\LGR_A /s /e /z [copy all files including sub-directories even if directory is empty in restartable [if error in transfer re-copy file] mode if command fails delete /z and try again]
net use x: /del /y [disconnects net share on drive letter X without asking for interactive confirmation [since you use script you would want this]]
Sorry in reply to post above, but also includes robocopy command I would use in your case [if it fails with /z [restartable mode incase something happens during copy sometimes does not work in certain setups just leave it off] /s = copy all sub directories /e = including any empty sub-directories.
This should be easier to match up to your specific case and refer to my longer post above for more detail.
OH AND FOR YOU OTHER QUESTION TO GO "BACK" or UP A DIRECTORY LEVEL FROM WHERE YOU ARE CURRENTLY ISSUE
cd ..
and hit enter
.. always refers to directory above in all OSes [you can use in scripts like so too if I have C:\some\directory and I run my script in directory if I do copy ..\file.ext C:\some\directory that would copy the file in the directory named some to the directory named directory when running the command when you are in directory at the command line :-)
OR
cd /
in Windows takes you to the root directory for the drive you are on so if I ran that from
c:\some\long\directory\that\takes\a\long\time\to\cd ..\from> cd /
I would get
c:\>
MUCH LOVE COMMAND LINE :-D
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? – TheUser1024 – 2014-03-10T13:27:58.803
A network share cannot be the working directory of
cmd.exe
. Still, I believe your problem lies elsewhere. – Daniel B – 2014-03-10T13:33:36.407