January 2006
Beginner
592 pages
16h 55m
English
info for
file/folder information
Gets information about an item on disk. Returns a file information record packed with useful stuff. If you ask for the info for a folder, the script may take some time to run, in order to sum the sizes of all the files within it; you can prevent this by saying without size.
set uf to (path to home folder as string)
set L to list folder uf
set s to {}
repeat with f in L -- collect sizes of all items
set end of s to size of (info for file (uf & f))
end repeat
set maxItem to 0
set maxVal to 0
repeat with i from 1 to (count s) -- find biggest size
if item i of s > maxVal then
set maxItem to i
set maxVal to item i of s
end if
end repeat
display dialog "The biggest thing in your home folder is: " & item maxItem of LRead now
Unlock full access