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?

/directory/
Deny from all

/directory/subdirectory/
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.