Link to home
Start Free TrialLog in
Avatar of Aiysha
AiyshaFlag for United States of America

asked on

run-time error '70'

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
Avatar of leonstryker
leonstryker
Flag of United States of America image

Do you check if both directories exist?
Also double check you permissions.
Avatar of Aiysha

ASKER

I can do the copy and paste manually without any problems
But, is the application using the same id?

Try copying to different directories and different files.   Are all affect the same way?
Avatar of Ryan Chong
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
he is copying a file, just not using an extension. You are doing that, right?
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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!