in reply to How do I determine whether a folder is empty?
grep? egrep? find? ls? There's a bunch of tools you could use. You can use wildcards to filter the results. Be creative and keep it simple. There's no need to do this with more than a single line of code.