Drive Root Path

Submitted by:Andery Smith

Date added:03 December, 2013

Category:Delphi

Delphi code to return root drive path for drive with given number.

Tags: drive path , root path

Code Snippet:

function DriveRootPath(const DriveNum: Byte): string;
begin
if DriveNum in [0..25] then
Result := Char(DriveNum + Ord('A')) + ':\'
else
Result := '';
end;
 
 

Comments