import os

def delete_empty_folders_in_directory(directory):
    print(f"Checking directory: {directory}")
    # Get all the items in the directory
    for item in os.listdir(directory):
        item_path = os.path.join(directory, item)
        
        # Check if the item is a directory
        if os.path.isdir(item_path):
            # Try to list contents
            try:
                contents = os.listdir(item_path)
                if not contents:
                    # Directory is empty, try to delete it
                    os.rmdir(item_path)
                    print(f"Deleted empty folder: {item_path}")
                else:
                    print(f"Folder is not empty: {item_path}")
            except Exception as e:
                print(f"Error checking folder {item_path}: {e}")

# Example usage
current_directory = os.getcwd()  # Get the current working directory
delete_empty_folders_in_directory(current_directory)
