| Comment | SQLServer User-Defined Function
PURPOSE
Return the total size in bytes of a given drive.
Return value (BIGINT):
-1 - Drive does not exist
positive big integer - Total size in bytes
EXAMPLES
SELECT dbo.fun_DriveProperty_TotalSize('C:')
119719063552
SELECT dbo.fun_DriveProperty_TotalSize('B:')
-1
HISTORY
2000-01-01 - Created function
2014-11-20 - Changed @totalsize type from varchar(20) to bigint
- Introduced sp_OADestroy @ofile
2024-02-09 - Changed history table
TAGS
<program>
<description>Return the total size in bytes of a given drive</description>
<generic>1</generic>
<author>Gerrit Mantel</author>
<created>2000-01-01</created>
<lastmodified>2024-02-09</lastmodified>
</program> |