In Windows, I need to recursively delete a directory except for a short list of files to be kept. The files may be nested in subdirectories.
I tried making the files read-only before running "rmdir /s", but it doesn't work. Read-only files cannot be deleted directly, but they are deleted when inside a subdirectory being deleted with "rmdir /s".
Any other ideas?