How to retrive harddisk

(imported topic written by NMG2_Banjop_Ramanoo)

I want get capacity harddisk,partition,free space and use area by unit at GB,MB

I can get capacity harddisk by relavence like this:

Q:string selects “size from Win32_DiskDrive” of wmi

and I get result like this:

A:120031511040

the result is data string

Can I want result this convert to integer value for calculate ?

if it can do this.

how to do it by relavence ?

and if It can not.

Is it have other way ?

I want someone recommend about this.

(imported comment written by NoahSalzman)

Here is how you do it. Also, avoid using WMI if we already have an inspector that does the same thing. Note the differences in time:

q: total space of drive “c:” / 1024 / 1024 / 1024

A: 39

T: 0.152 ms

Q: (following text of first “=” of it as integer) of (select “size from Win32_DiskDrive” of wmi as string) / 1024 / 1024 / 1024

A: 39

T: 11.586 ms

(imported comment written by NMG2_Banjop_Ramanoo)

thank you Mr.Noah

(imported comment written by NMG2_Banjop_Ramanoo)

and if I want to

Q:total space of drive “c:” /1024/1024/1024

these script have result to string like this “A:60 GB”

or I want concatenation value of above script with data string for i get result is “A:60 GB”

how do it ?

(imported comment written by NoahSalzman)

q: (total space of drive “c:” / 1024 / 1024 / 1024) as string & " GB"

A: 39 GB

Also, the way I learned Relevance and Action Script was by spending a few minutes each day reading through example on this Forum. I highly recommend that you do that, it will mean that you’ll spend less time waiting for answers. :slight_smile:

(imported comment written by NMG2_Banjop_Ramanoo)

thank you for recommended

I got question again.

and if I want the same script can display on Web report by this script connection with HTML element or javascript element or whatever which It is script for web page

how do it ?

in this case. I downloaded sample “Cool Facts” Report

for is case study and in this sample.I edited this sorce code

<?Relevance ((sum of (preceding texts of lasts " MB" of values of results of bes property "total size of system drive" as integer)) / 1024 / 1024) as string & " terabytes"?>

by I edited code to like this.

<?Relevance (total space of drive "c:" / 1024 / 1024 / 1024) as string & "GB" ?>

but the web report show this “The operator “drive” is not defined.” I don’t known why it can’t do

someone recommend about this with me.

(imported comment written by nagaraj.s)

hi

I can take hard disk value in separate drive like c: drive d: drive

but I want to take total disk value like 500GB or 250GB or 1TB

is it possible ple share the relevance to my mail
nagaraj@raksha.co.in