|
|
 |
Re: FN-FORUM: ASP Help
date posted 10th August 2004 16:58
you can use server.mapPath("relativefilepath") to create a physical
path to the file
Hope this helps,
Ciaron.
On 10 Aug 2004, at 17:32, Damon Birch wrote:
Physical paths only
I can't remember if you can use wildcards
Damon
-----Original Message-----
From: [EMAIL REMOVED] [EMAIL REMOVED] On Behalf Of Paul
Cooper
Sent: 10 August 2004 17:25
To: FN-FORUM / [EMAIL REMOVED]
Subject: FN-FORUM: ASP Help
Hi
I have a set of files in a specific folder that are named like this...
MedicalMeeting_f1_85.pdf
MedicalMeeting_f2_85.pdf
MedicalMeeting_f1_87.pdf
MedicalMeeting_f2_87.pdf
The Number at the end is my ID.
So when it comes to deleting these files I hoped this would work...
dim fs
Set fs=Server.CreateObject("Scripting.FileSystemObject")
if
fs.FileExists("/vpo/documentlibrary/medicalmeetings/MedicalMeeting_f1_"
&
strID & ".doc") then
fs.DeleteFile("/vpo/documentlibrary/medicalmeetings/MedicalMeeting_f1_"
&
strID & ".doc")
end if
set fs=nothing
But it's not working. Can you use virtual paths with FileExist &
DeleteFile
or do I have to use a physical path. Also some files will be PDFs,
others
DOCs etc. How can I use a wildcard for the last bit? IE
fs.DeleteFile("/vpo/documentlibrary/medicalmeetings/MedicalMeeting_f1_"
&
strID & "*")
TIA
Paul
Paul Cooper
Internet Developer
Intex Design
http://www.intexdesign.net
_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today!
http://www.msn.co.uk/messenger
--
Freelancers, contractors earn more with Prosperity4
Call 0870 870 4414 or visit www.prosperity4.com
and benefit from Inland Revenue approved expenses today.
To advertise here: http://www.freelancers.net/advertising.html
--
Freelancers, contractors earn more with Prosperity4
Call 0870 870 4414 or visit www.prosperity4.com
and benefit from Inland Revenue approved expenses today.
To advertise here: http://www.freelancers.net/advertising.html
|
 |
|