<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: For each File - Syntax Error in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/For-each-File-Syntax-Error/m-p/75819#M779735</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;FOR each File in filelist &lt;STRONG&gt;('$(vSPOPAdPromo)*.CSV')&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;Folder:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '$(File)' as Name,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileTime( '$(File)' ) as FileTime&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; autogenerate 1;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;NEXT File&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Apr 2018 09:16:58 GMT</pubDate>
    <dc:creator>sasiparupudi1</dc:creator>
    <dc:date>2018-04-09T09:16:58Z</dc:date>
    <item>
      <title>For each File - Syntax Error</title>
      <link>https://community.qlik.com/t5/QlikView/For-each-File-Syntax-Error/m-p/75816#M779732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;QV12 SR4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following code worked great for at least a year until i had my computer reimaged (win10 reinstall) and i had to reinstall Qlikview.&amp;nbsp; Now i get a syntax error that i can't fathom out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error occurs immediately after the line in red below.&amp;nbsp; There is a file called &lt;STRONG&gt;dbCIPS - All - Apr 9 2018 09-47-14 AM.CSV&lt;/STRONG&gt; in the &lt;STRONG&gt;vSPOPAdPromo&lt;/STRONG&gt; folder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas most welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The syntax Error...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Unexpected token: '\\HAMMSTORE\Direct\Circulation\Data', expected one of: '(', ',', ':', 'OPERATOR_PLUS', 'OPERATOR_MINUS', 'OPERATOR_MULTIPLICATION', 'OPERATOR_DIVISION', ...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FOR each File in filelist &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;\\HAMMSTORE\Direct\Circulation\Data&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; ops\CIPS\Silverpop Database\dbCIPS - All*.CSV&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Path to AdPromo Files&lt;/P&gt;&lt;P&gt;LET vSPOPAdPromo = '\\' &amp;amp; '$(vHammstore)' &amp;amp; '\Direct\Circulation\Data ops\CIPS\Silverpop Database\';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;FOR each File in filelist $(vSPOPAdPromo)dbCIPS - All*.CSV&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Folder:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '$(File)' as Name,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileTime( '$(File)' ) as FileTime&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; autogenerate 1;&lt;/P&gt;&lt;P&gt;NEXT File&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LatestAdPromoFile:&lt;/P&gt;&lt;P&gt;First 1&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubField(Name,'\',SubStringCount(Name,'\')+1)&amp;nbsp;&amp;nbsp;&amp;nbsp; as FileNameOnly,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileTime,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 as dummy&lt;/P&gt;&lt;P&gt;Resident Folder&lt;/P&gt;&lt;P&gt;Order By FileTime DESC;&lt;/P&gt;&lt;P&gt;DROP Table Folder;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vLatestAdPromoFile = Peek('FileNameOnly',0,'LatestAdPromoFile');&lt;/P&gt;&lt;P&gt;LET vLatestAdPromoFileWithPath = Peek('Name',0,'LatestAdPromoFile');&lt;/P&gt;&lt;P&gt;DROP Table LatestAdPromoFile;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/For-each-File-Syntax-Error/m-p/75816#M779732</guid>
      <dc:creator>haymarketpaul</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: For each File - Syntax Error</title>
      <link>https://community.qlik.com/t5/QlikView/For-each-File-Syntax-Error/m-p/75817#M779733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;change the folder Path and reload it.&lt;/P&gt;&lt;P&gt;Hope so its will be work . i am also facing same issue in some month ago .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2018 09:00:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/For-each-File-Syntax-Error/m-p/75817#M779733</guid>
      <dc:creator>swarnendu</dc:creator>
      <dc:date>2018-04-09T09:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: For each File - Syntax Error</title>
      <link>https://community.qlik.com/t5/QlikView/For-each-File-Syntax-Error/m-p/75818#M779734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No luck - same message i'm afraid&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2018 09:09:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/For-each-File-Syntax-Error/m-p/75818#M779734</guid>
      <dc:creator>haymarketpaul</dc:creator>
      <dc:date>2018-04-09T09:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: For each File - Syntax Error</title>
      <link>https://community.qlik.com/t5/QlikView/For-each-File-Syntax-Error/m-p/75819#M779735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;FOR each File in filelist &lt;STRONG&gt;('$(vSPOPAdPromo)*.CSV')&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;Folder:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '$(File)' as Name,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileTime( '$(File)' ) as FileTime&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; autogenerate 1;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;NEXT File&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2018 09:16:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/For-each-File-Syntax-Error/m-p/75819#M779735</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2018-04-09T09:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: For each File - Syntax Error</title>
      <link>https://community.qlik.com/t5/QlikView/For-each-File-Syntax-Error/m-p/75820#M779736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wonderful - thank you - works perfectly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2018 09:22:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/For-each-File-Syntax-Error/m-p/75820#M779736</guid>
      <dc:creator>haymarketpaul</dc:creator>
      <dc:date>2018-04-09T09:22:24Z</dc:date>
    </item>
  </channel>
</rss>

