Hi,
Here is the listing. The stars specify where is the problem.

Private Sub Com_SupFichTemp_Click()
'Kill files
Dim sChemin As String
For i = 0 To File_FichTemp.ListCount
sChemin = File_FichTemp.Path + "\" + File_FichTemp.List(i)
*** If File_FichTemp.List(i).Locked = True Then
Kill sChemin
End If
Next i
Form_EpurationFich.Refresh
End Sub

I want to kill some files .tmp but some of then are used by the application (in VB6) I want to kill them through the application and it's make me problems.

Also I would like to add another condition, but for that I need to know the file's date and make the second condition with it.
Thanks!

[Edited by PomHappy on 10-06-2000 at 09:37 AM]