Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

powershell delete empty folders

$tdc="C:acd"
$dirs = gci $tdc -directory -recurse | Where { (gci $_.fullName).count -eq 0 } | select -expandproperty FullName
$dirs | Foreach-Object { Remove-Item $_ }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #powershell #delete #empty #folders
ADD COMMENT
Topic
Name
9+8 =