<?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 set the folder properties through programming under the system of  MS windows in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-set-the-folder-properties-through-programming-under-the/m-p/711967#M219399</link>
    <description>Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&lt;BR /&gt;the cmd command is a good option, is there any X command in sas code to grant the read and exectute access?&lt;BR /&gt;&lt;BR /&gt;In excel, the user can record the simple VBA macro code when click the icon of record macro, do you know any software can record the cmd command to create batch file quickly?&lt;BR /&gt;</description>
    <pubDate>Sun, 17 Jan 2021 14:27:11 GMT</pubDate>
    <dc:creator>blueskyxyz</dc:creator>
    <dc:date>2021-01-17T14:27:11Z</dc:date>
    <item>
      <title>How to set the folder properties through programming under the system of  MS windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-set-the-folder-properties-through-programming-under-the/m-p/711926#M219383</link>
      <description>&lt;P&gt;When start a new clinical study, the first step is to bulid the folders for programmer users.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can click the mouse to create the folder and set the folder properties on your PC.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 507px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53568i77A596E11243FFA0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;How to set the folder properties through programming under the system of MS windows, and only the owner can change and update his or her own code, others have no right to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*******************************************
How to set the folder properties in the code under the system of  MS windows 

When start a new clinical study, the first step is to bulid the folders for programmer users.

you can click the mouse to create the folder and set the folder properties on your PC, but how to use the code to do those things automatically?
******************************************;

%MACRO SETUP;
%let Sponsor=COMPANY001;
%let Study=STUDY001;
%let root=D:\&amp;amp;Sponsor\&amp;amp;study;
%let PHASE=DRAFT; 
%LET QCUSER=TOM;

/*-----------------------------------------------------------------------------
  Create folder and Libnames
  ----------------------------------------------------------------------------*/
options noxwait;
  x mkdir "&amp;amp;root\";
  x mkdir "&amp;amp;root\0_DOC";
  x mkdir "&amp;amp;root\&amp;amp;PHASE";
  x mkdir "&amp;amp;root\&amp;amp;PHASE\0_DOC";
  x mkdir "&amp;amp;root\&amp;amp;PHASE\PROD";
  x mkdir "&amp;amp;root\&amp;amp;PHASE\PROD\ADAM";
  x mkdir "&amp;amp;root\&amp;amp;PHASE\PROD\SDTM";
  x mkdir "&amp;amp;root\&amp;amp;PHASE\PROD\RAW";
  x mkdir "&amp;amp;root\&amp;amp;PHASE\QC";

%if %upcase(&amp;amp;QCUSER) ne  %then %do;
  x mkdir "&amp;amp;root\&amp;amp;PHASE\QC\&amp;amp;QCUSER\ADaM\";
  x mkdir "&amp;amp;root\&amp;amp;PHASE\QC\&amp;amp;QCUSER\Programs\";
  x mkdir "&amp;amp;root\&amp;amp;PHASE\QC\&amp;amp;QCUSER\Macros\";
  x mkdir "&amp;amp;root\&amp;amp;PHASE\QC\&amp;amp;QCUSER\Output\";

/*  How to set the folder properties through programming under the system of  MS windows
    1.only the owner can change and update his or her own code, others have no right to do*/
  libname ADaM "&amp;amp;root\&amp;amp;PHASE\QC\&amp;amp;QCUSER\ADaM\";
  libname SDTM "&amp;amp;root\&amp;amp;PHASE\QC\&amp;amp;QCUSER\SDTM\";
  libname RAW "&amp;amp;root\&amp;amp;PHASE\QC\&amp;amp;QCUSER\RAW\";
  libname Output "&amp;amp;root\&amp;amp;PHASE\QC\&amp;amp;QCUSER\Output\";
%end;
options xwait;
%MEND;

%setup;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jan 2021 08:49:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-set-the-folder-properties-through-programming-under-the/m-p/711926#M219383</guid>
      <dc:creator>blueskyxyz</dc:creator>
      <dc:date>2021-01-17T08:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the folder properties through programming under the system of  MS windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-set-the-folder-properties-through-programming-under-the/m-p/711931#M219387</link>
      <description>&lt;P&gt;A quick Google search that there is a utility in Windows (Server) called icacls that does this.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jan 2021 09:49:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-set-the-folder-properties-through-programming-under-the/m-p/711931#M219387</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-01-17T09:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the folder properties through programming under the system of  MS windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-set-the-folder-properties-through-programming-under-the/m-p/711967#M219399</link>
      <description>Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&lt;BR /&gt;the cmd command is a good option, is there any X command in sas code to grant the read and exectute access?&lt;BR /&gt;&lt;BR /&gt;In excel, the user can record the simple VBA macro code when click the icon of record macro, do you know any software can record the cmd command to create batch file quickly?&lt;BR /&gt;</description>
      <pubDate>Sun, 17 Jan 2021 14:27:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-set-the-folder-properties-through-programming-under-the/m-p/711967#M219399</guid>
      <dc:creator>blueskyxyz</dc:creator>
      <dc:date>2021-01-17T14:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the folder properties through programming under the system of  MS windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-set-the-folder-properties-through-programming-under-the/m-p/711980#M219407</link>
      <description>&lt;P&gt;The X statement (and other SAS means) executes a system command (like mkdir).&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;icacls is just another system command, so you execute it the same way.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jan 2021 18:54:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-set-the-folder-properties-through-programming-under-the/m-p/711980#M219407</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-01-17T18:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the folder properties through programming under the system of  MS windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-set-the-folder-properties-through-programming-under-the/m-p/712031#M219434</link>
      <description>@ KurtBremser, appreciate your reply &amp;amp; suggestion, I'll try to optimize my code  &lt;BR /&gt;</description>
      <pubDate>Mon, 18 Jan 2021 07:34:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-set-the-folder-properties-through-programming-under-the/m-p/712031#M219434</guid>
      <dc:creator>blueskyxyz</dc:creator>
      <dc:date>2021-01-18T07:34:17Z</dc:date>
    </item>
  </channel>
</rss>

