Michael
Sun Jul 27 19:29:30 CDT 2003
You will find this in the script here
http://cwashington.netreach.net/depo/view.asp?Index=764&ScriptType=vbscript
Set oFSO = createobject("scripting.filesystemobject")
<...>
'// Move the lead file to the archive folder
'// Need to handle duplicate file names in this
If (fileExists("D:\avv\Archives\" & sFN)) then
oFSO.deletefile ("D:\avv\Archives\" & sFN)
End If
<...>
--
Regards,
Michael Holzemer
No email replies please - reply in newsgroup
Learn script faster by searching here
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/scriptcenter/default.asp
"Chris Moore" <chris@dblayoutdotcom> wrote in message
news:Xns93C5C4E37DD12cabubba@207.46.248.16...
> I have a script (that I got from this group, thank you for this) that
> creats an Excel file from my an SQL statement. The problem is if the file
> already exists, it errors off. I would like to do just a 'blind' delete of
> the file so the Create doesn't error off. Is there a way delete a file in
> VBScript?
>
> Thanks
>
> Chris