Gets the contain of a Windows directory.
Syntax
CHGVAR |
VAR(&CMD) VALUE('DIRLIST') |
CHGVAR |
VAR(&PARM1)
VALUE(' |
CHGVAR |
VAR(&PARM2) VALUE(' ') |
CALL |
PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 + &PARM2 &RESULT) |
Parameters
Parameters |
|
Parm1 or Parm2
RESULT |
Pattern= :
Allows to set the type of files we want to list. Path= : The
directory path, if it is not included in Pattern. First=True to
start listing at the beginning of the directory. If First is false,
command returns the next entry in the directory. Close=True to
close the directory listing. SubDir=True to list
only the sub directories contained into the specified directory. The files
are not listed. Hidden=True to list also the hidden files.
On
each call, a file name is returned into the &RESULT parameter. Each file returned in &RESULT has the following format: • Positions 1 to 256 : File name. • Position 257 : ‘N’. Letter ‘N’ is present if the entry is not empty. • Position 258 : ‘A’. If the file has ‘Archive’ attribute. • Position 259 : ‘H’. If the file name is hidden. • Position 260 : ‘R’. If the file is read only. • Position 261 : ‘D’. If the entry is a sub directory. •
Position
262 : ‘S’. If it is a system file. |
Example
|
|
|||||||||
|
|
|
||||||||
|
|
|
||||||||
|
|
|
||||||||
|
|
|