Find the Drive with the Most Available Disk Space

Saturday Oct 7th 2000 by Alan Enderby
Share:

Here's a script that will help you find the disk drive with the most available space.

Here's a script that will help you find the disk drive with the most available space.

create proc os_bigdrive @driveletter char(1) out ,@debug tinyint=0 as

create table #diskspace(drive char(1) null , space int null)

if @debug > 0 exec master..xp_fixeddrives
insert into #diskspace exec master..xp_fixeddrives

set rowcount 1
select @driveletter = drive from #diskspace order by space desc
set rowcount 0
go

Share:
Home
Mobile Site | Full Site
Copyright 2017 © QuinStreet Inc. All Rights Reserved