Re: Counting & trashing
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.