Solved

run-time error '70'

Posted on 2007-04-06
10
804 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
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
 
LVL 51

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 51

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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
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…

730 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