我有 win XP,我的目标是将 file.dbf 从本地目录复制到 c:\oracle 目录(通过下面描述的 VB 脚本)
问题是我被拒绝权限(来自 VB 脚本输出)请建议如何启用到 oracle 目录的复制?
Dim currDir
Const OverwriteExisting = True
Set fso = CreateObject("Scripting.FileSystemObject")
currDir = fso.GetParentFolderName(Wscript.ScriptFullName)
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile currDir & "\file.dbf" , "C:\Oracle" , OverwriteExisting
Set objFSO = Nothing
Set fso = Nothing
答案1
您的目标路径中缺少“\”...请尝试:
objFSO.CopyFile currDir & "\file.dbf" , "C:\Oracle\" , OverwriteExisting