• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Counting & trashing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Counting & trashing


  • Subject: Re: Counting & trashing
  • From: Bernard Azancot <email@hidden>
  • Date: Wed, 14 Jul 2004 16:17:27 +0200

Le 14 juil. 04, ` 15:21, email@hidden wrote:

(* Script Start *)
property cutoff : 15
set targDate to ((current date) - (cutoff * days))
set targFolder to choose folder

tell application "Finder"
set foldersOfTargFolder to every folder of targFolder
if (count of foldersOfTargFolder) is greater than cutoff then
delete (every folder of targFolder whose creation date is less than targDate)
end if
end tell
(* Script End *)

JBS

This one is great.
I had to change a detail to use it.


(* Script Start *)
property cutoff : 15

tell application "Finder"
set targDate to ((current date) - (cutoff * days))
set targFolder to choose folder
set foldersOfTargFolder to every folder of targFolder
if (count of foldersOfTargFolder) is greater than cutoff then
delete (every folder of targFolder whose creation date is less than targDate)
end if
end tell
(* Script End *)

Many thanks.
BA
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: User Permissions solved
  • Next by Date: Re: User Permissions
  • Previous by thread: Re: Counting & trashing
  • Next by thread: Re: Counting & trashing
  • Index(es):
    • Date
    • Thread