Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.