Home Page The Club Computers News Links Glossary EYAWTK
Before Amiga Background ICS OCS ECS AGA ??? PPC
U-Boot SLB Linux Amiga OS Dual Boot Motherboards Peripherals Other
Initialisation Installation OS4 Updates About OS4 File Systems Networking Printing Other
Introduction File System Workbench Preferences Commands Error Msgs Miscellaneous

AmigaOS 4.0 - About OS4 - Commands

CD Internal
Purpose: To set, change, or display the current directory.
Format: CD [<directory> | <pattern>]
Template: DIR
Path: Internal
CD with no arguments displays the name of the current directory. When a valid directory name is given, CD makes the named directory the current directory.

CD does not search through the disk for the specified directory. It expects it to be in the current directory. If it is not, you must give a complete path to the directory. If CD cannot find the specified directory in the current directory or in the given path, a 'Can't find <directory>' error message is displayed.

If you want to move up a level in the filing hierarchy to the parent directory of the current directory, enter CD followed by a space and a single slash (/). Moving to another directory in the parent can be done at the same time by including its name after the slash. If the current directory is a root directory, CD / will have no effect. Multiple slashes are allowed; each slash refers to an additional higher level. When using multiple slashes, leave no spaces between them.

To move directly to the root directory of the current device, use CD followed by a space and a colon, i.e. CD :

CD also supports pattern matching. If more than one directory matches the given pattern, an error message is displayed.

Example 1:

3.OS4:> CD DF1:Work
sets the current directory to the Work directory on the disk in drive DF1:.

Example 2:

3.OS4:> CD SYS:Com/Basic
makes the subdirectory Basic in the Com directory the current directory.

Example 3:

3.OS4:> CD /
moves up one level in the directory structure.

Example 4:

3.OS4:> CD //
moves up two levels in the directory structure.

Example 5:

3.OS4:> CD SYS:Li#?
uses the #? pattern to match with the Libs: directory. See also: POPCD, PUSHCD, SWAPCD.

Return to Commands Selection

Disclaimer: Amiga Auckland have prepared the above information for the use of its members based on our experiences and as such is subject to revision at any time. Amiga Auckland cannot guarantee any of the information and cannot be held accountable for any issues that may result from using it.

Copyright 2006 Amiga Auckland Inc. All rights reserved.
Revised: February 9, 2006.