<?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 Move / Copy file from one folder to another folder in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/move-copy-file-from-one-folder-to-another-folder/m-p/12704679#M2018624</link>
    <description>&lt;P&gt;I want to copy the file from one folder to another.&lt;/P&gt;
  &lt;P&gt;I am using SAPFTPA.&lt;/P&gt;
  &lt;P&gt;these function modules are used Function module used CALL FUNCTION 'HTTP_SCRAMBLE' , CALL FUNCTION 'FTP_CONNECT',&lt;/P&gt;
  &lt;P&gt; CALL FUNCTION 'FTP_COMMAND' , CALL FUNCTION 'FTP_SERVER_TO_R3'&lt;/P&gt;
  &lt;P&gt; . The path D:\Sales\Macine\Product\fail_log contains file test.csv&lt;/P&gt;
  &lt;P&gt;and i want to move test.csv file to another path D:\Sales\Macine\Product\fail_log_n&lt;/P&gt;
  &lt;P&gt;can any one guide me.....&lt;/P&gt;</description>
    <pubDate>Mon, 16 Jan 2023 07:23:46 GMT</pubDate>
    <dc:creator>former_member329386</dc:creator>
    <dc:date>2023-01-16T07:23:46Z</dc:date>
    <item>
      <title>Move / Copy file from one folder to another folder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/move-copy-file-from-one-folder-to-another-folder/m-p/12704679#M2018624</link>
      <description>&lt;P&gt;I want to copy the file from one folder to another.&lt;/P&gt;
  &lt;P&gt;I am using SAPFTPA.&lt;/P&gt;
  &lt;P&gt;these function modules are used Function module used CALL FUNCTION 'HTTP_SCRAMBLE' , CALL FUNCTION 'FTP_CONNECT',&lt;/P&gt;
  &lt;P&gt; CALL FUNCTION 'FTP_COMMAND' , CALL FUNCTION 'FTP_SERVER_TO_R3'&lt;/P&gt;
  &lt;P&gt; . The path D:\Sales\Macine\Product\fail_log contains file test.csv&lt;/P&gt;
  &lt;P&gt;and i want to move test.csv file to another path D:\Sales\Macine\Product\fail_log_n&lt;/P&gt;
  &lt;P&gt;can any one guide me.....&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 07:23:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/move-copy-file-from-one-folder-to-another-folder/m-p/12704679#M2018624</guid>
      <dc:creator>former_member329386</dc:creator>
      <dc:date>2023-01-16T07:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Move / Copy file from one folder to another folder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/move-copy-file-from-one-folder-to-another-folder/m-p/12704680#M2018625</link>
      <description>&lt;P&gt;The file is in presentation server or Application server ? Why do you used FTP command for non FTP protocol ? &lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 07:26:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/move-copy-file-from-one-folder-to-another-folder/m-p/12704680#M2018625</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2023-01-16T07:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Move / Copy file from one folder to another folder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/move-copy-file-from-one-folder-to-another-folder/m-p/12704681#M2018626</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;frdric.girod&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;We have third party integration process about sales data. the third party  is send files on ftp server (with ip ).&lt;/P&gt;&lt;P&gt;Our program picking the files from that path , reading it and then deleting files .&lt;/P&gt;&lt;P&gt;But before deleting these file we want the copy of this file on another folder for backup purpose,&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 07:48:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/move-copy-file-from-one-folder-to-another-folder/m-p/12704681#M2018626</guid>
      <dc:creator>former_member329386</dc:creator>
      <dc:date>2023-01-16T07:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Move / Copy file from one folder to another folder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/move-copy-file-from-one-folder-to-another-folder/m-p/12704682#M2018627</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Can you try this ARCHIVFILE_SERVER_TO_SERVER function?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 08:05:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/move-copy-file-from-one-folder-to-another-folder/m-p/12704682#M2018627</guid>
      <dc:creator>abityildiz</dc:creator>
      <dc:date>2023-01-16T08:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Move / Copy file from one folder to another folder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/move-copy-file-from-one-folder-to-another-folder/m-p/12704683#M2018628</link>
      <description>&lt;P&gt;You can use the FTP command "rename" (via function module FTP_COMMAND), which also works for moving.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'FTP_COMMAND'
       EXPORTING
         handle        = ftp_handle
         command       =
