<?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: File Movement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/File-Movement/m-p/947797#M370969</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
rc=rename('c:\temp\want.sas','c:\temp\a\want.sas','file');
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 17 Oct 2024 02:12:59 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2024-10-17T02:12:59Z</dc:date>
    <item>
      <title>File Movement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/File-Movement/m-p/947656#M370928</link>
      <description>&lt;P&gt;i need the sas code to move a file from a folder to another.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 11:06:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/File-Movement/m-p/947656#M370928</guid>
      <dc:creator>aashi77</dc:creator>
      <dc:date>2024-10-16T11:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: File Movement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/File-Movement/m-p/947657#M370929</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename in "&amp;lt;/path/for/input/file.ext&amp;gt;" lrecl=1 recfm=n;
filename out "&amp;lt;/path/for/output/file.ext&amp;gt;" lrecl=1 recfm=n;

data _null_;
  rc = fcopy("in","out");
  rctxt=sysmsg();
  if rc then
    put rctxt;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Oct 2024 11:11:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/File-Movement/m-p/947657#M370929</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2024-10-16T11:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: File Movement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/File-Movement/m-p/947797#M370969</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
rc=rename('c:\temp\want.sas','c:\temp\a\want.sas','file');
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Oct 2024 02:12:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/File-Movement/m-p/947797#M370969</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-10-17T02:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: File Movement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/File-Movement/m-p/948321#M371083</link>
      <description>&lt;P&gt;not working&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 04:37:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/File-Movement/m-p/948321#M371083</guid>
      <dc:creator>aashi77</dc:creator>
      <dc:date>2024-10-21T04:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: File Movement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/File-Movement/m-p/948325#M371085</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="picard-meme-facepalm.jpg" style="width: 200px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/90852i628C0ACA81F12AD7/image-size/small?v=v2&amp;amp;px=200" role="button" title="picard-meme-facepalm.jpg" alt="picard-meme-facepalm.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;"not working" on its own is a completely useless message. Describe in detail what does not work to your expectation, post the complete log of the failing step in a window opened with this button:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54552i914D97BE1B0F21E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 06:01:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/File-Movement/m-p/948325#M371085</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-10-21T06:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: File Movement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/File-Movement/m-p/948326#M371086</link>
      <description>?? I tested it  before,no problem.&lt;BR /&gt;Is your OS Linux/Unix ,not Windows?&lt;BR /&gt;if it is Linux you need change your path from \ into /&lt;BR /&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt;rc=rename('/usr/tmp/want.sas','/root/sas/want.sas','file');&lt;BR /&gt;run;</description>
      <pubDate>Mon, 21 Oct 2024 06:03:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/File-Movement/m-p/948326#M371086</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-10-21T06:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: File Movement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/File-Movement/m-p/948329#M371087</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aashi77_0-1729491867231.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/101597i03B868C105B83614/image-size/medium?v=v2&amp;amp;px=400" role="button" title="aashi77_0-1729491867231.png" alt="aashi77_0-1729491867231.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I am not obtaining any error, but the file is still in the same location.&lt;BR /&gt;The OS is windows.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 06:26:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/File-Movement/m-p/948329#M371087</guid>
      <dc:creator>aashi77</dc:creator>
      <dc:date>2024-10-21T06:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: File Movement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/File-Movement/m-p/948330#M371088</link>
      <description>1)You must use absolute path(d:\saspret\fit\fit1\corm.csv  ) not relative path (\saspret\fit\fit1\corm.csv) .&lt;BR /&gt;&lt;BR /&gt;2)you can not use general mathed character(star) with filename like 'cram*.csv' , you need to specify it with total filename 'cram_1.csv'   or 'cram_2.csv'.</description>
      <pubDate>Mon, 21 Oct 2024 06:32:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/File-Movement/m-p/948330#M371088</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-10-21T06:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: File Movement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/File-Movement/m-p/948335#M371090</link>
      <description>&lt;P&gt;The RENAME function handles&amp;nbsp;&lt;EM&gt;one&lt;/EM&gt; file at a time. To move multiple files, do not use wildcard characters. Use a DATA step with DOPEN, DNUM and DREAD to obtain filenames, and use RENAME for each item you find.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use absolute path names; in Windows, this means they must start with a drive letter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Post code as text in a code box ("little running man"), so we can use it in examples; do not post pictures.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 07:56:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/File-Movement/m-p/948335#M371090</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-10-21T07:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: File Movement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/File-Movement/m-p/948340#M371092</link>
      <description>&lt;P&gt;To what&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;have already wrote, if you want to see more information about "why it didn't work?", use the following trick:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  rc = rename(...);
  rctxt=sysmsg();
  if rc then
    put rctxt;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;As a side note, if you need to get the files list but do not feel confident with the "DOPEN()"-family of functions ,&amp;nbsp; you can use the &lt;A href="https://github.com/SASPAC/baseplus" target="_self"&gt;BasePlus SAS package&lt;/A&gt; and the &lt;A href="https://github.com/SASPAC/baseplus/blob/main/baseplus.md#dirsandfiles-macro-6" target="_self"&gt;%dirsAndFiles() macro&lt;/A&gt; to do the "give-me-the-list-of-files" job for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 09:00:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/File-Movement/m-p/948340#M371092</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2024-10-21T09:00:42Z</dc:date>
    </item>
  </channel>
</rss>

