MoveFile problem

Author Message
b00gieman

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 8/27/2007
  • Status: offline
MoveFile problem Monday, August 27, 2007 7:04 PM (permalink)
0
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 on Monday, August 27, 2007 7:06 PM>
 
#1

    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 1 guests.

    Icon Legend and Permission

    • 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
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2012 ASPPlayground.NET Forum Version 3.9