This workflow will allow you to provide a list of folders and subfolders with a number of users and delete only the folders and subfolders that contain 0 users. However, in case a folder has 0 users, it will also check if all subfolders also have 0 users.
For example if a subfolder /marketing contains 0 users but in marketing/internal there are users, it will not delete the /marketing folder. You can change the table reader to another file reader, but the format has to be similar.
Workflow
Removing Folders and Subfolders with 0 Users
Used extensions & nodes
Created with KNIME Analytics Platform version 5.1.1
Legal
By using or downloading the workflow, you agree to our terms and conditions.