Android Code Snippet Delete specific files according to their type from a specific folder simple short code

B4X:
Dim Dir As String=File.DirInternal
For Each n As String In File.ListFiles(Dir)
        Log(n)
        If     n.Contains(".pdf") Then
            If File.Exists(Dir,n) Then
                File.Delete(Dir,n)
                Log("del")
            End If
        End If
    Next
 
Top