• 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: Get physical size of file on mounted disk
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get physical size of file on mounted disk


  • Subject: Re: Get physical size of file on mounted disk
  • From: Brian Christmas <email@hidden>
  • Date: Wed, 11 Mar 2009 15:42:41 +1100

Jay, your code should end up being something like this....


set myPinCushion to {}
set mysize to {}
tell application "Finder"
set myHaystack to every file of entire contents of folder "Yearly Email Storage 2009" of disk "jobs"
end tell
set myNeedles to {"2009-03-10 002133Z.emlx.zip", "2009-03-10 002731Z.emlx.zip", "2009-03-10 014903Z.emlx.zip", "2009-03-10 015107Z.emlx.zip", "2009-03-10 015140Z.emlx.zip", "2009-03-10 015211Z.emlx.zip"}

repeat with myStraw in myHaystack
if (name of myStraw) is in myNeedles then
set end of myPinCushion to (myStraw as alias) -- a bit faster
tell application "Finder"
set temp to properties of myStraw
set end of mysize to physical size of temp
end tell
end if
end repeat
myPinCushion & return & mysize

Returns

{alias "Jobs:Yearly Email Storage 2009:03:2009 03 10:2009-03-10 002133Z.emlx.zip", alias "Jobs:Yearly Email Storage 2009:03:2009 03 10:2009-03-10 002731Z.emlx.zip", alias "Jobs:Yearly Email Storage 2009:03:2009 03 10:2009-03-10 014903Z.emlx.zip", alias "Jobs:Yearly Email Storage 2009:03:2009 03 10:2009-03-10 015107Z.emlx.zip", alias "Jobs:Yearly Email Storage 2009:03:2009 03 10:2009-03-10 015140Z.emlx.zip", alias "Jobs:Yearly Email Storage 2009:03:2009 03 10:2009-03-10 015211Z.emlx.zip", "
", 49152, 49152, 4096, 8192, 4096, 8192}
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Get physical size of file on mounted disk
      • From: Brian Christmas <email@hidden>
References: 
 >Get physical size of file on mounted disk (From: Jay Louvion <email@hidden>)
 >Re: Get physical size of file on mounted disk (From: KOENIG Yvan <email@hidden>)
 >Re: Get physical size of file on mounted disk (From: Brian Christmas <email@hidden>)
 >Re: Get physical size of file on mounted disk (From: Brian Christmas <email@hidden>)

  • Prev by Date: Re: Get physical size of file on mounted disk
  • Next by Date: Get List of window PC's in the network
  • Previous by thread: Re: Get physical size of file on mounted disk
  • Next by thread: Re: Get physical size of file on mounted disk
  • Index(es):
    • Date
    • Thread