I would like to delete all the files and subfolders from a folder except read-only files.
How to do it using powershell?
For reference, this is a bit easier in V3:
Get-ChildItem -Attributes !r | Remove-Item -Recurse -Force -WhatIf
or the short (alias) version:
dir -at !r | ri -r -f -wh