<?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: Code for Deleting   2 years old zip files from  a folder using sas in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/293066#M20023</link>
    <description>&lt;P&gt;HI Experts ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding the file deletion I have used the below code but now worked . The file name is SFRE_BIL_SIT_20140822_134317_PAM_FILES1.zip&lt;/P&gt;&lt;P&gt;Here only I need to concentrate the year and month part to make it delete . Nut somehow it is not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;options mlogic;
    %macro delete_all_zip_files_in_folder(folder);
       filename filelist "&amp;amp;folder";
       data _null_;
	      dir_id = dopen('filelist');
          total_members = dnum(dir_id);
          do i = 1 to total_members;  
           member_name = dread(dir_id,i);

		datestring = scan(member_name,4,'_');
		
		month = input(substr(datestring,5,2),best.);
		day = input(substr(datestring,7,2),best.);
		year = input(substr(datestring,1,4),best.);
		date = mdy(month, day, year);
			 if intnx('year', today(),-2) &amp;gt; date then do;
              file_id = mopen(dir_id,member_name,'i',0);
              if file_id &amp;gt; 0 then do; 
                freadrc = fread(file_id);
                rc = fclose(file_id);
                rc = filename('delete',member_name,,,'filelist');
                rc = fdelete('delete');
             end;
             rc = fclose(file_id);
          end;
          end;
          rc = dclose(dir_id);
       run;
    %mend;


	%delete_all_zip_files_in_folder(C:\Users\UCS1MKP\Desktop\test)

&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 22 Aug 2016 08:59:30 GMT</pubDate>
    <dc:creator>ambadi007</dc:creator>
    <dc:date>2016-08-22T08:59:30Z</dc:date>
    <item>
      <title>Code for Deleting   2 years old zip files from  a folder using sas</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/292401#M19965</link>
      <description>&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please give a macro code for deleting old files (2 year old ) from a folder that runs automatically in every year starting .&lt;/P&gt;&lt;P&gt;The code . I am using SAS EG to run my code .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Manesh&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 10:29:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/292401#M19965</guid>
      <dc:creator>ambadi007</dc:creator>
      <dc:date>2016-08-18T10:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Code for Deleting   2 years old zip files from  a folder using sas</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/292405#M19966</link>
      <description>&lt;P&gt;Do you have the creation date somehow coded into filenames, or must that be retrieved from the operating system?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 10:49:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/292405#M19966</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-08-18T10:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Code for Deleting   2 years old zip files from  a folder using sas</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/292406#M19967</link>
      <description>&lt;P&gt;To be honest with you, file management is not the purpose of SAS (which is for processing and analyzing data). &amp;nbsp;This topic comes under system administration. &amp;nbsp;There should be a plan in place to remove older files, achive them if necessary etc. &amp;nbsp;Whilst you could write a program in SAS to do that, you could run into problems, say if the files are locked out, or your code fails or something else. &amp;nbsp;I would really advise you to just just build a procdure document (maybe with your IT group), that at a fixed timepoint file cleanups will happen. &amp;nbsp;It maybe those files can be moved out of direct access storage (i.e. you don't see them, but they don't get removed), and I am sure your IT group will already have some of this to hand. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 10:52:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/292406#M19967</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-08-18T10:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Code for Deleting   2 years old zip files from  a folder using sas</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/292411#M19968</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The file name is like the below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SFRE_BIL_SIT_20160812_134317_PAM_FILES1.zip&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in the file 20160812&amp;nbsp;&amp;nbsp; is the year month and day of the file&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 11:42:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/292411#M19968</guid>
      <dc:creator>ambadi007</dc:creator>
      <dc:date>2016-08-18T11:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Code for Deleting   2 years old zip files from  a folder using sas</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/292417#M19969</link>
      <description>&lt;P&gt;So, let's assume you want to delete a file that is 2 years old today from a directory and has the date somewhere in the filename:&lt;/P&gt;
