Windows 使用vbscript将文件从一台服务器复制到同一域中的另一台服务器

Windows 使用vbscript将文件从一台服务器复制到同一域中的另一台服务器,windows,vbscript,Windows,Vbscript,我不熟悉Vb脚本。 我需要将文件从一个服务器位置复制到另一个服务器。我使用的代码如下: Set objFSO = CreateObject("Scripting.FileSystemObject") strSourcePath = "D:\sample.txt" strDestinationPath = "\\servername\D:\foldername\" objFSO.CopyFile strSourcePath,strDestinationPath 但我得到一个“路径未找到”错

我不熟悉
Vb脚本
。 我需要将文件从一个服务器位置复制到另一个服务器。我使用的代码如下:

Set objFSO = CreateObject("Scripting.FileSystemObject")

strSourcePath = "D:\sample.txt"

strDestinationPath = "\\servername\D:\foldername\"

objFSO.CopyFile strSourcePath,strDestinationPath
但我得到一个“路径未找到”错误,我想一个消息,该文件已复制到文本文件


您能帮我一下吗?

必须在目标路径上使用共享名,例如\\servername\d$\foldername\

D:不是共享,但D$是管理员共享