(* Collection of code snippets by Arne Vajhøj *)
(* (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) *)
program Drives;

{$APPTYPE CONSOLE}

uses
  SysUtils, Windows;

var
  c : char;
  
begin
  for c := 'A' to 'Z' do begin
    if GetDriveType(PChar(c + ':\')) > 1 then begin
      writeln(c, ' is in use');
    end else begin
      writeln(c, ' is free');
    end;
  end;
end.
