Question re FileSystemObject



Hi all.

I am trying to do a cleanup when closing my access mdb.

Data has been transferred to word.
All works fine but when for a reason no data has been transferred to word
and so no *.dot is in the temp folder an error occurs with message 'file not
what changes need to be made in order to: "only kill files *.dot when
something is in temp folder otherwise no cleanup necessary"

here's my code:
sysTemp = Environ("TEMP")

Set fso = CreateObject("Scripting.FileSystemObject")
Set Folder = fso.GetFolder(sysTemp)

If Folder <> "" Then
Kill sysTemp & "\*.dot"
End If

Many thanks in advance !!



Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

FileSystemObject 2
FileSystemObject 2
FileSystemObject 5
FileSystemObject 2
FileSystemObject 1
FileSystemObject No LongName 1
FileSystemObject drive error 4
FileSystemObject Remane file 7