• 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: Check folder size - classes wrong???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Check folder size - classes wrong???


  • Subject: Re: Check folder size - classes wrong???
  • From: Adam Bell <email@hidden>
  • Date: Wed, 05 Jul 2006 23:00:49 -0300
  • Comment:

Title: Re: Check folder size - classes wrong???
Hiya,

Adding further to my archive checking script I want to test the size of a folder to flag it if it is higher than a specific size.

Here's an extract of my larger script of what I have but I get the below error. The "size checking" line is taken from an email Adam Bell posted to the list some time back:

on open folderList
        repeat with PickFolder in folderList
                CheckOrigSize(PickFolder)
        end repeat
end open

on CheckOrigSize(PickFolder)
        tell application "Finder"
                set aFolder to name of PickFolder
                set ProdFldr to first folder of PickFolder whose name contains "Production"
                set OrigFldr to first folder of ProdFldr whose name contains "Originals"
                if ((size of (info for OrigFldr)) div 1048576) > 5 then beep 5
        end tell
end CheckOrigSize

We can't see what PickFolder will be, but it needs to be a complete path to the folder in question, i.e.: OrigFldr has to be a complete path.

e.g. this works:

set F to (choose folder)
tell application "Finder" to set S to (size of (info for F)) div 1048576

Adam


info for folder "Originals" of folder "3. Production" of folder "Job D11111 D22222 D52518 Davids Folder Template" of disk "TECH"
                "Finder got an error: File folder Originals wasn't found."

The File part worries me that I have my classes mixed up but I'm not sure how to resolve it.

I tried getting the properties of the folder but it said that the size value was missing...

As always, help is highly appreciated!

Cojcolds

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
>esscable.net

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Check folder size - classes wrong???
      • From: Brett Conlon <email@hidden>
References: 
 >Check folder size - classes wrong??? (From: Brett Conlon <email@hidden>)

  • Prev by Date: folder resize & move
  • Next by Date: Re: Check folder size - classes wrong???
  • Previous by thread: Check folder size - classes wrong???
  • Next by thread: Re: Check folder size - classes wrong???
  • Index(es):
    • Date
    • Thread