Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I get the get the size of a disk?

Status
Not open for further replies.

NathanGriffiths

Programmer
May 14, 2001
213
NZ
I need a SP or function that will return the size of a physical disk (not just the free space, as given by xp_fixeddrives), e.g.

C: 1000MB
D: 5000MB

Any suggestions?

thanks,


Nathan
[yinyang]
----------------------------------------
Want to get a good response to your question? Read this FAQ! -> faq183-874
----------------------------------------
 
You can use the scripting.filesystemobject which has a drives collection with a totalsize property for each drive.

Never used it for this but here's an example of using it in an SP.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top