Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a variable which contains the file name as 'MM YYYY ABC Test_xyz.xls'.
The actual file name is 01 2015 ABC Test_xyz.xls.
There is a folder which contains many files with different filenames.
I have to load only those files from a folder whose file name matches with the pattern 'MM YYYY ABC Test_xyz.xls'.
MM YYYY may change depending on the year and month values.
Can someone please help me?
Thanks,
Asma
Use wildcard in the place of MM YYYY .
You can try like this:
Table1:
LOAD Field1,
Field2
FROM
[Travel pjt\?? ???? ABC Test_xyz.xlsx]
(ooxml, embedded labels, table is Sheet1);
Try
FOR Each File in filelist ('Files\*ABC Test_xyz.xlsx')
LOAD A,B
FROM
'$(File)'
(ooxml, embedded labels, table is Sheet1);
NEXT File;
Thanks for the reply
But using * didn't work.
Are you getting any errors?
Is the difference in pattern always MM YYYY?
LOAD
*
FROM
[?? ???? ABC*.xlsx]
(ooxml, embedded labels, table is Sheet1);