<?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>Question Re: Renaming multiple files on FTP server in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/renaming-multiple-files-on-ftp-server/qaa-p/4357981#M1679947</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't rename multiple files&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Jun 2009 09:14:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-19T09:14:34Z</dc:date>
    <item>
      <title>Renaming multiple files on FTP server</title>
      <link>https://community.sap.com/t5/technology-q-a/renaming-multiple-files-on-ftp-server/qaq-p/4357976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having SFTP server from which I am supposed to poll files. I have writtten a shell script to get the files from the SFTP location and had this OS level command called from XI adapter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the shell script first gets the file from SFTP server (since XI at present doesn't support SFTP) and then adapter will poll the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is once i am done with my SFTP get i should be able to rename the files. But it seems rename can only rename one file at a time and can't rename multiple files at a time. i tried to use wild card characters but its of no use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;had anyone done renaming multiple files at a time on the FTP server? i was trying to use ls to get hte list of files and then loop on it but don't know how to do the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rajeev&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Aug 2008 19:14:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/renaming-multiple-files-on-ftp-server/qaq-p/4357976</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-25T19:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming multiple files on FTP server</title>
      <link>https://community.sap.com/t5/technology-q-a/renaming-multiple-files-on-ftp-server/qaa-p/4357977#M1679943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajeev !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe an idea could be within a script, launch an ls to gather the list of filenames in a file using "&amp;gt;" or "&amp;gt;&amp;gt;". Then process that file using loops and parse it to detect the filenames and create a new ftp script on the fly that makes the "rename $1 $2" for each file of the previously populated list, like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://antonolsen.com/2005/03/23/read-a-file-with-bash/" target="test_blank"&gt;http://antonolsen.com/2005/03/23/read-a-file-with-bash/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI level="1" type="ol"&gt;&lt;P&gt;cat file.lst |while read line; do echo "rename $&lt;SPAN __jive_macro_name="line"&gt; $&lt;/SPAN&gt;.old" &amp;gt;&amp;gt; new_ftp_script.sh; done&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;/tmp/file1.txt&lt;/P&gt;&lt;P&gt;/tmp/file with space.txt&lt;/P&gt;&lt;P&gt;#&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then execute that script that will login again to the ftp, and send the proper rename commands.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matias.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 11:24:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/renaming-multiple-files-on-ftp-server/qaa-p/4357977#M1679943</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-27T11:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming multiple files on FTP server</title>
      <link>https://community.sap.com/t5/technology-q-a/renaming-multiple-files-on-ftp-server/qaa-p/4357978#M1679944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matias,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;actually as stated earlier i want to execute the command under sftp&amp;gt; and not on Unix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried doing in SFTP by using ! and then Unix command but it gave the list of files in my FTP server and not the list on the SFTP server. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rajeev&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 20:14:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/renaming-multiple-files-on-ftp-server/qaa-p/4357978#M1679944</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-27T20:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming multiple files on FTP server</title>
      <link>https://community.sap.com/t5/technology-q-a/renaming-multiple-files-on-ftp-server/qaa-p/4357979#M1679945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;check this blog ,https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/7036s &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks, &lt;/P&gt;&lt;P&gt;Hemant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 20:58:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/renaming-multiple-files-on-ftp-server/qaa-p/4357979#M1679945</guid>
      <dc:creator>hemant_chahal</dc:creator>
      <dc:date>2008-08-27T20:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming multiple files on FTP server</title>
      <link>https://community.sap.com/t5/technology-q-a/renaming-multiple-files-on-ftp-server/qaa-p/4357980#M1679946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hemant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That blog is really about SFTP and FTPS comparison and overall mechanism which we already know. My question is more specific about how to implement the same in the shell file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rajeev Patkie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2008 21:00:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/renaming-multiple-files-on-ftp-server/qaa-p/4357980#M1679946</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-28T21:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming multiple files on FTP server</title>
      <link>https://community.sap.com/t5/technology-q-a/renaming-multiple-files-on-ftp-server/qaa-p/4357981#M1679947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't rename multiple files&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2009 09:14:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/renaming-multiple-files-on-ftp-server/qaa-p/4357981#M1679947</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-19T09:14:34Z</dc:date>
    </item>
  </channel>
</rss>

