<?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: %sysexec UNC filepath in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sysexec-UNC-filepath/m-p/350985#M81656</link>
    <description>&lt;P&gt;I found the solution I needed to use:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;options NOXWAIT;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Apr 2017 19:02:31 GMT</pubDate>
    <dc:creator>michelconn</dc:creator>
    <dc:date>2017-04-18T19:02:31Z</dc:date>
    <item>
      <title>%sysexec UNC filepath</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sysexec-UNC-filepath/m-p/350974#M81654</link>
      <description>&lt;P&gt;I am attempting to copy files over to a different folder and am using the sysexec fuction. The issue that I am running into is my file paths is UNC so SAS keeps opening the CMD window and I have to manually exit for each file. Since there are 3500 files to transfer this isn't really a good option. Any suggestions to get SAS to exit for me? I could transfer the files over to my C: drive but I would put that as the last option.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let source=\\global\kcshares\Projects\110933\Police Reports\All Reports;
%let target=\\global\kcshares\Projects\110933\Police Reports\Curve Reports;

proc sql noprint;
	select report
	into :report separated by ' '
	from crashes;
quit;
%put &amp;amp;report;
%macro report;
%do i=1 %to 5; *%sysfunc(countw(&amp;amp;report," "));
	%let report_no=%scan(&amp;amp;report,&amp;amp;i," ");
		%sysexec copy "&amp;amp;source.\&amp;amp;report_no..pdf" "&amp;amp;target.\&amp;amp;report_no..pdf"; 
%end;
%mend;
%report;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8372i7E8E2720DF90AAB4/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Untitled.png" title="Untitled.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 18:44:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sysexec-UNC-filepath/m-p/350974#M81654</guid>
      <dc:creator>michelconn</dc:creator>
      <dc:date>2017-04-18T18:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: %sysexec UNC filepath</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sysexec-UNC-filepath/m-p/350985#M81656</link>
      <description>&lt;P&gt;I found the solution I needed to use:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;options NOXWAIT;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 19:02:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sysexec-UNC-filepath/m-p/350985#M81656</guid>
      <dc:creator>michelconn</dc:creator>
      <dc:date>2017-04-18T19:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: %sysexec UNC filepath</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sysexec-UNC-filepath/m-p/351044#M81680</link>
      <description>&lt;P&gt;If you were copying all of the files with common name you can use wildcards such as&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="token procnames"&gt;copy&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;"&amp;amp;source.\rep*.pdf" would copy all files that start with the letters 'rep'. Or if you needed all of the PDF files then *.pdf&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="token string"&gt;So you may not have needed to copy them one by one.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 20:36:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sysexec-UNC-filepath/m-p/351044#M81680</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-04-18T20:36:19Z</dc:date>
    </item>
  </channel>
</rss>

