This content has been marked as final. Show 7 replies
I have a script which will load the latest file in a stated folder. Currently it is the latest .CSV but sometimes a .txt file is saved.....
I need help on what changes is required in my load script, to now take into account the .txt files. So basically I require to load the latest file, no matter what file extension it has.
This is my current code:
If FileSize('F:\file_location\*.csv')>0 then
for each File in filelist ('F:\file_location\*.csv')
Load '$(File)' as Name,
FileTime( '$(File)' ) as FileTime
1 as dummy
Order By FileTime DESC;
drop table Folder;
LOAD [@1:n] as 'Image Data'
(fix, utf8, no labels);
Load MsgBox ('No files found in the folder!','Status','OKCANCEL','ICONHAND') AutoGenerate 1;
DROP Table Temp;