<?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: Delete old files? in Qlik Automate</title>
    <link>https://community.qlik.com/t5/Qlik-Automate/Delete-old-files/m-p/2511389#M5678</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/325174"&gt;@Richard_Norris&lt;/a&gt;&amp;nbsp; Please find the attached json file as per your requirement it will only delete files older than 7 days from current date. i have kept the filenames in my storage as per your naming and it is working fine. try this it will work.&lt;/P&gt;</description>
    <pubDate>Tue, 25 Mar 2025 04:42:34 GMT</pubDate>
    <dc:creator>salmankojar</dc:creator>
    <dc:date>2025-03-25T04:42:34Z</dc:date>
    <item>
      <title>Delete old files?</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Delete-old-files/m-p/2509516#M5620</link>
      <description>&lt;P&gt;I have a process that generates a timestamped report, "YY-MM-DD-hhmm Reportname.pdf" on OneDrive, and it works great. But what I want to do, is add another block, to delete older files.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess I probably need a 'check if file exists block' first, but my real issue is, how do I say,&amp;nbsp;&lt;/P&gt;&lt;P&gt;delete files matching "YY-MM-DD (of today minus 7 days) *WILDCARD* Reportname.pdf".&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So if I have&lt;/P&gt;&lt;P&gt;25-03-07-12:45pm Filename.pdf&lt;/P&gt;&lt;P&gt;25-03-07-16:22pm Filename.pdf&lt;/P&gt;&lt;P&gt;25-03-07-22:13pm Filename.pdf&lt;/P&gt;&lt;P&gt;and I run it on the 14th, it deletes all three of those files....?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 14:06:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Delete-old-files/m-p/2509516#M5620</guid>
      <dc:creator>Richard_Norris</dc:creator>
      <dc:date>2025-03-12T14:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: Delete old files?</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Delete-old-files/m-p/2509562#M5622</link>
      <description>&lt;P&gt;I solved the first issue I was having, which was getting the date for seven days ago. Seems that the syntax is&amp;nbsp;&lt;/P&gt;&lt;P&gt;"now - 7 day"&lt;/P&gt;&lt;P&gt;(Not days). So that's pretty cool. If I create a fake file with the name of the exact right timestamp (quite trivial to do as it takes exactly 50 seconds to run the script end to end) it deletes it just fine, with the conditional block. Now I just have to try and work out if there's a wildcard character to catch all files from that day rather than just ones that match down to the minute.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Seems like possibly the StartsWith(File.Name, 'Report_') might be the way to do it&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 16:08:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Delete-old-files/m-p/2509562#M5622</guid>
      <dc:creator>Richard_Norris</dc:creator>
      <dc:date>2025-03-12T16:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Delete old files?</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Delete-old-files/m-p/2511389#M5678</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/325174"&gt;@Richard_Norris&lt;/a&gt;&amp;nbsp; Please find the attached json file as per your requirement it will only delete files older than 7 days from current date. i have kept the filenames in my storage as per your naming and it is working fine. try this it will work.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2025 04:42:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Delete-old-files/m-p/2511389#M5678</guid>
      <dc:creator>salmankojar</dc:creator>
      <dc:date>2025-03-25T04:42:34Z</dc:date>
    </item>
  </channel>
</rss>

