<?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: Copy the file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Copy-the-file/m-p/977996#M378544</link>
    <description>&lt;P&gt;Whenever you need to run an external command, use the PIPE method:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename xcom pipe "copy C:\Users\XX\Desktop\Document\Lettre.pdf C:\Users\XX\Desktop\Documents_2024\Lettre.pdf 2&amp;gt;&amp;amp;1";

data _null_;
infile xcom;
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This way, all messages returned from the command end up in the SAS log for inspection.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Oct 2025 13:53:54 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2025-10-28T13:53:54Z</dc:date>
    <item>
      <title>Copy the file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Copy-the-file/m-p/977981#M378539</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to copy the files (SAS EG 8.3) :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	option noxwait;
        x 'cp C:\Users\XX\Desktop\Document\Lettre.pdf,
            C:\Users\XX\Desktop\Documents_2024\Lettre.pdf');
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But the file is not copied and I don't have an error message.&lt;/P&gt;
&lt;P&gt;Thank you for your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2025 10:59:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Copy-the-file/m-p/977981#M378539</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2025-10-28T10:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: Copy the file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Copy-the-file/m-p/977984#M378540</link>
      <description>&lt;P&gt;Things to check/do:&lt;/P&gt;
&lt;P&gt;- Is sas running local or on a server? If it is running on a server, you can't copy local files.&lt;/P&gt;
&lt;P&gt;- Is xcmd enabled?&lt;/P&gt;
&lt;P&gt;- Change noxwait to xwait.&lt;/P&gt;
&lt;P&gt;- Post the log.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2025 11:48:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Copy-the-file/m-p/977984#M378540</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2025-10-28T11:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Copy the file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Copy-the-file/m-p/977986#M378541</link>
      <description>&lt;P&gt;Also, the name of the DOS command is &lt;STRONG&gt;copy&lt;/STRONG&gt;, not &lt;STRONG&gt;cp&lt;/STRONG&gt;. (And better remove the unbalanced parenthesis at the end. The comma is redundant.)&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2025 12:31:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Copy-the-file/m-p/977986#M378541</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2025-10-28T12:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: Copy the file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Copy-the-file/m-p/977996#M378544</link>
      <description>&lt;P&gt;Whenever you need to run an external command, use the PIPE method:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename xcom pipe "copy C:\Users\XX\Desktop\Document\Lettre.pdf C:\Users\XX\Desktop\Documents_2024\Lettre.pdf 2&amp;gt;&amp;amp;1";

data _null_;
infile xcom;
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This way, all messages returned from the command end up in the SAS log for inspection.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2025 13:53:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Copy-the-file/m-p/977996#M378544</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2025-10-28T13:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: Copy the file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Copy-the-file/m-p/978025#M378549</link>
      <description>&lt;P&gt;Finally I used this function :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename src "\\XXX \&amp;amp;PDF." recfm=n;
		filename dst "\\XXX \&amp;amp;PDF." recfm=n;
		%let rc = %sysfunc(FCOPY(src,dst));
		%put %sysfunc(SYSMSG());
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Oct 2025 16:06:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Copy-the-file/m-p/978025#M378549</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2025-10-28T16:06:30Z</dc:date>
    </item>
  </channel>
</rss>

