Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

File with format

If I have list of Qvd in the format Sale_201603.qvd ,Sale_201709.qvd and Sale_UAT_201702.qvd ,Sale_201709-Copy.qvd and

How I can pick all the files with Sale_YYYYMM format only

3 Replies
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

I think From path\Sale_2* might work

avinashelite

Try like this

Path\Sale_*.QVD will load all the files which starts with Sales_

or

Path\Sale_2*.QVD

jonathandienst
Partner - Champion III
Partner - Champion III

Perhaps

Path\Sale_??????.QVD

or test explicitly for numeric values in the YYYYMM portion:

For Each vFile in FileList('Path\Sale_*.qvd')

  Let vTestStr = TextBetween(vFile, '\Sale_', '.qvd');

  Let vTest = IsNum(vTestStr) and Len(vTestStr) = 6;

  if vTest Then

     LOAD *

    FROM [$(vFile)]

    (....)

  End If

Next

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein