如何在 .bat 文件中给出正确的路径以将文件从 windows 服务器复制到本地 windows
How to give right path in .bat file to copy file from windows server to local windows
您好,我正在制作一个批处理文件,它将文件从服务器的用户 C 驱动器复制到本地计算机。
这是我目前所拥有的。
net use "\\Trail01" "trail@1234" "/USER:ashique.sheikh"
XCOPY /Y "\\Trail01\c:\Users\ashique.sheikh\Desktop\Day2.R" "D:\newfolder"
我的服务器名称是 \Trail01
。
文件路径为c:\Users\ashique.sheikh\Desktop\Day2.R
.
试试这个,您将需要网络使用的管理员凭据,因为 C 驱动器是管理共享
net use N: \trail01\c$ trail@1234 /USER:ashique.sheikh
XCOPY /Y "N:\Users\ashique.sheikh\Desktop\Day2.R" "D:\newfolder"
您好,我正在制作一个批处理文件,它将文件从服务器的用户 C 驱动器复制到本地计算机。
这是我目前所拥有的。
net use "\\Trail01" "trail@1234" "/USER:ashique.sheikh"
XCOPY /Y "\\Trail01\c:\Users\ashique.sheikh\Desktop\Day2.R" "D:\newfolder"
我的服务器名称是 \Trail01
。
文件路径为c:\Users\ashique.sheikh\Desktop\Day2.R
.
试试这个,您将需要网络使用的管理员凭据,因为 C 驱动器是管理共享
net use N: \trail01\c$ trail@1234 /USER:ashique.sheikh
XCOPY /Y "N:\Users\ashique.sheikh\Desktop\Day2.R" "D:\newfolder"