You requested Powershell so here you go. Just change the C:\Folder to wherever you need. This script will get a list of folders in the root, then a list of files/folders in those folders and delete them.
Get-ChildItem -path C:\Folder\ | ?{ $_.PSIsContainer } | Foreach-Object{
$_ | Get-ChildItem -Recurse | Remove-Item
}
This can be expanded. Say I have the structure
ROOT
-Nick
--Nick1
---myfile.txt
--Nick2
---myfile.txt
-Bob
--Bob1
---hisfile.txt
--Bob2
---hisfile.txt
I could use the following to delete anything in the Nick1, Nick2, Bob1, Bob2 folders (Including folders) but leave the preceding structure in place. If I wanted to remove the Bob1, Bob2, Nick1, and Nick2 folders I would use the first command (Above) that would leave only Nick and Bob folders in place.
Get-ChildItem -path C:\Folder\ | ?{ $_.PSIsContainer } | Foreach-Object{
$_Get-ChildItem | ?{ $_.PSIsContainer } | Foreach-Object{
$_ | Get-ChildItem -Recurse | Remove-Item
}
}
you could compress this down to a one liner
Get-ChildItem -path C:\Folder\ | ? { $_.PSIsContainer } | Get-ChildItem | ? { $_.PSIsContainer } | Get-ChildItem -Recurse | Remove-Item