Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QLIKWORLD LIVE! MAY 16 - 19TH, EARLY BIRD DISCOUNTS! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Jagsfan82
Contributor III
Contributor III

Filelist "File not found" and/or "FindEx non existing dir" error

Hello all,

I'm running a filelist loop to load all files in a folder, and I'm getting a file not found error in the middle of the file list loop.  I'm not understanding what is causing this as it loads the first however many files, and then stops at a specific file.  It seems to find the file and then tell me the file doesn't exist.  What's going on here?

=====ERROR TEXT=========================

File not found error

Cannot open file: '\\DummyPath\2019-12-31\2020_01_17\USGL178I_DummyName_2019-12-31.xlsm
(ooxml, embedded labels, header is 7 lines, table is Sheet1)
Where F2 = Ceded Written Premium;

          //LOOP CONTENTS DELETED

'
System error: Filesystem::FindEx non existing dir \

=========================

Set MainPath = '\\DummyPath\Dummy2';

For Each Month in '\2019-12-31\2020_01_17','\2019-11-30\2019_12_13'

Let Path = '$(MainPath)'&'$(Month)';

Set vCounter = 0;


	For each file in filelist ('$(Path)'&'\*178I*.xlsm')
	
	Let vCounter = vCounter+1;
	//Start File Loop
	TEMP:
	LOAD
	Num(F32,'0000000') as MCC,
	Month(Date#(Right(FileBaseName(),10),'YYYY-MM-DD'))&'-'&Year(Date#(Right(FileBaseName(),10),'YYYY-MM-DD')) as AcctngMonth
	FROM
	$(file)
	(ooxml, embedded labels, header is 7 lines, table is Sheet1)
	Where F2 = 'Ceded Written Premium';

 

1 Solution

Accepted Solutions
Jagsfan82
Contributor III
Contributor III
Author

Added [ ] around the dollar sign expansion and the problem seems to be fixed

LOAD * FROM [$(file)]

opposed to 

LOAD * FROM $(file)

View solution in original post

1 Reply
Jagsfan82
Contributor III
Contributor III
Author

Added [ ] around the dollar sign expansion and the problem seems to be fixed

LOAD * FROM [$(file)]

opposed to 

LOAD * FROM $(file)