November 2003
Beginner to intermediate
480 pages
15h 3m
English
info for — file/folder information
Gets information about an item on disk. Returns a file information record packed with useful stuff.
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 LIf 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.
Read now
Unlock full access