cd "/my/path" for index in * do echo $index done
if [ -d "folderName" ] then echo "exist" else echo "does not exist" fi