How to delete all empty folders and sub-folders and files in a specified directory

That looks correct.