Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
share|improve this question
up vote 2 down vote accepted

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

objFSO.CopyFile currDir  & "\file.dbf" , "C:\Oracle\" , OverwriteExisting
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .