<?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: Move multiple files from One folder to Another using SAS EG in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Move-multiple-files-from-One-folder-to-Another-using-SAS-EG/m-p/532837#M32974</link>
    <description>&lt;P&gt;Thanks all!!&lt;/P&gt;&lt;P&gt;Much appreciated Solutions &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Feb 2019 04:44:02 GMT</pubDate>
    <dc:creator>Abinaya</dc:creator>
    <dc:date>2019-02-05T04:44:02Z</dc:date>
    <item>
      <title>Move multiple files from One folder to Another using SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Move-multiple-files-from-One-folder-to-Another-using-SAS-EG/m-p/532495#M32965</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have requirement to create Archive of Older Files and the Current folder has SAS/log/lst/rtf/pdf/png files created with Datetime Stamp.&lt;/P&gt;&lt;P&gt;Now,I need to move all the files from the current folder to the Archive and just retain only the recent TimeStamped Set of files in Current.&lt;/P&gt;&lt;P&gt;I am planning to route all SAS Created Files to Current folder and in the same code writing the below Piece of Macro to move the previously created files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; &lt;STRONG&gt;&lt;I&gt;test&lt;/I&gt;&lt;/STRONG&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%sysexec&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%str&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;(mkdir &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;/Archive;mv &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;/Current&lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* ./Archive);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;%mend test;&lt;/P&gt;&lt;P&gt;%test;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;problem Area:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;But after "/*" ,SAS Code is getting commented..&lt;/P&gt;&lt;P&gt;So,I am not able to select all the files from the Current Folder.&lt;/P&gt;&lt;P&gt;Can you please help me out to fix this approach?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abi&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 05:06:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Move-multiple-files-from-One-folder-to-Another-using-SAS-EG/m-p/532495#M32965</guid>
      <dc:creator>Abinaya</dc:creator>
      <dc:date>2019-02-04T05:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: Move multiple files from One folder to Another using SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Move-multiple-files-from-One-folder-to-Another-using-SAS-EG/m-p/532496#M32966</link>
      <description>Instead of %STR() try using quotation marks which will mask the asterisk (*) which is causing the issue. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 04 Feb 2019 05:14:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Move-multiple-files-from-One-folder-to-Another-using-SAS-EG/m-p/532496#M32966</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-02-04T05:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: Move multiple files from One folder to Another using SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Move-multiple-files-from-One-folder-to-Another-using-SAS-EG/m-p/532498#M32967</link>
      <description>&lt;P&gt;That's Great!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks much Reeza..I can copy individual file..&lt;/P&gt;&lt;P&gt;But I am not able to copy all the files using below macro..Can you please help??&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; path=/sdsbai/common/SAS_new/Final_Testing;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; &lt;STRONG&gt;&lt;I&gt;test&lt;/I&gt;&lt;/STRONG&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%sysexec&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="2"&gt;"mv &amp;amp;path/Test_case1/* &amp;amp;path/Archive"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; test;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;%&lt;STRONG&gt;&lt;I&gt;test&lt;/I&gt;&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Abi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 05:26:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Move-multiple-files-from-One-folder-to-Another-using-SAS-EG/m-p/532498#M32967</guid>
      <dc:creator>Abinaya</dc:creator>
      <dc:date>2019-02-04T05:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: Move multiple files from One folder to Another using SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Move-multiple-files-from-One-folder-to-Another-using-SAS-EG/m-p/532499#M32968</link>
      <description>mv is a system command that moves files from one directory to another, guessing Unix/Linux. %SYSEXEC passes the command to the operating system to execute. &lt;BR /&gt;&lt;BR /&gt;So you need to find the correct unix command, but that's not a question I can answer - I google unix commands every time I need them :).</description>
      <pubDate>Mon, 04 Feb 2019 05:30:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Move-multiple-files-from-One-folder-to-Another-using-SAS-EG/m-p/532499#M32968</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-02-04T05:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Move multiple files from One folder to Another using SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Move-multiple-files-from-One-folder-to-Another-using-SAS-EG/m-p/532526#M32970</link>
      <description>&lt;P&gt;Use the filename pipe method, and put the command in quotes:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename oscmd "mkdir ./Archive;mv ./Current/* ./Archive 2&amp;gt;&amp;amp;1";

data _null_;
infile oscmd;
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You won't have a problem with seeming SAS syntax (eg comments) inside the command string, and all responses from the system will end up in the SAS log.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 10:11:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Move-multiple-files-from-One-folder-to-Another-using-SAS-EG/m-p/532526#M32970</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-02-04T10:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Move multiple files from One folder to Another using SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Move-multiple-files-from-One-folder-to-Another-using-SAS-EG/m-p/532837#M32974</link>
      <description>&lt;P&gt;Thanks all!!&lt;/P&gt;&lt;P&gt;Much appreciated Solutions &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Feb 2019 04:44:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Move-multiple-files-from-One-folder-to-Another-using-SAS-EG/m-p/532837#M32974</guid>
      <dc:creator>Abinaya</dc:creator>
      <dc:date>2019-02-05T04:44:02Z</dc:date>
    </item>
  </channel>
</rss>

