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
ChrisF
  • 41,262
jon
  • 75

1 Answers1

2

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

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