run-time error '70'

Posted on 2007-04-06
Last Modified: 2013-12-26
I get runtine error '70' while copying file from one location to another. Can anyone tell me what is the reason. This code was working perfectly in the past.

Name "C:\Program Files\Comet3\NURESULTS.txt" As "C:\Program Files\Comet3\NURESULTS"

src = "C:\Program Files\Comet3\NURESULTS"
des = "C:\Program Files\Nutech\Client\NURESULTS"
FileCopy src, des  <----- EROR LINE
Question by:Aiysha
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 29

Expert Comment

ID: 18863982
Do you check if both directories exist?
LVL 29

Expert Comment

ID: 18863986
Also double check you permissions.

Author Comment

ID: 18864007
I can do the copy and paste manually without any problems
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 29

Expert Comment

ID: 18864073
But, is the application using the same id?

Try copying to different directories and different files.   Are all affect the same way?
LVL 52

Expert Comment

by:Ryan Chong
ID: 18864532
FileCopy is used to copy file(s) but not directory.

you may try this instead:

src = "C:\Program Files\Comet3\NURESULTS\*.*"
des = "C:\Program Files\Nutech\Client\NURESULTS\*.*"
FileCopy src, des
LVL 29

Expert Comment

ID: 18864548
he is copying a file, just not using an extension. You are doing that, right?
LVL 52

Accepted Solution

Ryan Chong earned 500 total points
ID: 18864569
LOL, that doesn't work... you may try this instead:

src = "C:\Program Files\Comet3\NURESULTS.txt"
des = "C:\Program Files\Nutech\Client\NURESULTS\NURESULTS.txt"
des2 = "C:\Program Files\Nutech\Client\NURESULTS\NURESULTS"
FileCopy src, des

Name des As des2

LVL 17

Expert Comment

ID: 18871611
since you have not permission, the run-time error '70' occured while coping the file to another desntination.
well, maybe you are a limited account and have not permission to C:\Program Files\Nutech or its directories.
so it is because of permission.

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question