Deleting empty folders

Hey, I need help with writing a shell script that deletes empty folders..anyone? :slight_smile:
Thank you!

check, whether your find command has -empty or not

 
find . -empty -type d
for i in `find FILEPATH -type d -empty`
do
rmdir $i
done

Thanks!

why do we need fi ?

Oops...dats my bad...pls ignore fi