From: Wilson Bilkovich Date: 2006-01-24T01:18:08+09:00 Subject: Re: List of drives? On 1/19/06, ruby talk wrote: > Is there a way in ruby with out extra libraries to get a list of drives? > hard drives, dvd drives, network drives, ...? > On Windows systems, you can do: require 'win32ole' drives = [] file_system = WIN32OLE.new( 'Scripting.FileSystemObject' ) file_system.Drives.each { |drive| drives << drive.DriveLetter } #drives now contains a list of existing drive letters. puts drives There are other useful properties on the 'drive' object, including ShareName, which will tell you the network path, for remote volumes.