Im getting the error that a datatype was not defined by the user
it highlights : Dim fsoFile As New FileSystemObject.
I editted the code to test it and more importantly because i do not want to delete all pdf files in the dir 
The reason i wanna exclude thumbs.db file rather then counting .pdf is because we might one day change from using pdf
to lets say Word files. Then ill have to change the codes.
Code:
Dim strFile As String
strFile = "I:\MyDirectory\MySubdirectory\"
Dim fsoFile As New FileSystemObject
Dim objFolder As folder
Dim objFile As File
Set objFolder = fsoFile.GetFolder(strFile)
For Each objFile In objFolder.Files
If InStr(objFile.Name, ".db") Then
MsgBox "There are database files"
Else
MsgBox "There are no database files"
End If
Next
Set objFolder = Nothing