Solved

File Clean up

Posted on 2000-02-15
2
262 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
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Information security is a multi-billion dollar industry. Just as lucrative is the black market industry which trades stolen identities, credit card numbers and software exploits all over the world. Nothing is hack-proof. The best one can do is make …
This article describes in detail how to set up the iPad in the Enterprise using iPCU aka iPhone Configuration Utility.  This could also be used for the iPhone although I have not detailed out any differences. Preparation as an iPad Administrator:…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

756 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