Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

max6166

macrumors newbie
Original poster
Jun 14, 2010
26
0
Toronto, Canada
I have a folder from which I regularly have to delete a few different types of files. It is a little tedious to do manually, so I was hoping there might be a better solution.

Ideally, I am hoping for a command that I could access from the context menu that would recursively find and delete any files with specific extensions.

Thanks.
 
you could make a simple applescript to remove them, you could then have your mac run that script every time you log in so you don't have to worry about it.

tell em what file types and from what folder you want to remove and ill write it for you if you want.
 
Last edited:
Thanks very much for the offer, Mulo. I managed to hack some AppleScript I found which is pretty close to what I need though.

I could use some help debugging it though. For some reason, it doesn't seem to delete ".srr" files. But it deletes all the other file types just fine...?

My suspicion is that the problem is actually not with the script, but lies somewhere else. I have no idea what it could be though...

Here is the script I am using:

========
tell application "Finder"
set f to (files of entire contents of folder ((path to home folder as Unicode text) & "Downloads:_Incoming:") whose name extension is "sfv" or name extension is "par" or name extension is "par2" or name extension is "nzb" or name extension is "srr") as alias list
repeat with aFile in f
delete aFile
end repeat
end tell

=========
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.