List folder content in native mode

SUGGESTED

Hi

We have tried listing folder contents using this two approaches without success. First approach used to work in classic mode.

1. Call SYSTEME2(adxmac(0),"LSADX"-FOLDER,"",FILCOUNT, FILLIST) From ORDSYS (error, 'Unexpected end of JSON input')

2. System FILES = adxmac(1)+"@DIR/b/o:n"+DIRECTORY (no result)

Any suggestion?

Rgds

Parents Reply Children
  • 0 in reply to Esfahani

    Hi,

    We are trying to list system files for a specific directory (eg. c:/abcd)

    The provided code seems to list all the folders in a solution.

    Any idea?

  • 0 in reply to jfazenda

    Sorry, I thought it's that folders, that make sense now. 

    Let me check on that, is the folder outside of X3 directory? Like c:\abcd

    In other words with the Sandbox configuration, we don't automatically have access to all windows directory. meaning that if you use your own code for like SEED\TMP does that work?

  • 0 in reply to Esfahani

    Folder is inside of X3 solution folder

    Using following snippet will resolve one storage area like '[tmp]/folderA' and will return the full physical path for the intended fs directory. 

    # Compute full path of Storage Volume
    Gosub ENUM_VOLFIL_TYPE From ASYRSTO
    OK = func ASYRSTO.CTL_VOLFIL(2, STOAREA, FOLDERFULLPATH, E_TYPE_FOLDER, MESSAGE)

    Next step would be to iterate files in this fs directory but none of previous methods seem to work (maybe because they rely on global vars not defined?)

    Meanwhile we have made some progress through JS bundles but wondering whether there's any easier way.