dbTalk Databases Forums  

Disk Space

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Disk Space in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sanka
 
Posts: n/a

Default Disk Space - 11-06-2003 , 12:36 PM






Hi All,

Is there a way to find the Drive / Disk space from Activex
Script.

Cheers,
Sanka

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Disk Space - 11-06-2003 , 01:09 PM






In article <030c01c3a494$db5b88b0$a101280a (AT) phx (DOT) gbl>, Sanka
<loonysan (AT) mailcity (DOT) com> writes
Quote:
Hi All,

Is there a way to find the Drive / Disk space from Activex
Script.

Cheers,
Sanka
FileSystemObject - Drive Object, from MSDN docs-

Function ShowFreeSpace(drvPath)
Dim fso, d, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set d = fso.GetDrive(fso.GetDriveName(drvPath))
s = "Drive " & UCase(drvPath) & " - "
s = s & d.VolumeName & "<BR>"
s = s & "Free Space: " & FormatNumber(d.FreeSpace/1024, 0)
s = s & " Kbytes"
ShowFreeSpace = s
End Function


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.