Hi,
I want delete all files in a folder, but I get access denied as the file is locked.
I use an email function before i'm trying to delete the files, the send email is a built in function of the application:
fcMailer.SendMailWithAttachment Process.Company, "email", Subj, "Bo", "e:\upload\test.xls"
i tried to set it to nothing: set fcMailer = nothing and set fcMailer.SendMailWithAttachment = nothing
I'm using the below to delete the files
[code]
Const DeleteReadOnly = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile("e:\upload\*.*"), DeleteReadOnly
[/code]
How do i remove connection holding the file or simply just delete all locked files / or not locked
Please Assist!