#1
  1. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jan 2004
    Location
    Budapest
    Posts
    1,703
    Rep Power
    67

    Server.mapPath on Godaddy IIS7 shared hosting server


    I set up a website using classic asp for a client about a year ago. In the website I wrote scripts that used the FSO object. All was working until the client upgraded to IIS7. Now I can not get the script to work and Godaddy (aaaaargh) tells me I am on my own. Here is my script

    Code:
    Dim objFSO
    Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
    file = "../../bbb.png"
    objFSO.DeleteFile(Server.mapPath(file)), False
    Set objFSO = Nothing
    If I comment out the DeleteFile line the page loads, but if I leave it in I get an error. Can someone please help.
    Today the world, tomorrow the universe...
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,453
    Rep Power
    4539
    Hmm, I wonder if you'd get more help if you shared what the error message is?

    Probably permissions need to be set to allow deletions.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester

IMN logo majestic logo threadwatch logo seochat tools logo