[X3v12-4GL] In Script editor, how to open a X3 Storage Area folder to reads its filelist names?

SOLVED

Hi,

4GL Development question. Not sure the keyword to find for these.

In 4GL, I know I can just manually put in the hardcode filepath to open through SYSTEME2 raw OS cmd call but it is very annoying to maintain (about 5+ scripts to update) every time the folder is duplicated to test server.

If I want to access to a defined X3 volume, how to [1] call the defined X3 volume in 4GL and then [2] read a list of the file name inside?

Assume the defined X3 volume is YTEST.

Inside the X3 volume folder are just `.txt` files (1.txt, 2.txt, hello.txt). These files are expected to be imported in as an import template file using 4GL directly through its filename (for example, import `1.txt` file to YTESTIMP import template code).

Additional refs for X3 Volume creation:

https://www.sagecity.com/us/sage_x3/b/sageerp_x3_product_support_blog/posts/creating-storage-areas-for-the-masses-quick-guide-to-adding-custom-storage-areas-to-sage-x3

https://www.sagecity.com/us/sage_x3/b/sageerp_x3_product_support_blog/posts/getting-started-with-x3-storage-areas

Additional details I found while googling:

- From Greytrix (the one I am using; Seems like old way?): www.greytrix.com/.../

- From online help: https://online-help.sageerpx3.com/erp/12/staticpost/x3script-keywords-glossary/