Today is: 10 March, 2010

file system

Powershell function to remove empty directories

I created the following recursive function to delete empty directories. I made it recursive instead of using the built-in recursive argument because I was working with large file system, and the file and directory "counting" that the recursive flag does was a bit cumbersom. The force flag on the get-childitem cmdlet will cause the cmdlet to discover hidden files.

Syndicate content