× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




I didn't test this, but it should be fairly close. It deletes all files that haven't been accessed in 60 days (change -atime to -mtime if you want files that haven't been modified)

STRQSH CMD('find /my/dir -atime +60 -exec {} \;')

Or, you could do it this way... it runs faster, but is limited in the amount of files it can handle at once:

STRQSH CMD('find /my/dir -atime +60 | xargs rm')

Is calling QShell in this manner elegant? It depends on your point of view. It certainly is easy. Error handling isn't good, however. It requires QShel. Probably doesn't perform very well (especially the first option I listed).

But, it's a lot easier than writing a tool that uses the APIs to do the same thing. (And then when you do write such a tool, someone else posts the QShell method and gets all the credit and gets told that his solution is better than the one that I worked hard to provide.)

---
Scott Klement  http://www.scottklement.com


On Tue, 31 Jan 2006, Fritz Hayes wrote:

OK, so this will combine 2 of the last topices

Here my challenge with IFS files.  I'd like to select all files in an
IFS directory that are older than 60 days from today.  Once selected,
delete them.  My CL is very ugly at this time.  (No I won't show it!)

What's an elegant way of doing this?


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.