How to select only a directory?

thx!
sorry, i found this example, tried it, but mismached the result