Computing.Net > Forums > Windows NT > How to find disk size with script

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

How to find disk size with script

Reply to Message Icon

Name: jwebb55
Date: November 12, 2007 at 12:02:22 Pacific
OS: NT4
CPU/Ram: 128MB
Product: IBM
Comment:

I am wondering is there is a way to write a .bat file that will tell me the size of hard disk for every NT4 machine that I have. I realize I can do this by installing WMI for NT but I don't want to do that if I don't have to. I appreciate the help.



Sponsored Link
Ads by Google

Response Number 1
Name: cup
Date: November 14, 2007 at 11:48:01 Pacific
Reply:

You need to look at the drive object in wsh help. Here is an example of what you can do

<job>
<object id="fso" progid="Scripting.FileSystemObject" />
<script language="vbscript">
set dr = fso.GetDrive ("C:")
with fso.GetDrive ("C:")
WScript.echo "Available space " & cstr (.AvailableSpace)
WScript.echo "Free space " & cstr(.FreeSpace)
WScript.echo "TotalSize " & cstr(.TotalSize)
end with
</script>
</job>


0

Response Number 2
Name: cup
Date: November 28, 2007 at 14:22:52 Pacific
Reply:

Are all the machines networked and are all the drives shared? You didn't say whether you wanted to do it from one machine or you want a script that can be saved and executed on every machine.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Batch Copy Files w/ Time/... Windows NT4 and Teaming


Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: How to find disk size with script

How to operate applet buttons form script www.computing.net/answers/windows-nt/how-to-operate-applet-buttons-form-script/2183.html

How to identify logon user? www.computing.net/answers/windows-nt/how-to-identify-logon-user/6547.html

how to replace win nt with win 98 www.computing.net/answers/windows-nt/how-to-replace-win-nt-with-win-98/12046.html