Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7912 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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....

[color:"red"]

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

regards/ E.Jex

Posted

What problem are you having? I run this script and it displays a welcome message (my home folder is less than 2 GB). As a test, I changed the test for 4000 to 1000 and it brought up the other dialog box.

Chuck

This topic is 7912 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.