|
| |
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
Delete file from my host - 9/7/2006 12:24:37
Hi, I would like to delete a file from my host. The code: set objFSO=server.CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile "C:\Inetpub\wwwroot\magenli\Pictures\SinglePage\" & rs("CategoryPic")
is working fine but I would like to delete the file from relative directory and not from an absolute. the problem is, if i am using : objFSO.DeleteFile "../Pictures/SinglePage/" & rs("CategoryPic") it doesn't work, Can someone help me? Thanks, Elen
|
|
|
|
rdouglass
Posts: 9228 From: Biddeford, ME USA Status: offline
|
RE: Delete file from my host - 9/7/2006 14:05:56
IIRC the FSO stuff always works with an absolute path and not a relative path. Having said that, we can usually get the absolute path by using Server.Mappath function. Maybe like this: objFSO.DeleteFile Server.Mappath("../Pictures/SinglePage/" & rs("CategoryPic")) Not sure of all your other stuff but I use Server.Mappath with FSO's all the time so I'm sure they work with 'em. Hope it helps.
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
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
|
|
|