|
|
 |
FN-FORUM: ASP Help
date posted 10th August 2004 16:31
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
|
 |
|