We Recommend

The Rails Way The Rails Way
Now, for the first time, there’s a comprehensive, authoritative guide to building production-quality software with Rails. Pioneering Rails developer Obie Fernandez and a team of experts illuminate the entire Rails API, along with the Ruby idioms, design approaches, libraries, and plug-ins that make Rails so valuable.


Posted By

DaveChild on 09/11/08


Tagged

freespace


Versions (?)


DOS Calculate Free Space on Drive


Published in: DOS Batch 


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.

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

Report this snippet 

You need to login to post a comment.