chdir, cd
If no parameter is provided: Under Windows, the working directory path is printed out. Under LINUX and MacOS, the user home directory is chosen.
If a directory path is provided: Change to a different working directory
Both chdir and cd do exactly the same.
These functions are ideally suited for interactive use.
Indirect parameter passing is disabled
0 - 1
No. | Type | Description |
---|---|---|
Opt. 1 input |
string | new path and directory name This is the path to change directory.
|
Specified working directory does not exist or is not accessible, will be printed out as a short message
include( Short Commands Library );
echo( working directory() );
cd(".."); // One directory out
echo( working directory() );
echo("Jump to ", system info[bin directory] );
chdir(system info[bin directory]); // Absolute path
echo( working directory() );
C:\Users\zur-b\OneDrive\Documents\Programme\Beyond4P\B4P_Docu_Maker
C:\Users\zur-b\OneDrive\Documents\Programme\Beyond4P
Jump to C:\Program Files\b4p
C:\Program Files\b4p