next up previous contents index
Next: FindClose Up: Functions and Procedures Previous: Exec

FExpand

   

Declaration:

Function FExpand (const path: pathstr) : pathstr;

Description:

FExpand takes its argument and expands it to a complete filename, i.e. a filename starting from the root directory of the current drive, prepended with the drive-letter (under DOS).

The resulting name is converted to uppercase on DOS systems. Under LINUX, the name is left as it is. (filenames are case sensitive under Unix)

Errors:

FSplit

See also:

<tex2html_undef_mark>

Example
Program Example5;
uses Dos;

{ Program to demonstrate the Exec and DosExitCode function. }

begin
{$IFDEF LINUX}
  WriteLn('Executing /bin/ls -la');
  Exec('/bin/ls','-la');
{$ELSE}
  WriteLn('Executing Dir');
  Exec(GetEnv('COMSPEC'),'/C dir');
{$ENDIF}
  WriteLn('Program returned with ExitCode ',DosExitCode);
end.



Michael Van Canneyt
Thu Sep 10 13:59:33 CEST 1998