Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a couple of apps on my mac that keep creating some files every time I launch them

At the moment I have to go to the destination directories to remove them manually, which means i have to remember where they are etcetc.

Is there a way to create links to all those files in a folder so i can just access that folder, delete the links and the linked files will be erased?

in the ideal scenario actually the links i have created should remain where they are, just the file they point to should be removed.

Not sure any of the above is possible though!

Thanks, P.

share|improve this question

migrated from stackoverflow.com Dec 18 '10 at 20:24

This question came from our site for professional and enthusiast programmers.

1  
Link to the directory. –  Ignacio Vazquez-Abrams Dec 18 '10 at 14:44
    
Hola Ignacio, can you please elaborate? do I link with an alias or a simlink? –  Patrick Dec 18 '10 at 16:37

1 Answer 1

There's no way to do exactly what you're asking for, but there are a few ways to come close: One option is to create a folder of alases to the files, then select them one-by-on in the Finder and type Command-R (show original), Command-Delete (delete), Command-[ (takes you back to the folder of aliases); then select the next one, and repeat. It's a little more work than you were imagining (especially if there are a lot of files), but easier than finding & deleting them by hand.

Another option is to create a script to delete them all at once. It could be done in AppleScript or shell script, but Automator is probably easiest for this particular task. Run Automator (in the Applications folder), select the "Application" template. Next, find the "Get Specified Finder Items" action in the second column (there's a search field at the top that's way easier than scrolling through the whole list) and drag that action to the workflow column on the right. Similarly, find the "Move Finder Items to Trash" action and add it to the workflow below the "Get..." action. Click Add in the "Get..." action and add the various files that need to be deleted. Save the workflow(/application) in some convenient place. To use it, just double-click the workflow and the files should vanish.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.