Deny access to directory and all files while allowing access to subdirectories and files

Is there away to block access to all files within a directory while allowing access to all files within subdirectories?

Deny from all

Allow from all

The subdirectory names are dynamical created; I was looking at using DirectoryMatch [A-Za-z0-9]{6} as all those folders are 6 characters long and contain numbers and upper/lower case alpha characters only.