'rename D:\Sales\Macine\Product\fail_log\test.csv D:\Sales\Macine\Product\fail_log_n\test.csv'
       TABLES
         data          = result
       EXCEPTIONS
         command_error = 1 
         tcpip_error   = 2.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;NB: don't forget to wrap it will all classic calls to HTTP_SCRAMBLE, FTP_CONNECT and FTP_DISCONNECT of course. &lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 08:29:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/move-copy-file-from-one-folder-to-another-folder/m-p/12704683#M2018628</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-01-16T08:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Move / Copy file from one folder to another folder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/move-copy-file-from-one-folder-to-another-folder/m-p/12704684#M2018629</link>
      <description>&lt;P&gt;There is one issue that i missed in my first query ....The third party software placing the file after one hour scheduling and file is placing with naming&lt;/P&gt;&lt;P&gt;D:\Sales\Macine\Product\fail_log\test_16.01.2023_15.30.22.&lt;/P&gt;&lt;P&gt;D:\Sales\Macine\Product\fail_log\test_16.01.2023_16.30.22. and so on ...&lt;/P&gt;&lt;P&gt;I have to pick all the files . so i cannot use rename D:\Sales\Macine\Product\fail_log\test.csv D:\Sales\Macine\Product\fail_log_n\test.csv'   so cannot fix the file name.&lt;/P&gt;&lt;P&gt;Before reading the files from folder i have to keep the backup of all files from this folder.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 11:29:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/move-copy-file-from-one-folder-to-another-folder/m-p/12704684#M2018629</guid>
      <dc:creator>former_member329386</dc:creator>
      <dc:date>2023-01-16T11:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: Move / Copy file from one folder to another folder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/move-copy-file-from-one-folder-to-another-folder/m-p/12704685#M2018630</link>
      <description>&lt;P&gt;So, I answered your question and future visitors will find the answer how to move a file (in FTP).&lt;/P&gt;&lt;P&gt;But you have other questions, not sure, please clarify:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;How to copy from server to server? (you probably know how to read and write files from your ABAP program to internal table, so I guess you need server to server) There is no specific FTP command, but maybe you could use directly an Operating System command like command = '!cp frompath topath'&lt;/LI&gt;&lt;LI&gt;How to get the list of file names in one folder? command = 'dir folder' (for instance)&lt;/LI&gt;&lt;LI&gt;How to move all the files in bulk? You can't, you can do it file by file (or command = 'del targetfolder', then 'rename sourcefolder targetfolder',  then 'mkdir sourcefolder', but you would experience authorization issues probably)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;NB: in command, you can indicate a variable for the command parameter, so you can indicate any file name you want at runtime.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 11:56:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/move-copy-file-from-one-folder-to-another-folder/m-p/12704685#M2018630</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-01-16T11:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: Move / Copy file from one folder to another folder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/move-copy-file-from-one-folder-to-another-folder/m-p/13897883#M2031382</link>
      <description>&lt;P&gt;CALL FUNCTION 'FTP_COMMAND'&lt;BR /&gt;EXPORTING&lt;BR /&gt;handle = lv_ftp_handle&lt;BR /&gt;command = 'RNFR D:\Sales\Macine\Product\fail_log\test.csv'&lt;BR /&gt;IMPORTING&lt;BR /&gt;reply = lv_reply.CALL FUNCTION 'FTP_COMMAND'&lt;BR /&gt;EXPORTING&lt;BR /&gt;handle = lv_ftp_handle&lt;BR /&gt;command = 'RNTO D:\Sales\Macine\Product\fail_log_n\test.csv'&lt;BR /&gt;IMPORTING&lt;BR /&gt;reply = lv_reply.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also have a similar requirement. the thing is this is rename right. my lead says we dont have the authorization to rename. we need&amp;nbsp;to transfer files among two folders within same ftp, server&amp;nbsp; read and copy to another program. Is there any way.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 09:45:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/move-copy-file-from-one-folder-to-another-folder/m-p/13897883#M2031382</guid>
      <dc:creator>Kbs1</dc:creator>
      <dc:date>2024-10-14T09:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: Move / Copy file from one folder to another folder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/move-copy-file-from-one-folder-to-another-folder/m-p/13898023#M2031384</link>
      <description>&lt;P&gt;Please post a new question &lt;A href="https://community.sap.com/t5/technology-q-a/qa-p/technology-questions" target="_self"&gt;here&lt;/A&gt; and see also the &lt;A href="https://en.wikipedia.org/wiki/List_of_FTP_commands" target="_blank"&gt;List of FTP commands - Wikipedia&lt;/A&gt;&amp;nbsp;(mainly RFC 959).&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 10:57:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/move-copy-file-from-one-folder-to-another-folder/m-p/13898023#M2031384</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2024-10-14T10:57:16Z</dc:date>
    </item>
  </channel>
</rss>

