Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

Show total free hhd of all discs?

Discuss anything to do with plugins

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo

Post Reply
chengan
Posts: 1
Joined: March 30th, 2006, 5:26 pm

Show total free hhd of all discs?

Post by chengan »

Sorry for my bad english...

Is there a plugin so i can show how much GB that's free, of all discs?
For example, if there is 5GB free on C and 4GB free on D, the display shows: 9GB

limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Post by limbo »

You can add the total free space with the demo plugin! :wink:



Example:

Code: Select all

$dll(demo,1,$HDFree(C), $HDFree(D))
drives C and D added
or

Code: Select all

$dll(demo,1,$dll(demo,1,$HDFree(C), $HDFree(D)),$HDFree(J))
A nested call! drives C, D and J added


demo plugin is not only a demo it contains useful functions

smack
Plugin Author
Posts: 21
Joined: July 12th, 2005, 8:42 am

Post by smack »

limbo wrote:You can add the total free space with the demo plugin! :wink:
Another way to achieve that is to use Perf Plugin. (again :) )

Use function 4 of perf.dll to fetch the value of a Windows performance counter:

Code: Select all

$dll(perf,4,[SampleTime],[CounterName])
SampleTime is how often the counter value is fetched, in 1/10 seconds.
CounterName is a name of a performance counter.

Unfortunately the names of the performance counters are localized in the Windows language, so this example from my German Windows system must be translated to your language:

Code: Select all

$dll(perf,4,600,\Logischer Datentr?ger(_Total)\MB frei)
Use the Windows utility perfmon.exe to find out the names of the performance counters that you're interested in.

fishthecat
LCD Smartie Fanatic
Posts: 132
Joined: March 9th, 2005, 2:21 pm
Location: UK

$Count

Post by fishthecat »

Here's another way using Smartie's built in adding function:

Code: Select all

$Count($HDFreg(C)#$HDFreg(d))
Do I get a prize for suggesting the shortest code? ;)

Post Reply