next up previous contents index
Next: Chr Up: Functions and Procedures Previous: Blockwrite

Chdir

   

Declaration:

Procedure Chdir (const S : string) ;

Description:

Chdir changes the working directory of the process to S.

Errors:

If the directory S doesn't exist, a run-time error is generated.

See also:

Mkdir, Rmdir

Example
Program Example7;

{ Program to demonstrate the ChDir function. }

begin
  {$I-}
  ChDir (ParamStr(1));
  if IOresult<>0 then 
    Writeln ('Cannot change to directory : ',paramstr (1));
end.



Michael Van Canneyt
Thu Sep 10 14:02:43 CEST 1998