• 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: File size problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File size problem


  • Subject: Re: File size problem
  • From: Steve Thompson <email@hidden>
  • Date: Thu, 22 Jul 2010 09:03:49 +0100


On 21 Jul 2010, at 17:02, Brian Christmas wrote:



problem with getting file sizes in Applescript,

set theFile to "/Users/steve/testfile.csv"
set theSize to last word of (do shell script ("mdls -name kMDItemFSSize " & theFile)) as number

Returns:

tell current application
do shell script "mdls -name kMDItemFSSize /Users/steve/testfile.csv"
--> "kMDItemFSSize = 143"
end tell

Result:

143


 _______________________________________________
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: File size problem
      • From: Steve Thompson <email@hidden>
    • Re: File size problem
      • From: Brian Christmas <email@hidden>
References: 
 >File size problem (From: Brian Christmas <email@hidden>)

  • Prev by Date: Re: File size problem
  • Next by Date: Re: Sort Array by Column X and a Question for All
  • Previous by thread: Re: File size problem
  • Next by thread: Re: File size problem
  • Index(es):
    • Date
    • Thread