Rule for matching real folders

Hi.
I trying to create a drop-box that sends files to my server and then presents a link for me to share. To make it easy for others I want to compress folders. Problem is that os X mix up folders and files, example applications. In terminal the app is a folder, in finder the app is an app.
My question is: How do I match a rule towards all folders regardless if they are treated as files in os x?
I trying to create a drop-box that sends files to my server and then presents a link for me to share. To make it easy for others I want to compress folders. Problem is that os X mix up folders and files, example applications. In terminal the app is a folder, in finder the app is an app.
My question is: How do I match a rule towards all folders regardless if they are treated as files in os x?