VB script + get permission denied when copy file (on XP)

2

I have win XP , my target is to copy the file.dbf from local dir to c:\oracle directory ( by VB script described below)

The problem is that I get permission denied (from the VB script output) Please advice how to enable copy to oracle directory?

  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

jon

Posted 2011-03-29T10:34:45.847

Reputation: 75

Answers

2

You're missing a '\' from your destination path... try:

objFSO.CopyFile currDir  & "\file.dbf" , "C:\Oracle\" , OverwriteExisting

nimizen

Posted 2011-03-29T10:34:45.847

Reputation: 226