Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
singbittoo
Creator
Creator

why this wildmatch is not working in file name comparision ?

below is my code:

let filepath = 'lib://faultData/*.xlsx';

For Each file in FileList(filepath)

Trace $(file);

  if WildMatch(chr(39)&$(file)&chr(39), '*Incidents*')>0 then // i want to load only those files where file name consists of Incidents

  // - its giving me error on the above wildmatch , in the error i can see inside the wildmatch the chr(39) is not getting converted to '

    Trace $(file);

Incidents:

Load

*

        From [$(file)]

        (ooxml, embedded labels, table is sheet1);

     EndIf;

Next;

1 Solution

Accepted Solutions
singbittoo
Creator
Creator
Author

it worked i just changed chr(39)&$(file)&chr(39) to '$(file)'

View solution in original post

1 Reply
singbittoo
Creator
Creator
Author

it worked i just changed chr(39)&$(file)&chr(39) to '$(file)'