REBOL 3 Docs Guide Concepts Functions Datatypes Errors
  TOC < Back Next >   Updated: 3-Aug-2010 Edit History  

REBOL 3 Functions: change-dir

change-dir  path

Changes the current directory path.


path [file!]

See also:

make-dir   what-dir   list-dir  


Changes the value of system/script/path. This value is used for file-related operations. Any file path that does not begin with a slash (/) will be relative to the path in system/script/path. When a script file is executed using the do native, the path will automatically be set to the directory containing the path. When REBOL starts, it is set to the current directory where REBOL is started.

current: what-dir
make-dir %./rebol-temp/
probe current
change-dir %./rebol-temp/
probe what-dir
change-dir current
delete %./rebol-temp/
probe what-dir

Note that the shorter shell friendly cd also exists.

  TOC < Back Next > - WIP Wiki Feedback Admin