list folders ONLY no path

I’m trying to list folders only without their path showing up. This is going into a list for a dropdown menu, that’s why.
Here’s the code I’m toying with, but it lists (obviously) all the folders and files in a directory.


	set myPath to quoted form of POSIX path of alias "Macintosh HD:Users:blah:"
	set read_data to paragraphs of (do shell script "ls " & myPath & " ")

I’ve also tried this, as recommended on a different topic in this forum. This shows the whole path…not acceptable for my app.


	set main_folder to "Macintosh HD:users:blah:"
	tell application "Finder" to set read_data to folders of folder main_folder

I’d like to stick with my do shell script…I’m thinking maybe using ls -p so that it shows a “/” after each folder, then filtering out the files using a loop…but I just don’t know enough to do that.

any and all suggestions welcomed.

Not extensivelly tested, but may work:

set main_folder to "Macintosh HD:users:blah:"
tell application "Finder" to set read_data to name of folders of folder main_folder

--> or:
set main_folder to "Macintosh HD:users:blah:"
set read_data to paragraphs of (do shell script "find " & quoted form of POSIX path of main_folder & "* -type d -prune -exec basename {} \;")