<?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 I would need create a directory with mmddyy format in one location by using x command. in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/I-would-need-create-a-directory-with-mmddyy-format-in-one/m-p/456657#M29411</link>
    <description>&lt;P&gt;1)I would need create one directory like 24042018(directory) by using X command&lt;/P&gt;&lt;P&gt;for example : 'x mkdir /data/file/data_folder';&lt;/P&gt;&lt;P&gt;when ever we run that code it will create current datefolder&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2)Directories should maintain only week folders remaining folder should delete through sas program&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Really appreciate your help on this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Apr 2018 19:23:01 GMT</pubDate>
    <dc:creator>Pavan4</dc:creator>
    <dc:date>2018-04-23T19:23:01Z</dc:date>
    <item>
      <title>I would need create a directory with mmddyy format in one location by using x command.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/I-would-need-create-a-directory-with-mmddyy-format-in-one/m-p/456657#M29411</link>
      <description>&lt;P&gt;1)I would need create one directory like 24042018(directory) by using X command&lt;/P&gt;&lt;P&gt;for example : 'x mkdir /data/file/data_folder';&lt;/P&gt;&lt;P&gt;when ever we run that code it will create current datefolder&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2)Directories should maintain only week folders remaining folder should delete through sas program&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Really appreciate your help on this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Apr 2018 19:23:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/I-would-need-create-a-directory-with-mmddyy-format-in-one/m-p/456657#M29411</guid>
      <dc:creator>Pavan4</dc:creator>
      <dc:date>2018-04-23T19:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: I would need create a directory with mmddyy format in one location by using x command.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/I-would-need-create-a-directory-with-mmddyy-format-in-one/m-p/456658#M29412</link>
      <description>&lt;P&gt;Why XCMD? Can you use DCREATE()? Or the LIBNAME trick with the DLCREATEDIR option enabled.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sasdummy/2013/07/02/use-dlcreatedir-to-create-folders/" target="_blank"&gt;https://blogs.sas.com/content/sasdummy/2013/07/02/use-dlcreatedir-to-create-folders/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's also FDELETE() to delete the folders you don't want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Apr 2018 19:24:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/I-would-need-create-a-directory-with-mmddyy-format-in-one/m-p/456658#M29412</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-23T19:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: I would need create a directory with mmddyy format in one location by using x command.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/I-would-need-create-a-directory-with-mmddyy-format-in-one/m-p/456680#M29414</link>
      <description>&lt;P&gt;Hi Thanks for your reply but we are using unix environment .All the folders are in unix boxes.that is why I am using X commands&lt;/P&gt;&lt;P&gt;but I would need create directory with current dateformat for example the if I execute the sas code today it should create folder like 24042018 in some directory&lt;/P&gt;&lt;P&gt;Really appreciate your help&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Apr 2018 20:11:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/I-would-need-create-a-directory-with-mmddyy-format-in-one/m-p/456680#M29414</guid>
      <dc:creator>Pavan4</dc:creator>
      <dc:date>2018-04-23T20:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: I would need create a directory with mmddyy format in one location by using x command.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/I-would-need-create-a-directory-with-mmddyy-format-in-one/m-p/456684#M29415</link>
      <description>&lt;P&gt;Not sure why you still can't use DCREATE() or LIBNAME. This is the idea below.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;

path_to_folder = '/folders/myfolders/';
date_char = put(today, yymmdd10.);
folder_name = catx("_", 'folder', date_char);

y = dcreate(folder_name, path_to_folder);

run;


&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To check for the existence of the other folder you can use FEXIST and then FDELETE. You didn't specify how the naming is managed but it should be relatively straightforward if you have a structured process.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/186332"&gt;@Pavan4&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi Thanks for your reply but we are using unix environment .All the folders are in unix boxes.that is why I am using X commands&lt;/P&gt;
&lt;P&gt;but I would need create directory with current dateformat for example the if I execute the sas code today it should create folder like 24042018 in some directory&lt;/P&gt;
&lt;P&gt;Really appreciate your help&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;If you have to use X commands, you need to find the Unix commands which is best done on a unix forum, and then you pass them to the system using %SYSEXEC, CALL SYSTEM, or X statements.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In that case, I'd test the commands on the unix side first as well and then move the commands back to SAS after they're fully tested, otherwise you have more room for error.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Apr 2018 20:20:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/I-would-need-create-a-directory-with-mmddyy-format-in-one/m-p/456684#M29415</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-23T20:20:19Z</dc:date>
    </item>
  </channel>
</rss>

