Bat 文件 - 在某些情况下,远程桌面的网络使用效果不佳 [英] Bat file - Net use from remote desktop not work well in some cases

查看:80
本文介绍了Bat 文件 - 在某些情况下,远程桌面的网络使用效果不佳的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试从远程桌面运行 .bat 文件.

I try to run .bat file from remote desktop.

我通过运行下一个命令来完成:

I do it by run the next command:

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

然后,我尝试从远程桌面 xcopy 到我的计算机.所以我写了这个:

then, I try to xcopy from the remote desktop to my computer. So I write this:

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

但在某些情况下,此命令执行得不好.

But in some cases, this command is not execute well.

我也试过这个,但它不起作用:

I also try this, and it doesn't work:

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

它也不起作用.

可能是什么问题.

推荐答案

尝试映射共享,然后在使用 xcopy

Try mapping the share, then change to that drive before using xcopy

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

这篇关于Bat 文件 - 在某些情况下,远程桌面的网络使用效果不佳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