I need help in OS X

I have a folder which has over 300 folders in that folder. Obviously each folder has a different name. Does anyone know of a way of just copying all the folder names and putting it in a text file? Is there a simple way to do this?

I know windows can do this but I do not know how to do it on windows either. I just know it can be done lol.

Basically this is for a reference. I do not want to sit there and click each folder and then copy and paste each folder name onto a text file.

Thanks for the help!