DNEXT

Syntax DNEXT subdirectory
Location Toolkit II

This command allows you to move across a directory tree by replacing the current sub-directory with the specified subdirectory in the default data device.

If the default program device is the same as the default data device, then this will also be altered by DNEXT.

If the default destination device is a directory device (ie. if it ends with an underscore), DNEXT also alters the last sub-directory in this (whether or not it points to another drive, or is further down the directory tree).

win1_
win1_C_
win1_C_include_
win1_C_objects_
win1_BASIC_
win1_QUILL_
win1_QUILL_letters_
win1_QUILL_translations
win1_secret_

The above could be a directory tree on a hard disk. DATA_USE win1_C_ defines win1_C_ as the default directory device, so WDIR will list all of the files in win1_C_.

Assuming that PROGD$=’win1_BASIC_’ and DESTD$=’flp2_C_Include_’, entering DNEXT Quill will result in the following:

  • DATAD$=’win1_Quill_’
  • PROGD$=’win1_BASIC_’
  • DESTD$=’flp2_C_Quill_’

NOTE 1

DNEXT does not check if there are any files with the given prefix which exist.

NOTE 2

DNEXT breaks with error -17 (error in expression) if the parameter is a resident keyword. So append an underscore to the directory name, eg. DNEXT NEW_, or specify the parameter between quote marks (eg. DNEXT ‘NEW’).

NOTE 3

The default devices cannot exceed 32 characters (plus a final underscore) - any attempt to extend them beyond this will result in the error ‘Bad Parameter’ (error -15).

CROSS-REFERENCE

DUP moves up the tree, DDOWN moves down the tree. DATAD$ and DLIST can be used to find out about the current sub-directory and default devices respectively.