Changes the current directory.
procedure ChDir(S: String);
Windows, Real, Protected
With $I-, IOResult returns 0 if the operation was successful; otherwise, it returns a non-zero error code.
The current directory is changed to the path specified by S. If S specifies a drive letter, the current drive is also changed.