<?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 Copying Excel files in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Copying-Excel-files/m-p/723031#M224304</link>
    <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;I would like to copy some excel files from one location to another in SAS. Can't find the best solution out there. Let's say in the source folder, I have 5 files and I want to only copy 3 files to the destination folder. The filenames are random. What is the best solution? I tried Fcopy but didn't work.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rajesh.&lt;/P&gt;</description>
    <pubDate>Tue, 02 Mar 2021 23:41:09 GMT</pubDate>
    <dc:creator>rajredy7172012</dc:creator>
    <dc:date>2021-03-02T23:41:09Z</dc:date>
    <item>
      <title>Copying Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Copying-Excel-files/m-p/723031#M224304</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;I would like to copy some excel files from one location to another in SAS. Can't find the best solution out there. Let's say in the source folder, I have 5 files and I want to only copy 3 files to the destination folder. The filenames are random. What is the best solution? I tried Fcopy but didn't work.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rajesh.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 23:41:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Copying-Excel-files/m-p/723031#M224304</guid>
      <dc:creator>rajredy7172012</dc:creator>
      <dc:date>2021-03-02T23:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Copying Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Copying-Excel-files/m-p/723040#M224308</link>
      <description>&lt;P&gt;What do you mean by FCOPY didn't work? It's the solution that should work regardless of OS&lt;/P&gt;
&lt;P&gt;Please post your code/log.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To do this, you require access to both locations from SAS/SAS Server and you need to know which files.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can select randomly but that's a very unusual requirement, usually it's most recent/latest or specific ones.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other options are Pipe or X commands, do you know if you have XCMD option enabled?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 00:10:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Copying-Excel-files/m-p/723040#M224308</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-03-03T00:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: Copying Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Copying-Excel-files/m-p/723082#M224330</link>
      <description>&lt;P&gt;If xmcd is enabled and no plans exist to migrate your sas-environment to another os, use it.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 06:42:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Copying-Excel-files/m-p/723082#M224330</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-03-03T06:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: Copying Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Copying-Excel-files/m-p/723129#M224347</link>
      <description>&lt;P&gt;Please post the code you used.&lt;/P&gt;
&lt;P&gt;Do you want to &lt;EM&gt;randomly select&lt;/EM&gt; &lt;U&gt;3&lt;/U&gt; files from the &lt;U&gt;5&lt;/U&gt; that are there, or is it just that the number of files present is arbitrary, and you need to select according to a rule?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 12:17:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Copying-Excel-files/m-p/723129#M224347</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-03-03T12:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: Copying Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Copying-Excel-files/m-p/724642#M224983</link>
      <description>&lt;P&gt;/* these IN and OUT filerefs can point to anything */&lt;BR /&gt;filename in 'Y:\Raw_DS\Neratinib\5201_v6\Output\Programmed Listings new url\L1.xlsx';&lt;BR /&gt;filename out 'M:\L1.xlsx';&lt;BR /&gt;&lt;BR /&gt;/* copy the file byte-for-byte */&lt;BR /&gt;data _null_;&lt;BR /&gt;length filein 8 fileid 8;&lt;BR /&gt;filein = fopen('in','I',1,'B');&lt;BR /&gt;fileid = fopen('out','O',1,'B');&lt;BR /&gt;rec = '20'x;&lt;BR /&gt;do while(fread(filein)=0);&lt;BR /&gt;rc = fget(filein,rec,1);&lt;BR /&gt;rc = fput(fileid, rec);&lt;BR /&gt;rc =fwrite(fileid);&lt;BR /&gt;end;&lt;BR /&gt;rc = fclose(filein);&lt;BR /&gt;rc = fclose(fileid);&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;filename in clear;&lt;/P&gt;&lt;P&gt;filename out clear;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 20:37:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Copying-Excel-files/m-p/724642#M224983</guid>
      <dc:creator>rajredy7172012</dc:creator>
      <dc:date>2021-03-08T20:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: Copying Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Copying-Excel-files/m-p/724650#M224987</link>
      <description>What's the purpose of this code? Is this what you tried? I don't see FCOPY being sued anywhere....</description>
      <pubDate>Mon, 08 Mar 2021 20:49:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Copying-Excel-files/m-p/724650#M224987</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-03-08T20:49:26Z</dc:date>
    </item>
  </channel>
</rss>

