Return to Snippet

Revision: 8282
at September 11, 2008 10:30 by DaveChild


Initial Code
@echo off >nullfile.txt
set Drive=C:
for /F "tokens=7" %%a in ('fsutil volume diskfree %Drive% ^| find /i "# of free"') do set free=%%a
set free=%free:~0,-6%
echo c: %free%

Initial URL

                                

Initial Description
Run this from within SQL Server to get free space on a drive into a table.

See http://snipplr.com/view/8339/write-disk-space-to-table/ for SQL.

Initial Title
DOS Calculate Free Space on Drive

Initial Tags

                                

Initial Language
DOS Batch