&lt;P&gt;- store the directory name in a macro variable (this will help in later wrapping your code in a macro)&lt;/P&gt;
&lt;P&gt;(everything from here in a data _null_ step)&lt;/P&gt;
&lt;P&gt;- store the value of the macro variable in a data step variable&lt;/P&gt;
&lt;P&gt;- use put(intnx('year',date,-2,'same'),yymmddn8.) to get a date string in your notation&lt;/P&gt;
&lt;P&gt;- use the filename() function to assign a fileref with the directory name&lt;/P&gt;
&lt;P&gt;- use the dopen() function to open the directory; assign the result to a data step variable&lt;/P&gt;
&lt;P&gt;- use the dnum() function on that datastep variable to retrieve the number of members in the directory&lt;/P&gt;
&lt;P&gt;- in a do loop from 1 to number of members, iterate through all the files: use the dread() function to retrieve the filename of a file&lt;/P&gt;
&lt;P&gt;- if that file name matches your requirement (contains the date string created earlier), use the filename() function again to create a fileref for the zip file, and then use fdelete() to delete that file&lt;/P&gt;
&lt;P&gt;- after the do loop, use fclose() to close the directory&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 12:09:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/292417#M19969</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-08-18T12:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Code for Deleting   2 years old zip files from  a folder using sas</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/292451#M19974</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Iam trying with the below code and I could able to delete the files which is in zip format&amp;nbsp;but I need to know how we can filter to delete only the 2 year old files . The file name will be &lt;STRONG&gt;SFRE_BIL_SIT_20160812_134317_PAM_FILES1.zip&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;when doing the filtering for deleting the 2 year old fiIes I &amp;nbsp;need to concentrate only the year and month part for the file to do he deletion because the day part will be changing . Please find below the code&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options mlogic;
    %macro delete_all_zip_files_in_folder(folder);
       filename filelist "&amp;amp;folder";
       data _null_;
          dir_id = dopen('filelist');
          total_members = dnum(dir_id);
          do i = 1 to total_members;  
             member_name = dread(dir_id,i);
             if scan(lowcase(member_name),2,'.')='zip' then do; 
              file_id = mopen(dir_id,member_name,'i',0);
              if file_id &amp;gt; 0 then do; 
                freadrc = fread(file_id);
                rc = fclose(file_id);
                rc = filename('delete',member_name,,,'filelist');
                rc = fdelete('delete');
             end;
             rc = fclose(file_id);
          end;
          end;
          rc = dclose(dir_id);
       run;
    %mend;


	%delete_all_zip_files_in_folder(C:\Users\UCS1MKP\Desktop\test)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please give me a solution for this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 15:47:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/292451#M19974</guid>
      <dc:creator>ambadi007</dc:creator>
      <dc:date>2016-08-18T15:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: Code for Deleting   2 years old zip files from  a folder using sas</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/292635#M19994</link>
      <description>&lt;PRE&gt;
It is more like OS Admin 's task.
Can you use X statement ? That is the most convenient way .


 %macro delete_all_zip_files_in_folder(folder);
       filename filelist "&amp;amp;folder";
       data _null_;
          dir_id = dopen('filelist');
          total_members = dnum(dir_id);
          do i = 1 to total_members;  
             member_name = dread(dir_id,i);
             if scan(lowcase(member_name),2,'.')='zip' then do; 


              ......if member_name like  'SFRE_BIL_SIT_20160812_134317_PAM_FILES1' then do;...............................
                rc = filename('delete',member_name,,,'filelist');
                rc = fdelete('delete');
              end;


             end;
             rc = fclose(file_id);
          end;


