I sometimes use a "for i := 1 to 26" loop to cycle through the drives and created this function to give me the drive letter of the current i value. To get the drive number for a given drive letter, see GetDriveNumber().
functionGetDriveLetter(Drive: byte): char; { func to return the drive letter. Ex: 1 = A, 2 = B, 3 = C, etc. } begin if (Drive >= 1) and (Drive <= 26) then Result := chr(ord('A') + Drive - 1) else Result := ' '; end;