Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FileSystemObject, CopyFile and "Permission Denied" error message

Status
Not open for further replies.

McCabeTC

Programmer
Aug 6, 2003
28
US

Hi everyone,

I need help with the following problem:
I have a Visual Basic application where some of my users are getting a "Permission Denied" error message when trying to copy files from one network drive to another.
Here it is part of my code:

Set fso = CreateObject("Scripting.FileSystemObject")
sourceFile = "K:\UserData\Smith\test1.txt"
destFile = "X:\NetData\EPI\test1.txt"
fso.CopyFile sourceFile, destFile, true
Set fso = Nothing

I believe it has to do with accessing a remote server by impersonating the user logged on to the client machine. Does anybody have any ideas on how to resolve this problem?

Thanks,

TM
 
What happens when using Windows Explorer to perform the same action from the client machine.

Of course, if you get the same "permission denied" error then you had better talk to the System Administrator, if not then repost the result.

"Life is full of learning, and then there is wisdom"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top