This topic contains 1 reply, has 2 voices, and was last updated by  Paul Le 1 week, 1 day ago.

use of os.fs.glob

  • Hi,

    API os.fs.glob- is used to match a filename . But I need to know this API can access the files in which directory location. For example, I have the file “Nationality_12345777.csv” in the location C:\Program Files\iNTERFACEWARE\Iguana\iguana_training.

    How do I use this API to check for this filename under this specified folder.

    When I use this API as per in example — for FileName, FileInfo in os.fs.glob(‘Nationality/*.csv’) do
    trace(FileName)
    trace(FileInfo)
    — do some processing here
    end

    my result is “Nationality/* does not exist”.

    Hi Supriya,

    When calling the API you need to specify the full file path to your CSV files:

    local Dir = [[C:\Program Files\iNTERFACEWARE\Iguana\iguana_training\]]

    Name, FileInfo in os.fs.glob(Dir..'*.csv')

    Let me know if that works.

    Kind Regards,

    Paul

You must be logged in to reply to this topic.