navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Delete file from my host

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Delete file from my host
Page: [1]
 
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.

(in reply to wizard_oz)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Delete file from my host
Page: [1]
Jump to: 1





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