Solved

File Clean up

Posted on 2000-02-15
2
228 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
Comment Utility
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
Comment Utility
Thanks weed. I will experiment with this
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

A lot of new and distinct gadgets are making their appearance every other day. The latest gadget that has wooed the attention of all gadget lovers and non gadget lovers alike is the Smartwatch. This tiny gadget is capable of offering live access to …
In this article we have discussed about the OS X EI Capitan and how to fix Wi-Fi issue in OS X El Capitan. We have explained how to delete system level preferences and create a new Wi-Fi location to resolve Wi-Fi issue.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

728 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now