Hi,
I've tried to right a script that delete files of a certain type using the wildcard and _AFP_AFPINFO.
I've done some searching on the web and have come up empty as everything I found was for an extension or a file of a certain age.
Here's my test code, not entirely sure where I've gone wrong but I hope someone can put me in the right direction as it's driving me mad.
Thanks In advance
T1b
Dim objFSO, objFolder, objFiles, objFile
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("C:\Test")
Set colSubfolders = objFolder.Subfolders
Set objFiles = objFolder.Files
For Each objFile in objFiles
If UCase(left(objFile.Name,6)) = "*_AFP_*" Then objFile.Delete, True
Next
Set objFiles = Nothing
Set objFolder = Nothing
Set objFSO = Nothing