Solved

File Clean up

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Title # Comments Views Activity
VLan and Voice Vlan 5 84
Does this Mac directory tree look right? 2 128
mac operating system 8 114
After upgrade, MacBook stuck in login loop ? 2 84
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:…
In this article we will discuss some EI Capitan Mail app issues and provide some manual process to resolve them.

734 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