Return to Symbol


Name of Current File Example

This example demonstrates the retrieval of the name of the first file in the current directory.

$$
$$ Declarations
$$
STRING/STR1(30)
DOPEN
DNEXT/IFEND,END:
STR1=&FNAME
PRINT/'THE NEXT CURRENT FILE IS '
PRINT/STR1

The same result can be obtained by embedding the GPA in the PRINT statement:

    DOPEN
DNEXT/IFEND,END:
PRINT/'THE NEXT CURRENT FILE IS '
PRINT/'&FNAME'
END:HALT