var
selectedFile :
string;
drive : char;
path, fileName : string;
begin
// Ask the user to select a file
if PromptForFileName(selectedFile)
then
begin
// Display this full file/path value
ShowMessage('Selected file = '+selectedFile);
// Split this full file/path value into its
constituent parts
ProcessPath(selectedFile, drive,
path, fileName);
ShowMessage('drive = '+drive);
ShowMessage('path = '+path);
ShowMessage('fileName = '+fileName);
end;
end;