SELECT.DIR

SELECT.DIR

Top  Previous  Next

 

The SELECT.DIR command constructs a select list from the contents of an operating system directory.

 

 

Format

 

SELECT.DIR pathname  {FILE | DIRECTORY} {TO list} {COUNT.SUP} {PATHNAME}

 

where

 

pathnameis the pathname of the directory to be processed.

 

FILEspecifies that a list of files in the directory is to be created. This is the default action of the command.

 

DIRECTORYspecifies that a list of subdirectories in the directory is to be created.

 

TO listspecifies the list to be created. If omitted, the default list (list 0) is created.

 

COUNT.SUPsuppresses display of the number of items in the select list.

 

PATHNAMEcauses the command to return a list in which each entry is a full pathname. Without this option, the list contains the names without the pathname prefix.

 

 

The SELECT.DIR command scans the directory identified by pathname and constructs a select list containing the names of either the files or subdirectories in this directory. The casing of the directory items is maintained.

 

SELECT.DIR does not recurse down into sub-directories.

 

If successful, both @SELECTED and @SYSTEM.RETURN.CODE will be set to the number of item selected. If the command fails, @SYSTEM.RETURN.CODE will contain the negative value of the error number.

 

 

Example

 

SELECT.DIR C:\MYAPP\EMAILS TO 1

 
The above command would build select list 1 as a list of the files in the C:\MYAPP\EMAILS directory.