GET_DIR

[[GET_DIR:variable]]

Places all file names in a list variable called ‘DIR’ in ascending order.

Variable parameter must be initialized with the path of the directory being requested.

Example lists all the files and foldersĀ  in the “images/” directory:

[[INITIALIZE:dirpath|"images/"]]
[[GET_DIR:dirpath]]
[[FOR_EACH_AS:DIR|name]]
[[PRINT:name]][[cr]]
[[END_FOR_EACH_AS]]

[[GET_DIR_DESC:variable]]

Places all file names in a list variable called ‘DIR’ in descending order.

Leave a Reply