Skip to Content
avatar image
Former Member

moving files from one server to another

Hello,

I need to move about 12 files (filename_YYYYMMDD.txt) on a daily basis from one server to another without any conversion, just copying files from server A to server B.

I know this is more easily done by FTP but for knowledge purposes, I am asking this question.

Regards,

Sanjay

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Apr 01, 2006 at 09:00 AM

    Hi,

    The best option is write the shell script and transfer the file.

    If you want to use the XI then develop the file to file scenario and pick up the file as it is and without any content conversion transfer the file to the destination.

    For file to file scenario, refer to this weblog.

    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1 - File to File Part 1

    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2 - File to File Part 2

    For the same file name as source refer to following weblog.

    Till SP14,

    /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i

    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii

    After SP14, you can use following.

    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14

    Thanks,

    Prateek

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 01, 2006 at 01:36 PM

    hi Sanjay,

    just as prateek told, of you wanna use XI, then you will have to create the File to FIle scenario.

    In your file adapter, just give your filename as name_.

    If your file is oot going to be of XML format, then Content Conversion will have to be perfromed on both the sender and the receiver file adapter.

    regards,

    bhavesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 02, 2006 at 05:36 AM

    Hi,

    You need to develop a file to file scenario.

    You need to configure a sender and receiver file adapter.

    In the sender file adapter, enter the source file name as *.txt.

    You also need to specify the parameters for content conversion, since you are going to send a txt file.

    On the receiver file adapter, specify the target file location, and also specify the content conversion parameters.

    Regards,

    Smitha.

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 02, 2006 at 06:24 AM

    Hi Sanjay,

    You can use a file adapter for this purpose. The File/FTP adapter enables you to exchange data with the Integration Server by means of a file interface or an FTP server, and the file content coming from the Integration Server can be put unaltered into a file or converted from XML into CSV(Comma seperated values) format. To implement this you would require to configure the sender and receiver file adapter, in the sender file adapter you have the option of specifying the poll interval, which is the time interval at which the availability of the file is checked. Since you want to move filename.txt files, you can use wild card characters i.e, *.txt, so that all the files with extension .txt would be picked and put into the destination specified. Also in the sender adapter you have the option to set the processing mode to delete which implies that once the file is picked up, it would be deleted from the source.

    Configuring the sender file adapter: http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/frameset.htm

    Configuring the receiver file adapter:

    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm

    Regards,

    Chandra

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 02, 2006 at 10:24 PM

    Hi Sanjay,

    If you are planning to use XI, then it is nothing but File->XI->File Scenario.

    If you want to use secured communication between both the servers, you can go with File Adapter with SSL options.

    http://help.sap.com/saphelp_nw2004s/helpdata/en/ae/d03341771b4c0de10000000a1550b0/frameset.htm

    Otherwise best idea is writing a shell script with Secured FTP(SFTP or FTPS) concept and schedule the same on daily basis. You can schedule this as a OS job, or even you can trigger the Shell Script from XI with dummy interface. In this case evryday you need to run one dummy interface, it will trigger the shell script.

    There are two ways to achieve this-

    1) Executing OS commands from the File Adapter-

    /people/sameer.shadab/blog/2005/09/21/executing-unix-shell-script-using-operating-system-command-in-xi

    /people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching

    2) Writing a user defined code to call shell script

    Hope this helps..

    Regards,

    Moorthy

    Add comment
    10|10000 characters needed characters exceeded