Delete files in directory

  • Thread starter Thread starter Lee Taylor-Vaughan
  • Start date Start date
L

Lee Taylor-Vaughan

How can i delete files in a directory by clicking a command button.
i.e. C:\Prog\*.pdf

THanks
Lee
 
Lee Taylor-Vaughan said:
How can i delete files in a directory by clicking a command button.
i.e. C:\Prog\*.pdf


For example:

'----- start of example code ------
Private Sub cmdDeletePDFs_Click()

Kill "C:\Prog\*.pdf"

End Sub
'----- end of example code ------

Of course, you have to have delete permissions on the folder and files.
 
Back
Top