I would hardly trust any IA for a so touchy thing as deleting files or folders.
Here is a tested PowerShell script that I’m using quite often after file reorganization.
It needs to be launched several times because if X:\A\B\C\D only contains D which is empty, it will delete D, then C on second launch, then B etc.
$RootPath = "E:\Musique"
$Dirs = Get-ChildItem -Path $RootPath -directory -Recurse
foreach ($item in $Dirs) {
$taille = (Get-ChildItem -LiteralPath "$($item.Fullname)" | measure-object | select -ExpandProperty count)
if ( $taille -eq '0')
{
#write-verbose -Message "Dir $($item.Fullname) is empty" -Verbose
remove-item -LiteralPath "$($item.Fullname)" -Verbose
}
}
Read-Host -Prompt "Done - Press Enter to exit"