powershell - empty directories

PHOTO EMBED

Thu Jun 20 2024 09:10:21 GMT+0000 (Coordinated Universal Time)

Saved by @baamn

get-childitem "Q:\Data\" -recurse | 
Where-Object { $_.PSIsContainer } |   
Where-Object { $_.GetFiles().Count -eq 0 } |   
Where-Object { $_.GetDirectories().Count -eq 0 } |    
ForEach-Object { $_.FullName } |   
Out-File -FilePath C:\Users\user\Desktop\results.txt
content_copyCOPY

https://community.spiceworks.com/t/powershell-move-folders-from-txt-file-to-another-drive-with-dir-structure/715354