<?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: how to delete a weird directory from within SAS? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-delete-a-weird-directory-from-within-SAS/m-p/880808#M348022</link>
    <description>&lt;P&gt;You can try the FDELETE() function:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename testdir 'physical-filename';
data _null_;
   rc=fdelete('testdir');
   put rc=;
   msg=sysmsg();
   put msg=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Example is from the documentation:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/p0h945u5r0cv6yn1u6qs35hiqt9t.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/p0h945u5r0cv6yn1u6qs35hiqt9t.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Jun 2023 20:28:48 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2023-06-14T20:28:48Z</dc:date>
    <item>
      <title>how to delete a weird directory from within SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-delete-a-weird-directory-from-within-SAS/m-p/880783#M348008</link>
      <description>&lt;P&gt;I use sas studio and mistakenly created a weird directory by a wrong sas statement as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;options dlcreatedir&lt;/P&gt;&lt;P&gt;libname&amp;nbsp; myname "output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the directory created is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output;OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;ODS HTML CLOSE;GOPTIONS NOACCESSIBLE;; ;*';*&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my question is, how to possibly delete this directory from within SAS?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 19:21:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-delete-a-weird-directory-from-within-SAS/m-p/880783#M348008</guid>
      <dc:creator>Newlifewithegg</dc:creator>
      <dc:date>2023-06-14T19:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to delete a weird directory from within SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-delete-a-weird-directory-from-within-SAS/m-p/880784#M348009</link>
      <description>please ignore the syntax error coming with a missing ; following dlcreatedir</description>
      <pubDate>Wed, 14 Jun 2023 19:23:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-delete-a-weird-directory-from-within-SAS/m-p/880784#M348009</guid>
      <dc:creator>Newlifewithegg</dc:creator>
      <dc:date>2023-06-14T19:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: how to delete a weird directory from within SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-delete-a-weird-directory-from-within-SAS/m-p/880793#M348012</link>
      <description>Do you have the log? It should have the path the folder is created/assigned. &lt;BR /&gt;&lt;BR /&gt;If so, navigate to that location using Servers Files Folders Pane and delete the folder created.</description>
      <pubDate>Wed, 14 Jun 2023 19:58:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-delete-a-weird-directory-from-within-SAS/m-p/880793#M348012</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-06-14T19:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to delete a weird directory from within SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-delete-a-weird-directory-from-within-SAS/m-p/880800#M348015</link>
      <description>&lt;P&gt;Thanks, I definitely am able to remove it with system operations outside of SAS. But the purpose here is to practice with SAS, thus am asking whether there is way to deal with this case within SAS.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 20:11:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-delete-a-weird-directory-from-within-SAS/m-p/880800#M348015</guid>
      <dc:creator>Newlifewithegg</dc:creator>
      <dc:date>2023-06-14T20:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to delete a weird directory from within SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-delete-a-weird-directory-from-within-SAS/m-p/880808#M348022</link>
      <description>&lt;P&gt;You can try the FDELETE() function:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename testdir 'physical-filename';
data _null_;
   rc=fdelete('testdir');
   put rc=;
   msg=sysmsg();
   put msg=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Example is from the documentation:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/p0h945u5r0cv6yn1u6qs35hiqt9t.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/p0h945u5r0cv6yn1u6qs35hiqt9t.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 20:28:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-delete-a-weird-directory-from-within-SAS/m-p/880808#M348022</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-06-14T20:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to delete a weird directory from within SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-delete-a-weird-directory-from-within-SAS/m-p/880809#M348023</link>
      <description>&lt;P&gt;You mean using code rather than the GUI I assume?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In that case, FDELETE is the simplest way as shown by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 20:30:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-delete-a-weird-directory-from-within-SAS/m-p/880809#M348023</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-06-14T20:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: how to delete a weird directory from within SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-delete-a-weird-directory-from-within-SAS/m-p/880812#M348025</link>
      <description>&lt;P&gt;Make sure no datasets exist in the library, then de-assign the libname first:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc datasets lib=output kill;&lt;BR /&gt;quit;&lt;BR /&gt;libname myname clear;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then run:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
rc= fdelete("output;OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;ODS HTML CLOSE;GOPTIONS NOACCESSIBLE;; ;*';*");
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 20:34:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-delete-a-weird-directory-from-within-SAS/m-p/880812#M348025</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-06-14T20:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to delete a weird directory from within SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-delete-a-weird-directory-from-within-SAS/m-p/880856#M348045</link>
      <description>&lt;P&gt;Thank you all for your help. Seems the issue is more fundamental and nearly irrelevant to sas programming. The weird filename cannot be be copy/pasted to sas studio environment, it can only be pasted into word/textbox etc environments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another more complete solution can be found at&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/delete-a-folder-directory-and-all-files-on-it/td-p/584870" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/delete-a-folder-directory-and-all-files-on-it/td-p/584870&lt;/A&gt;&lt;/P&gt;&lt;P&gt;if the directory contains files&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 05:44:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-delete-a-weird-directory-from-within-SAS/m-p/880856#M348045</guid>
      <dc:creator>Newlifewithegg</dc:creator>
      <dc:date>2023-06-15T05:44:55Z</dc:date>
    </item>
  </channel>
</rss>

