FileSystemObject Moving Files

Results 1 to 2 of 2

Thread: FileSystemObject Moving Files

  1. #1
    Join Date
    Dec 1969

    Default FileSystemObject Moving Files

    The following code :<BR><BR>Response.Write Request.ServerVariables("PATH_INFO")<BR><BR>return s "/ham1/CHA002.asp"<BR><BR><BR>From this page "CHA002" I am getting a file from "/ham1/Images" and trying to move it to "/ham1/Temp" thus :<BR><BR>&#039;Path to and name of the gif to be attached<BR>strImagePath = "CoyleHam1Images\" & strImageName<BR> <BR>&#039;Path to move the file to<BR>strImagePathCopy = "CoyleHam1Temp\" & strImageName<BR> <BR>&#039;move file to another directory and rename it....<BR>objFSO.CopyFile server.MapPath ("strImagePath ),server.MapPath (strImagePathCopy )<BR><BR>Error then tells me that the file cant be found (as is not in the directory ).<BR><BR>I am using what seem to be correct virtual paths what am I doing wrong????<BR><BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: FileSystemObject Moving Files

    what are you doing wrong? well , you&#039;re using virtual paths. they need to be full filesystem paths. look up Server.MapPath()<BR><BR><BR>j<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts