Hi,
why don't you use simple DIR and KILL?
see vba help for DIR function..
there's a good example there on how to loop....
the KILL explains itself...
< email : keepitcool chello nl (with @ and .) >
< homepage:
http://members.chello.nl/keepitcool >
"R v Deursen" <(E-Mail Removed)> wrote:
> 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
>
>