Solved

File Clean up

Posted on 2000-02-15
2
272 Views
Last Modified: 2010-04-14
Can someone give me a way(a script,maybe ) to force Finder to search and destroy certain'named' files?
I need to run this as a Shutdown Item to clear out spurious unwanted files at the end of the day on ALL available disks.
0
Comment
Question by:mog
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 30

Accepted Solution

by:
weed earned 100 total points
ID: 2524039
heres a handy script thatll do it.

tell application "Finder"
      select file "whatever"
      delete selection
      
      select file "whatever" of folder "a folder" of folder "another folder" of startup disk
      delete selection
end tell

You will need to edit the script to work for your situation as well as add other files. This script deletes imaginary items on my HD.

The first part works for files that are on the dekstop, the second part works for nested files/folders. I created the script by opening the Script Editor and hitting the record button, then deleting all the files i wanted to delete, you can speed it up by eliminating the lines that tell the finder to open windows or make selections. Save it as an application and put it in your shutdown items folder.
0
 

Author Comment

by:mog
ID: 2526579
Thanks weed. I will experiment with this
0

Featured Post

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Apple's Mac OS X has become an official member of the malware club. The Flashback Trojan has affected over half million Macs, worldwide. It is behavior that ultimately gets malware onto a person’s computer. Obsolete or out-of-date software helps…
Create a default user profile for Mac OS X 10.7/10.8 Create a user account on OS X that will be a template for every other user of that computer. I usually call it “profile” and make it an administrator account for the time being. 1. Install a…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question