Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


MoveFile problem

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,51221
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> MoveFile problem
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 MoveFile problem - 8/27/2007 6:04:25 PM   
  b00gieman

 

Posts: 1
Score: 0
Joined: 8/27/2007
Status: offline
Hi!
I want to copy files between 2 servers.For this,I chose to use the MoveFile method.The problem is I'm getting the following error:

Microsoft VBScript runtime error '800a0035'
File not found

Here's my code:


<%
   dim fs
   set fs=Server.CreateObject("Scripting.FileSystemObject")
 
    If fs.FileExists(Server.MapPath("upload\tmb2.xls"))Then
        Response.Write"File exists!"
    Else
        Response.Write"File doesn't exist!"
        End If   
  
   'Response.Write(Server.MapPath("upload/tmb2.xls"))
  
    If fs.FileExists("\\tmav035a\Test\AssetDB_test\tmb24.xls") Then
           Response.Write "File exists!"
    Else
          Response.Write "File does not exist!"
    End If
 
   fs.MoveFile Server.MapPath("upload/tmb2.xls"), "\\tmav035a\Test\AssetDB_test"
  
   set fs=nothing


%>

It appears that the first file exists and the 2nd file doesn't exists.

I want to use this code in an application where the users are identified by the windows account(so no need for user name and password).
Am I doing something wrong?

< Message edited by b00gieman -- 8/27/2007 6:06:14 PM >
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> MoveFile problem Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts