Just a bit of best practice I use. I don't blindly execute a script to delete something.
I first run a query to get a list of file / folder paths that match my criteria.
Once I have my list and reviewed it I utilize it as a source file to execute the deletion to assure I only remove files/folders in my list.