• 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 20:44:23 +1100


More playing about.

I found that using a get statement gives satisfactory results, and is very, very fast.


set mysizestring to {}
set mynamestring to {}
tell application "Finder"
set mysizestring to get physical size of every file of entire contents of folder "Yearly Email Storage 2009" of disk "jobs"
set mynamestring to get name of every file of entire contents of folder "Yearly Email Storage 2009" of disk "jobs"
end tell
mysizestring & mynamestring



This gives a script thus, which is many times faster....

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"
set mysizestring to get physical size of every file of entire contents of folder "Yearly Email Storage 2009" of disk "jobs"
set mynamestring to get name of 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 x from 1 to count of myHaystack
if item x of mynamestring is in myNeedles then
set end of myPinCushion to item x of myHaystack as alias -- a bit faster
set end of mysize to item x of mysizestring
end if
end repeat
myPinCushion & return & mysize



Regards

Santa



 _______________________________________________
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: KOENIG Yvan <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>)
 >Re: Get physical size of file on mounted disk (From: Brian Christmas <email@hidden>)

  • Prev by Date: Get List of window PC's in the network
  • Next by Date: Re: 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