tell application "Finder" try set thisWindowPath to the POSIX path of (target of front window as alias) set selectionList to selection as list set selectedCount to count items in selectionList set q to 0 set izmers_all to 0 repeat with i in selectionList set q to q + 1 try set izmers to physical size of file (((item q of (get selection as list))) as alias) on error set izmers to physical size of folder (((item q of (get selection as list))) as alias) end try 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" on error set alerts to "Nothing selected!" end try display alert alerts end tell