Page 1 of 1

Determine Folder Size, then delete oldest file...

PostPosted: Tue Jan 18, 2011 10:28 pm
by Cardinale
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

Re: Determine Folder Size, then delete oldest file...

PostPosted: Wed Jan 19, 2011 9:08 am
by dhy8386
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