<?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 Check if file existed and delete in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Check-if-file-existed-and-delete/m-p/1268731#M399323</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement to store the table contents into csv files&amp;nbsp; if they have data. Everyday the file gets overwritten.\&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;LOAD *&amp;nbsp; Resident Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if NoOfRows('Table')&amp;gt;0 then&lt;/P&gt;&lt;P&gt;STORE Table into Table.csv(txt);&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there is data in the table today, the file gets created but what if I do not have data tomorrow. The file would still be there in the folder. Is there anything I can do to check if file existed and delete before creating a new one?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Nov 2016 16:03:38 GMT</pubDate>
    <dc:creator>reshmakala</dc:creator>
    <dc:date>2016-11-17T16:03:38Z</dc:date>
    <item>
      <title>Check if file existed and delete</title>
      <link>https://community.qlik.com/t5/QlikView/Check-if-file-existed-and-delete/m-p/1268731#M399323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement to store the table contents into csv files&amp;nbsp; if they have data. Everyday the file gets overwritten.\&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;LOAD *&amp;nbsp; Resident Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if NoOfRows('Table')&amp;gt;0 then&lt;/P&gt;&lt;P&gt;STORE Table into Table.csv(txt);&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there is data in the table today, the file gets created but what if I do not have data tomorrow. The file would still be there in the folder. Is there anything I can do to check if file existed and delete before creating a new one?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2016 16:03:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-if-file-existed-and-delete/m-p/1268731#M399323</guid>
      <dc:creator>reshmakala</dc:creator>
      <dc:date>2016-11-17T16:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: Check if file existed and delete</title>
      <link>https://community.qlik.com/t5/QlikView/Check-if-file-existed-and-delete/m-p/1268732#M399324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could include the following in your logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if filesize('Table.csv') &amp;gt; 0 then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXECUTE cmd.exe /C del Table.csv;&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2016 16:16:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-if-file-existed-and-delete/m-p/1268732#M399324</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-11-17T16:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: Check if file existed and delete</title>
      <link>https://community.qlik.com/t5/QlikView/Check-if-file-existed-and-delete/m-p/1268733#M399325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2016 16:28:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-if-file-existed-and-delete/m-p/1268733#M399325</guid>
      <dc:creator>reshmakala</dc:creator>
      <dc:date>2016-11-17T16:28:33Z</dc:date>
    </item>
  </channel>
</rss>

