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
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
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?
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

LVL 49

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 49

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction While answering a recent question ( in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

705 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now