Determine Folder Size, then delete oldest file...

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

I need some help from an expert.

1 - I need to determine the size of a folder
2 - If folder size is larger than X MB goto to 3
3 - delete oldest file in the folder until folder is no longer larger than X MB

Is this possible?

Thanks in advance
Cardinale
 
Posts: 1
Joined: Tue Jan 18, 2011 10:20 pm

Not without an applescript i believe. You would want to build a simple script that looks at a folder that is larger than X size and deletes the oldest file. Then you can build in a repeat loop that runs the same script over and over until your size condition is not true.

Check out macscritper.net
dhy8386
 
Posts: 94
Joined: Tue Nov 09, 2010 12:19 pm


Return to Open Discussion