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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MoveFile problem

Status
Not open for further replies.

b00gieman

Programmer
Jul 9, 2007
60
DE
Hi!
I have to move a file from a server to another.I tried to use the MoveFile method for this , but I'm getting the following error:

Microsoft VBScript runtime error '800a0035'

File not found

the command looks like this:
Code:
 fs.MoveFile Server.MapPath("upload/tmb.xls"), "\\tmav035a\Test\AssetDB_test\tmb.xls"

It seems that the second location(the destination) cannot be found.The guy who's in charge of the server told me I have the permissions to acces the folder.
Did I do something wrong?Is there another way to copy a file between 2 servers?

Thanks in advance!
 
Is your web server configured to use anonymous access? If so the script is probably not being executed under the security context of your account.... instead using the default IUSR_ServerName account. The default account is local to the server and has no network permissions.
 
Are you sure the "File Not Found" portion of that error message isn't referring to the file you are trying to move, rather than the destination? Have you tried a different (local) path in the second argument just to be sure it is finding the file correctly?

Best MS KB Ever:
 
@Sheco:

The application that I'm doing uses the uid and password from Windows(the uid and password used for logging into the windows account).Do I still need to modify the IUSR(the person who's in charge of the server told me I have the permission for writing on that server,but I still get the error) ?
Is there another method to copy files between servers(that can be implemented in asp(vbscript/javascript)) ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top