Accessing folder names

Hi…
Can any one tell me how to check folder names…??

For example I have a folder named 1, I want to return a value 1 if the folder name is 1 or else return 0…??Is this possible…If Yes,please tell me the procedure…!
Plz Help…!

Thanks,
Nirmal.