Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
rajni_batra
Specialist
Specialist

Filename with errorlog

Hi,

I  have loaded n no. of files but format of some files is different so i need to get the name of these files which have format issue.

Plz help u guys have any idea to resolve

Labels (1)
2 Replies
datanibbler
Champion
Champion

Hi Rajni,

I don't have Winrar here. What kind of formatting are you referring to? In what respect can the files differ?

tresB
Champion III
Champion III

Load the filenames when ScriptError<>0, like;

LET vErrorLog=NULL();

SET errormode = 0;
LOAD *,
     FileBaseName() as Filename
FROM
[..\Desktop\CRM\Test\CRM*.csv]
(txt, utf8, embedded labels, delimiter is ',', msq);


if ScriptError <> 0 then

LOAD *,

     FileBaseName() as ErroFilename

FROM

[..\Desktop\CRM\Test\CRM*.csv]

(txt, utf8, embedded labels, delimiter is ',', msq);

ENDIF