Command readfilebyindex

The command readfilebyindex is used to read a file in the format Walk DB at a specified position. Each key should be on a separate line.


  1. filename [string]
    File name.
  2. index [integer]
    Key position, the first position is 0 (zero).
  3. variablekey [integer]
    Key name.
  4. variablereturn [integer]
    Variable that will store
    • 0: Item not found
    • 1: found item
  5. variablevalue [string]
    Index value.


Example Walk DB

city=Los Angeles

In the example above the file test.txt has been downloaded using the command downloadfile.

The function readfilebyindex reads the file looking for the position (index) and stores the key specified in the variable sKeyName and the value in the variable sKeyValue. The variable iReturn stores the value specifying if the position (index) was found or not.