FileCopy and Permission Denied

erin_allen used Ask the Experts™
I have a VB5 application that copies several files from one directory to another.  This application is running fine on most machines, but on one particular machine/user/location it is failing.

When the files aren't in the final directory every thing runs fine, but when the files are already there and the app tries to do a FileCopy, the Permission Denied error appears.  When I try to manually delete these files I get the same error.  If I open the files and resave them, I can delete them no problem.

What's going on?  Is the security for the user causing the problem?


Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I think you've solve your own problem! Is your system a multiple use machine.  Was the foler created as a different user.  If you log in a Administrator then check the permissions for the folder.  Further if you are using Win 2K+ the default user profiles may exclude deletion but allow change. Once the data has been saved I suspect that Windows may remember that you have elevated rights over that specific file but I would not know about that issue.


The folder is actually on a server and not the user's machine.  She is using a multiple user machine however.  

And I believe we only have change permissions for these users.  I'll try and get it changed to include delete.

Are you using the Dir function?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial