I donβt think there is a way to do this directly, but donβt forget that you can use the test -d and -f options to determine if the name refers to a directory or file.
for a in *; do if [ -d "$a" ]; then echo Directory: $a elif [ -f "$a" ]; then echo File: $a fi done
source share