<?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 Cifs share periodic file deletion script in ONTAP Discussions</title>
    <link>https://community.netapp.com/t5/ONTAP-Discussions/Cifs-share-periodic-file-deletion-script/m-p/440831#M41649</link>
    <description>&lt;P&gt;Hello, I want to periodically automatically delete the content of one of my share files.&lt;BR /&gt;I changed the following instruction according to myself, I applied it, but I am not getting any results.&lt;BR /&gt;Anyone have experience on this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;set folder="\\X.X.X.X\path" cd /d %folder% for /F "delims=" %%i in ('dir /b') do (rmdir "%%i" /s/q || del " %%i" /s/q)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://helpdeskgeek.com/help-desk/fix-scheduled-task-wont-run-bat-file/" target="_blank"&gt;https://helpdeskgeek.com/help-desk/fix-scheduled-task-wont-run-bat-file/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2025 09:54:11 GMT</pubDate>
    <dc:creator>terhand</dc:creator>
    <dc:date>2025-06-04T09:54:11Z</dc:date>
    <item>
      <title>Cifs share periodic file deletion script</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Cifs-share-periodic-file-deletion-script/m-p/440831#M41649</link>
      <description>&lt;P&gt;Hello, I want to periodically automatically delete the content of one of my share files.&lt;BR /&gt;I changed the following instruction according to myself, I applied it, but I am not getting any results.&lt;BR /&gt;Anyone have experience on this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;set folder="\\X.X.X.X\path" cd /d %folder% for /F "delims=" %%i in ('dir /b') do (rmdir "%%i" /s/q || del " %%i" /s/q)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://helpdeskgeek.com/help-desk/fix-scheduled-task-wont-run-bat-file/" target="_blank"&gt;https://helpdeskgeek.com/help-desk/fix-scheduled-task-wont-run-bat-file/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 09:54:11 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Cifs-share-periodic-file-deletion-script/m-p/440831#M41649</guid>
      <dc:creator>terhand</dc:creator>
      <dc:date>2025-06-04T09:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Cifs share periodic file deletion script</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Cifs-share-periodic-file-deletion-script/m-p/440833#M41650</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;I was able to delete the network file share with periodic task with the following batch.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;my problem is solved, but if there are any suggestions about the method or different, I can take it.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;@ECHO OFF&lt;/P&gt;&lt;P&gt;SET THEDIR=path-to-folder&lt;/P&gt;&lt;P&gt;Echo Deleting all files from %THEDIR%&lt;BR /&gt;DEL "%THEDIR%\*" /F /Q /A&lt;/P&gt;&lt;P&gt;Echo Deleting all folders from %THEDIR%&lt;BR /&gt;FOR /F "eol=| delims=" %%I in ('dir "%THEDIR%\*" /AD /B 2^&amp;gt;nul') do rd /Q /S "%THEDIR%\%%I"&lt;BR /&gt;@ECHO Folder deleted.&lt;/P&gt;&lt;P&gt;EXIT&lt;/P&gt;</description>
      <pubDate>Sun, 08 Jan 2023 17:51:39 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Cifs-share-periodic-file-deletion-script/m-p/440833#M41650</guid>
      <dc:creator>terhand</dc:creator>
      <dc:date>2023-01-08T17:51:39Z</dc:date>
    </item>
  </channel>
</rss>

