Over time, file shares tend to collect empty folders, which makes it harder for users to find the data they need. Therefore, from time to time, IT pros need to find empty folders so they can remove the empty directories. With manual methods, searching for empty folders takes a lot of time, so you might want to automate this task with a Windows PowerShell script like the one provided above; it parses all folders on a share and lists those that contain no files or other folders. However, this script can take a long time to execute if there are many folders on your file server.
It is much easier and quicker to open a predefined report. Try Netwrix Auditor for Windows File Servers. In a few clicks, you can get a clear list of all empty folders, so you can review and delete empty folders for a share that’s easier to use and manage. NA even helps you further optimize your file share structure by reporting on duplicate files and folders and stale data.
Of course, Netwrix Auditor software does a lot more than report on empty folders and stale data. For example, it reports on changes made to files, folders, shares and permissions; delivers visibility into effective permissions; and alerts you about critical events, such as the modification of large number of files in a short period of time, which can be a sign of a ransomware attack in progress. No matter what you want to report on, you’ll save time with its predefined and custom reports, flexible filtering, exporting options and report subscriptions.