Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

File Clean up

Posted on 2000-02-15
2
Medium Priority
?
276 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 400 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

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.
Article by: Justin
In light of the WannaCry ransomware attack that affected millions of Windows machines, you might wonder if your Mac needs protecting. Yes, it does and here is how to do it.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

719 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