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

SWAPCD Internal
Purpose: Interchange the current directory and a stacked directory.
Format: SWAPCD [<directory | pattern>>] [LEVEL <number>]
Template: DIR, LEVEL/N
Path: Internal
SWAPCD interchanges the current directory with one of the directories saved by the PUSHCD command.

If an optional <directory name> or <pattern> is provided, it will be exchanged with the most recently saved directory instead.

By default, the most recently saved directory will be exchanged with the current directory. To pick any other directory from the stack, use the LEVEL <number> argument; LEVEL 1 will choose the most recently used stack element, LEVEL=2 the one which precedes the most recently used stack element and so forth.

If there is no directory on the stack, SWAPCD will pop the directory SYS: instead.

Example:

3.OS4:> CD Work:Examples
3.Work:Examples> PUSHCD Ram:
3.RAM Disk:> POPCD
3.Work:Examples>
illustrates how the current directory can be pushed onto the stack before changing to a new directory, and then the previous directory can be popped from the stack later.

See also: CD, POPCD, PUSHCD.


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.