DELETING FILES FROM A FOLDER WITH SPECIFIC EXTENSION

R

R v Deursen

I have a folder that contains generated .pdf files.
In the same folder there is after .pdf creation always a
second file of each pdf with the extension .apd.
I need a VB script that automatically searches for files
with the extension .apd in the same folder as the pdf,s
and deletes them.

There is already a peace of the script, but it is totally
wrong or incomplete.

Thank you so much.

Dim objFSO
Set objFSO = CreateObject
("Scripting.FileSystemObject")
objFSO.DeleteFile "G:\page
store\CERT_TIJDSCHRIFTEN_NL\*.apd"

Set objFSO = Nothing
Wscript.Quit
 
Top