Find the Drive with the Most Available Disk Space

October 7, 2000

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

The Network for Technology Professionals


About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers