Remaining space on system drive

(imported topic written by SystemAdmin)

I’m looking to put together a relevance statement that will give me a result that either there is at least 10% of space left on an endpoints system drive. If not then I’d like to return a result of Insufficient system drive space.

So far I only have the statement to find 10% of the system drive.

if (exists 

true whose (

if 

true then exists drive of system folder 

else 

false)) then ((total space of drive of system folder/1048576)/(10) as string & 
" MB" 

else 
""

(imported comment written by SystemAdmin)

Casino,

Try this.

//less than 10% true or false

q: (free space of drive of system folder as floating point/total space of drive of system folder as floating point) < " as floating point

A: False

T: 0.211 ms

I: singular boolean

//express free space as a percentage

q: ((significance place 0 of ((free space of drive of system folder as floating point/total space of drive of system folder as floating point) *100)) as string) & " Percent Free"

A: 42 Percent Free

T: 0.260 ms

I: singular string

(imported comment written by SystemAdmin)

Looks like something got lost in the copy and past of my first query.

q: (free space of drive of system folder as floating point/total space of drive of system folder as floating point) < " as floating point

(imported comment written by SystemAdmin)

Jimmie, you’re awesome. I was able to use your corrected info and created a report to watch for machines that are getting close to max capacity.

  • Ed