How to check if a folder exists

Hi,
I want to use Auto index to generate list of news items.The folder structure would be as following -
News -
- releases
-2012
-01
-02

-2011
-01
-02

I have a section where i need to show the most recent news, for which i want to check if any content item exists in most recent folder(in this case 2012-04) and if not found, search in the previous folder(2012-03) until a content item is found. I wanted to know how can i check in a template that certain folder exists or not.