2012-12-14 18 views
0

我嘗試從遠程桌面運行.bat文件。Bat文件 - 遠程桌面的網絡使用在某些情況下不能很好地工作

我這樣做是由運行下一個命令:

net use m: \\the-ip-of-the-remote-computer mypassword /myuser 
// Execution works well 

然後,我嘗試從遠程桌面我的電腦XCOPY。所以,我寫這篇文章:

net use t: \\the-ip-of-the-remote-desktop mypassword /myuser 
xcopy \\the-ip-of-the-remote-computer my-libary 

但在某些情況下,該命令不執行好。

我也試試這個,它不工作:

net use m: \\the-ip-of-the-remote-desktop mypassword /myuser 
xcopy net use t: \\the-ip-of-the-remote-computer mypassword /myuser my-libary 

,它也不起作用。

可能是什麼問題。

+0

它看起來像你錯過你的例子共享名前切換到該驅動器:淨使用T:\\ yourpc \共享名你的密碼/用戶:yourusername在什麼情況下失敗?任何錯誤? – rene

+0

@rene:我添加了共享名稱,它不起作用。沒有錯誤(.bat文件在本地運行良好)。 –

回答

0

嘗試映射共享位置,然後使用xcopy

net use M: \\the-ip-of-the-remote-computer mypassword /myuser 
pushd M:\ 
xcopy folder\filetocopy C:\yourcdrivefolder 
相關問題