How would I go about creating a button which checks the current folder and all subfolders recursively for files with certain extensions and delete them unless they reside in a folder with a certain name, at which point the recursion should stop?
Examples: (C:\ is the current folder.)
"Delete all .exe and .bat files unless they are in a folder called Important."
C:\alice.exe would be deleted.
C:\temp\bob.bat would be deleted.
C:\work\charlie.exe would be deleted.
C:\work\Important\daniel.bat would NOT be deleted.
C:\work\Important\final\elena.exe would NOT be deleted.