Solved

run-time error '70'

Posted on 2007-04-06
10
801 Views
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
0
Comment
Question by:Aiysha
10 Comments
 
LVL 29

Expert Comment

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

Expert Comment

by:leonstryker
ID: 18863986
Also double check you permissions.
0
 

Author Comment

by:Aiysha
ID: 18864007
I can do the copy and paste manually without any problems
0
 
LVL 29

Expert Comment

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

Try copying to different directories and different files.   Are all affect the same way?
0
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
0
 
LVL 29

Expert Comment

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

Accepted Solution

by:
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

0
 
LVL 17

Expert Comment

by:CSecurity
ID: 18871611
hello
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.
Regards!
0

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 (http://www.experts-exchange.com/Q_27402310.html) 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