I'm trying to copy files from remote machine using construction like this
copy smb://DOMAIN;USERLOGIN:Password@188.8.131.52/folder/ C:/tmp/
it shows next message -
The filename, directory name, or volume label syntax is incorrect.
I guess that win command "copy" works only with directories... The main idea is to copy files over SMB protocol EXACTLY within userLogin and password.
So, I was serfing the internet and i found that "USE NET" may help me. When i tried to use it, it said me that there are multiple connections on the same resource. Then i tried to "USE NET \COMPNAME\folder DELETE" it shew that operation had been performed sucessful but message about multiple connections still the same during another attempts of using "USE NET".
Furthermore - if i could make such NET resource, would i be able to copy\delete files from that?
Thanks in advance.
P.S. Sorry for my poor English.
As Somesh mentioned i 've used USE NET for downloading files from multiple places But unfortunately problem with multiple connetions within login and pass still exist. I couldnt find any active on current machine by using USE NET without an arguments. Similar problem is here: System error 1219 has occurred
if it interesting to someone here is my sample-script:
@echo off @echo initializing loop. set disk="T" set destination="D:\downloads\temp" REM set user = "USER" REM set password = "PASS" REM set domain = "DOMAIN" for /F %%S in (shares.txt) do ( @echo start of performing: %%S @echo next step: mount network disk %disk%: pause DIR %disk%: 1>NUL && net use %disk%: /delete net use %disk%: %%S /persistent:no REM net use %%S /USER:%domain%\%user% %password% /persistent:no @echo next step: copy all files from %disk%: to %destination% pause xcopy %disk%:\* %destination% /s /i /c @echo next step: dismount network disk %disk%: pause net use %disk%: /delete ) pause