Home Page The Club Computers News Links Glossary EYAWTK
Before Amiga Background ICS OCS ECS AGA ??? AmigaOne
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

PATHPART AmigaDOS
Purpose: To split and assemble directory and file names.
Format: PATHPART [DIR <path name>] [FILE <path name>] [ADD {<device name | directory name | file name>}]
Template: DIR/K, FILE/K, ADD/K/M
Path: C:PATHPART
PATHPART can break down directory and file names into their respective directory and file name components, and is also able to (re-)assemble the individual names into combined path names again. This can be of great use in script files.

The DIR argument specifies a <path name> from which the directory component is to be extracted.

The FILE argument specifies a <path name> from which the file component is to be extracted.

The ADD argument builds a path from the <device name>, <directory name> and <file name> parameters.

PATHPART commands can be nested such that the output from one command can be used for input to another as shown in the examples.

Example 1:

Obtain the directory name component of a path name:

3.OS4:> PATHPART DIR Work:Files/Data
Work:Files
Example 2:

Obtain the file name component of a path name:

3.OS4:> PATHPART FILE Work:Files/Data
Data
Example 3:

Build a complete path name from components:

3.OS4:> PATHPART ADD Work: Files Data
Work:Files/Data
Example 4:

Remove the last part of a path name, then replace it with a new name:

3.OS4:> PATHPART ADD 'PATHPART DIR Work:Files/Data' Information
Work:Files/Information


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.