Function FExpand (const path: pathstr) : pathstr;
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)
<tex2html_undef_mark>
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.