Trying to add subfolders to this file delete script

Hi,

This simple code works but I need help. I want to choose a parent folder and have the script find all the subfolders whose names are “CaptureOne” and delete those too.

Any help would be appreciated.

Thanks

Robert


try
	tell application "Finder"
		delete (every folder of (choose folder) whose name is "CaptureOne")
	end tell
end try

Hi. Welcome to MacScripter.

Assuming the “CaptureOne” folders are subfolders of subfolders, you need to add entire contents to the Finder reference:


try
	tell application "Finder"
		delete (every folder of entire contents of (choose folder) whose name is "CaptureOne")
	end tell
end try

Thank You! I have so many files to clean up and that’s going to save so much time!:cool: