• 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: Brett Conlon <email@hidden>
  • Date: Thu, 6 Jul 2006 14:32:34 +1100
  • Sensitivity:


Hi Adam,

Thanks for responding.

Matey, I tried your code and it works if I choose the "Originals" folder directly but it still fails when I incorporate it into my handler.

OK I just got it working...

I changed OrigFldr to PickFolder in the line:
set S to (size of (info for PickFolder)) div 1048576
and it worked so I figured the issue was in the set ProdFldr... and set OrigFldr... lines.

I then added "as alias" to the end of these lines and it now works.

Here's the working version:

on run
        set PickFolder to choose folder
        CheckOrigSize(PickFolder)
end run

on CheckOrigSize(PickFolder)
        tell application "Finder"
                set aFolder to name of PickFolder
                set ProdFldr to (first folder of PickFolder whose name contains "Production") as alias
                set OrigFldr to (first folder of ProdFldr whose name contains "Originals") as alias
                set S to (size of (info for OrigFldr)) div 1048576
                log S
        end tell
end CheckOrigSize

Many thanks!

Coj



Adam Bell <email@hidden>
Sent by: applescript-users-bounces+brett.conlon=email@hidden

06/07/06 12:00 PM

To
email@hidden
cc
Subject
Re: Check folder size - classes wrong???





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
 _______________________________________________
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:
    • Folder actions
      • From: Simon Troup <email@hidden>
References: 
 >Re: Check folder size - classes wrong??? (From: Adam Bell <email@hidden>)

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