I work at a edu. facility. and I need to make a applescript that check the size of the users “home” folder at login. I have tried with the following script. I run it from the login items in the system pref. But something is wrong, can you please help…
try
tell application “Finder”
activate
set username to name of home
set using to round ((physical size of home) / 1024 / 1024)
tell application “Finder”
if using > “4000” then
display dialog ("Hey… " & username & " You use too much diskspace! You use " & using & “MB your quota are 4000MB”) with icon stop buttons (“ok”)
else
display dialog “welcome”
end if
end tell
end tell
end try