&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Aug 2016 03:34:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/292635#M19994</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-19T03:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: Code for Deleting   2 years old zip files from  a folder using sas</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/292647#M19995</link>
      <description>&lt;P&gt;Hi Thanks for your reply .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But here I am getting exactly what i need to get with &amp;nbsp;the code I&amp;nbsp;have provided&amp;nbsp;except the deletion of the particular files which&amp;nbsp;I need to focus on&amp;nbsp;older than 2 years , The file name would like&lt;/P&gt;&lt;P&gt;'SFRE_BIL_SIT_20160812_134317_PAM_FILES1'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here I need to extract only the Year part and delete if it today - 2 year . Only that I need to include the with the below macro&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;options mlogic;
    %macro delete_all_zip_files_in_folder(folder);
       filename filelist "&amp;amp;folder";
       data _null_;
          dir_id = dopen('filelist');
          total_members = dnum(dir_id);
          do i = 1 to total_members;  
             member_name = dread(dir_id,i);
             if scan(lowcase(member_name),2,'.')='zip' then do; 
              file_id = mopen(dir_id,member_name,'i',0);
              if file_id &amp;gt; 0 then do; 
                freadrc = fread(file_id);
                rc = fclose(file_id);
                rc = filename('delete',member_name,,,'filelist');
                rc = fdelete('delete');
             end;
             rc = fclose(file_id);
          end;
          end;
          rc = dclose(dir_id);
       run;
    %mend;


	%delete_all_zip_files_in_folder(C:\Users\UCS1MKP\Desktop\test)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2016 05:13:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/292647#M19995</guid>
      <dc:creator>ambadi007</dc:creator>
      <dc:date>2016-08-19T05:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Code for Deleting   2 years old zip files from  a folder using sas</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/292650#M19996</link>
      <description>&lt;P&gt;The basic logic for the year would look like that:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options mlogic;
    %macro delete_all_zip_files_in_folder(folder);
       filename filelist "&amp;amp;folder";
       data _null_;
          cutoff_date = put(year(date())-2,4.);
          dir_id = dopen('filelist');
          total_members = dnum(dir_id);
          do i = 1 to total_members;  
             member_name = dread(dir_id,i);
             if scan(lowcase(member_name),2,'.')='zip'
             and index(scan(lowcase(member_name),1,'.'),cutoff_date) &amp;gt; 0
             then do; 
              file_id = mopen(dir_id,member_name,'i',0);
              if file_id &amp;gt; 0 then do; 
                freadrc = fread(file_id);
                rc = fclose(file_id);
                rc = filename('delete',member_name,,,'filelist');
                rc = fdelete('delete');
             end;
             rc = fclose(file_id);
          end;
          end;
          rc = dclose(dir_id);
       run;
    %mend;


	%delete_all_zip_files_in_folder(C:\Users\UCS1MKP\Desktop\test)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Aug 2016 06:10:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/292650#M19996</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-08-19T06:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Code for Deleting   2 years old zip files from  a folder using sas</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/293066#M20023</link>
      <description>&lt;P&gt;HI Experts ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding the file deletion I have used the below code but now worked . The file name is SFRE_BIL_SIT_20140822_134317_PAM_FILES1.zip&lt;/P&gt;&lt;P&gt;Here only I need to concentrate the year and month part to make it delete . Nut somehow it is not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;options mlogic;
    %macro delete_all_zip_files_in_folder(folder);
       filename filelist "&amp;amp;folder";
       data _null_;
	      dir_id = dopen('filelist');
          total_members = dnum(dir_id);
          do i = 1 to total_members;  
           member_name = dread(dir_id,i);

		datestring = scan(member_name,4,'_');
		
		month = input(substr(datestring,5,2),best.);
		day = input(substr(datestring,7,2),best.);
		year = input(substr(datestring,1,4),best.);
		date = mdy(month, day, year);
			 if intnx('year', today(),-2) &amp;gt; date then do;
              file_id = mopen(dir_id,member_name,'i',0);
              if file_id &amp;gt; 0 then do; 
                freadrc = fread(file_id);
                rc = fclose(file_id);
                rc = filename('delete',member_name,,,'filelist');
                rc = fdelete('delete');
             end;
             rc = fclose(file_id);
          end;
          end;
          rc = dclose(dir_id);
       run;
    %mend;


	%delete_all_zip_files_in_folder(C:\Users\UCS1MKP\Desktop\test)

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Aug 2016 08:59:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/293066#M20023</guid>
      <dc:creator>ambadi007</dc:creator>
      <dc:date>2016-08-22T08:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: Code for Deleting   2 years old zip files from  a folder using sas</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/293076#M20028</link>
      <description>&lt;P&gt;Define "not working".&lt;/P&gt;
&lt;P&gt;Do you get an error, are files not found, .... ?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 09:28:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/293076#M20028</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-08-22T09:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Code for Deleting   2 years old zip files from  a folder using sas</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/293087#M20031</link>
      <description>&lt;P&gt;NO That was wondering there was no error and messages like that &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 10:02:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/293087#M20031</guid>
      <dc:creator>ambadi007</dc:creator>
      <dc:date>2016-08-22T10:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: Code for Deleting   2 years old zip files from  a folder using sas</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/293089#M20032</link>
      <description>&lt;P&gt;And what does or does not happen?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 10:22:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/293089#M20032</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-08-22T10:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Code for Deleting   2 years old zip files from  a folder using sas</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/293092#M20033</link>
      <description>&lt;P&gt;Hi Kurt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have successfully deleted the files which are having 2 years old and the code I have made a small change I am attaching the code with this , it may be usefull if somebody got this kind of scenarios. Thank you once gain for the help and support for tackling this issue..&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options mlogic;
    %macro delete_all_zip_files_in_folder(folder);
       filename filelist "&amp;amp;folder";
       data _null_;
	      dir_id = dopen('filelist');
          total_members = dnum(dir_id);
          do i = 1 to total_members;  
           member_name = dread(dir_id,i);

		datestring = scan(member_name,4,'_');
		
		month = input(substr(datestring,5,2),best.);
		day = input(substr(datestring,5,2),best.);
		year = input(substr(datestring,1,4),best.);
		date = mdy(month, day, year);
			 if intnx('year', today(),-2,'S') &amp;gt; date then do;
              file_id = mopen(dir_id,member_name,'i',0);
              if file_id &amp;gt; 0 then do; 
                freadrc = fread(file_id);
                rc = fclose(file_id);
                rc = filename('delete',member_name,,,'filelist');
                rc = fdelete('delete');
             end;
             rc = fclose(file_id);
          end;
          end;
          rc = dclose(dir_id);
       run;
    %mend;


	%delete_all_zip_files_in_folder(C:\Users\UCS1MKP\Desktop\test)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Aug 2016 10:29:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-Deleting-2-years-old-zip-files-from-a-folder-using-sas/m-p/293092#M20033</guid>
      <dc:creator>ambadi007</dc:creator>
      <dc:date>2016-08-22T10:29:40Z</dc:date>
    </item>
  </channel>
</rss>

