Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

An AppleScript to calculate item sizes in the Finder Desktop
After upgrading to a MacBook Pro, I discovered that my Calculate Size Contextual Menu item (which calculated total size of everything selected in finder) wasn't showing up, even though it was installed. After digging around for a few days, I made my first real AppleScript -- a substitute for the non-functional CM item.

I added the script to Butler's smart items with a trigger hotkey, and it works just fine. (I still haven't figured out why when added to OnMyCommand items it shows the alert more times than necessary). Hope this helps somebody.

[robg adds: This worked for me on my MacBook, also via a Butler Smart Item.]
    •    
  • Currently 2.00 / 5
  You rated: 4 / 5 (4 votes cast)
 
[7,589 views]  

An AppleScript to calculate item sizes in the Finder | 5 comments | Create New Account
Click here to return to the 'An AppleScript to calculate item sizes in the Finder' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An AppleScript to calculate item sizes in the Finder
Authored by: boothefox on Jun 09, '06 08:23:32AM

the third line in the script is just a leftover from my experiments - you can delete it... oh, and i also found out that in Finders View Options Calculate All Sizes has to be turned on.



[ Reply to This | # ]
An AppleScript to calculate item sizes in the Finder
Authored by: adrianm on Jun 09, '06 08:32:30AM

Doesn't cmd+I (or opt+cmd+I) do this?



[ Reply to This | # ]
An AppleScript to calculate item sizes in the Finder
Authored by: wallybear on Jun 09, '06 09:34:58AM
Talking about file stats, there is also a small applet I use from time to time, FileCounter, that counts every file and folder of the folder/selection you drop on it. (http://www.jaw.it/pages/en/x_misc.html)

[ Reply to This | # ]
An AppleScript to calculate item sizes in the Finder
Authored by: xyz3 on Jun 09, '06 09:35:24AM

--or
tell application "Finder" to set kFiles to selection as list

set izmers_all to 0

repeat with kFile in kFiles
set izmers to size of (info for (kFile as alias))
set izmers_all to izmers_all + izmers
end repeat

set y to izmers_all / ((1024) ^ 2)
set z to (round (10 * y)) / 10
set alerts to "Total size of selected files : " & z & " MB"
display alert alerts


Or Press Command + option + I in the Finder and select multiple items...



[ Reply to This | # ]
An AppleScript to calculate item sizes in the Finder
Authored by: Anonymous on Jun 09, '06 12:51:59PM
Seems many miss a good Get Info. This one resolves an alias to a folder, lists the Name, Size, and number of Items, Folders, Documents, Applications, Packages, Alias, Clippings, Internet.

It gets carried away calculating the correct SI units, MB, KB or Bytes, but does not attempt to truncate the real number.

[link:]http://www.scshop.com/~200309/Files/FolderStats_scpt.txt



[ Reply to This | # ]