FileCopy and Permission Denied

erin_allen
erin_allen used Ask the Experts™
on
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?

Thanks,
Erin

Comment
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.



Author

Commented:
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.

Thanks.
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