<?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 Batch file script to remove older folders automatically in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Batch-file-script-to-remove-older-folders-automatically/m-p/252703#M1280271</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried the following comments in a batch file,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;mkdir c:\temp\OldDirectoriesGoHere&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;robocopy c:\logs\SoManyDirectoriesToDelete\ c:\temp\OldDirectoriesGoHere\ /move /minage:3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;rmdir /s /q c:\temp\OldDirectoriesGoHere&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the problem with the above script is that all the files got deleted irrespective of the time span,I need to remove the files&amp;nbsp; which are older than 3 days only&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my case the new files get added daily,so I need to execuit the batch file daily to remove the older once &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Kiruthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 May 2011 13:43:38 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-05-31T13:43:38Z</dc:date>
    <item>
      <title>Batch file script to remove older folders automatically</title>
      <link>https://community.qlik.com/t5/QlikView/Batch-file-script-to-remove-older-folders-automatically/m-p/252698#M1280260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to remove older folders&amp;nbsp; automatically after a specific period&amp;nbsp; in my directory,&lt;/P&gt;&lt;P&gt;I need to execuit the batch script to remove the older folders,can any one help me regarding the same&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiruthiga&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 18:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Batch-file-script-to-remove-older-folders-automatically/m-p/252698#M1280260</guid>
      <dc:creator />
      <dc:date>2026-01-26T18:19:17Z</dc:date>
    </item>
    <item>
      <title>Batch file script to remove older folders automatically</title>
      <link>https://community.qlik.com/t5/QlikView/Batch-file-script-to-remove-older-folders-automatically/m-p/252699#M1280262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;Here's a vbscript example for removing a folder:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;dim filesys, demofolder&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;set filesys = CreateObject ("Scripting.FileSystemObject")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;set demofolder = filesys.GetFolder("c:\projects\")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;demofolder.Delete&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This can be run from a batch file or from a QV macro with System access privilege.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2011 07:04:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Batch-file-script-to-remove-older-folders-automatically/m-p/252699#M1280262</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-31T07:04:07Z</dc:date>
    </item>
    <item>
      <title>Batch file script to remove older folders automatically</title>
      <link>https://community.qlik.com/t5/QlikView/Batch-file-script-to-remove-older-folders-automatically/m-p/252700#M1280265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Johannes,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks for your reply,actually I need a batch file that keeps the 3 latest folder dates and deletes the rest.&lt;/P&gt;&lt;DIV class="sender maxWidth" style="color: #2c69a5;" title="Konda, Haribabu (GE Healthcare, consultant)"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The folder format is YYYYMMDD &lt;/DIV&gt;&lt;DIV class="sender maxWidth" style="color: #2c69a5;" title="Konda, Haribabu (GE Healthcare, consultant)"&gt; &lt;/DIV&gt;&lt;DIV class="sender maxWidth" style="color: #2c69a5;" title="Konda, Haribabu (GE Healthcare, consultant)"&gt; &lt;/DIV&gt;&lt;DIV class="sender maxWidth" style="color: #2c69a5;" title="Konda, Haribabu (GE Healthcare, consultant)"&gt;Thanks again,&lt;/DIV&gt;&lt;DIV class="sender maxWidth" style="color: #2c69a5;" title="Konda, Haribabu (GE Healthcare, consultant)"&gt;Kiruthiga&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2011 07:23:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Batch-file-script-to-remove-older-folders-automatically/m-p/252700#M1280265</guid>
      <dc:creator />
      <dc:date>2011-05-31T07:23:34Z</dc:date>
    </item>
    <item>
      <title>Batch file script to remove older folders automatically</title>
      <link>https://community.qlik.com/t5/QlikView/Batch-file-script-to-remove-older-folders-automatically/m-p/252701#M1280268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That additional info raises further questions.&lt;/P&gt;&lt;P&gt;1. How often do you run the script?&lt;/P&gt;&lt;P&gt;2. How often are new folders created? Daily? Weekends as well?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it's always one folder a day, even on weekends, and you run the batch daily, you can just tell it to delete the folder from 4 days ago.&lt;/P&gt;&lt;P&gt;Otherwise you'll need to program some logic in there. &lt;/P&gt;&lt;P&gt;One example can be found at the bottom here where you create an array of all folders available and add the three latest ones to the exclusion list:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.visualbasicscript.com/VBS-to-delete-all-empty-subfolders-in-a-directory-except-what39s-in-an-exception-list-m89421.aspx"&gt;http://www.visualbasicscript.com/VBS-to-delete-all-empty-subfolders-in-a-directory-except-what39s-in-an-exception-list-m89421.aspx&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2011 07:49:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Batch-file-script-to-remove-older-folders-automatically/m-p/252701#M1280268</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-31T07:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: Batch file script to remove older folders automatically</title>
      <link>https://community.qlik.com/t5/QlikView/Batch-file-script-to-remove-older-folders-automatically/m-p/252702#M1280270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why overcomplicate things? Can you just delete files and folders older than X days ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://blog.stevienova.com/2007/02/27/forfiles-delete-files-older-than-x-amount-of-days/"&gt;http://blog.stevienova.com/2007/02/27/forfiles-delete-files-older-than-x-amount-of-days/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="code"&gt;&lt;/P&gt;&lt;PRE class="winbatch" style="font-family: monospace;"&gt;FORFILES &lt;SPAN style="color: #66cc66;"&gt;/&lt;/SPAN&gt;P C&lt;SPAN style="color: #ff1010; font-weight: bold;"&gt;:\MyPath\ /S /M log*.xml /D -30 /C "cmd /c del @file"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/S – look at subdirectories&lt;/P&gt;&lt;P&gt;log*.xml – that is the file pattern, you could have it be like *.txt for example&lt;/P&gt;&lt;P&gt;/D -30 = files greater than 30 days&lt;/P&gt;&lt;P&gt;/C – thats the command you want to run&lt;/P&gt;&lt;P&gt;this is pretty much a one line command that could replace a ton of vbScripts, batch files, and other apps I have seen over the years to clean up files. Something for every sys admin’s toolbelt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Alex&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.snowflakejoins.com"&gt;http://www.snowflakejoins.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2011 08:56:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Batch-file-script-to-remove-older-folders-automatically/m-p/252702#M1280270</guid>
      <dc:creator />
      <dc:date>2011-05-31T08:56:25Z</dc:date>
    </item>
    <item>
      <title>Batch file script to remove older folders automatically</title>
      <link>https://community.qlik.com/t5/QlikView/Batch-file-script-to-remove-older-folders-automatically/m-p/252703#M1280271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried the following comments in a batch file,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;mkdir c:\temp\OldDirectoriesGoHere&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;robocopy c:\logs\SoManyDirectoriesToDelete\ c:\temp\OldDirectoriesGoHere\ /move /minage:3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;rmdir /s /q c:\temp\OldDirectoriesGoHere&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the problem with the above script is that all the files got deleted irrespective of the time span,I need to remove the files&amp;nbsp; which are older than 3 days only&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my case the new files get added daily,so I need to execuit the batch file daily to remove the older once &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Kiruthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2011 13:43:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Batch-file-script-to-remove-older-folders-automatically/m-p/252703#M1280271</guid>
      <dc:creator />
      <dc:date>2011-05-31T13:43:38Z</dc:date>
    </item>
  </channel>
</rss>

