Re: File size problem
Re: File size problem
- Subject: Re: File size problem
- From: Brian Christmas <email@hidden>
- Date: Thu, 22 Jul 2010 20:12:11 +1000
G'day Steve
I've tried your routine, but it crashes.
Part of the POSIX path is 'Mail Manager Folder/RTF Documents', and your script crashes with the error 'mdls could not find "xxx/xxx/xxx/Mail."', where xxx is parts of the path
Obviously mdls can't cope with spaces in the path name.
Regards
Santa
On 22/07/2010, at 6:03 PM, Steve Thompson wrote: 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
And what, you ask, was the beginning of it all? And it is this...... Existence that multiplied itself For sheer delight of being And plunged with numberless trillions of forms So that it might find itself innumerably
Sri Aurobindo
|
_______________________________________________
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