Rename and move files on remote FTP server

Hello,
We have a scenario where XI transfers a file to a remote FTP server at partner end using File Receiver Communication channel.
These files are huge,so there is a risk of picking up incomplete files at their end when XI is still writing the file on their server.
Hence,we have decided to follow the approach which is already mentioned a number of times on SDN that XI would place a file with different name and in a different folder on partner's FTP server.
This would then be renamed and moved to the required folder on the same server.
This could easily be managed using a script at partner end but there are some problems when they are not able to do this.
Is there a possibility to achieve this using 'Run OS command after Message Processing' in XI when Source and target folders both are on partner's FTP server?
If yes,can anybody please provide code for such a script and corresponding setting for this parameter in XI Communication channel?
Thanks a lot in advance.
Best Regards,
Shweta

Hello,
Thanks for the reply.
But this has to be done in FTP session because the source and target directory both are on remote FTP server.
Instead,in SAP documentation,I found a parameter :
ftp.putSafe=YES|NO
Use this specification to define whether a transferred file is first created with a temporary name and only renamed once the transfer is complete (YES), or whether it is created with its final name at the start of the transfer (NO). The latter case can lead to problems if an application on the FTP server accesses the file before the transfer is complete. If you specify YES, this problem is avoided because the file only becomes visible with the search name when the transfer is complete.
The default value is NO.
Doesn't it serve the same purpose?Do we still need to write scripts?
I have tried to include this in Additional Parameters in Advanced Mode as:
ftp.putSafe  YES
but I can't check in test system whether it is really working or not.I would like to confirm if it helps.
First of all,I would like to know if this setting works for XI3.0 SP17.
Can anyone please help.
Thanks.
Regards,
Shweta

Similar Messages

  • Regarding receiver FILE adapter,  REMOTE FTP server

    Hi All,
    The scenario was to get XML file from a local FTP server and to place that XML file in REMOTE FTP server, which we dont have any control over that REMOTE FTP,
    While executing the scenario it is successfully picked the file and processed and it was success in SXMB_MONI, but when we see the Communication Chaneel of the receiver adapter it is generating the following error..
    Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: ConnectException: Connection timed out: connect
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: ConnectException: Connection timed out: connect
    clarifications needed ASAP
    regards,
    Kishore.

    Hi,
    Verify the Host details of the Remote FTP.
    Try to ping the Remote host as below
    Goto > start>Run --->type cmd and give the command as below
    c:\>ping <host details or IP address> press enter and see if you get the successful communication response.
    If its not it indicates that the connection is not setup.
    Ask you FTP administrators to look into connectivity issue for it.
    Thanks
    Swarup

  • Using foreach loop container with file system task to rename and move files

    the foreach loop container will not rename and move files for me
    sukai

    duplicate of
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/8f2899f1-43b0-47e0-8bd0-e082989cdcb8/file-system-task-and-foreach-loop-container?forum=sqlintegrationservices
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Sender File Adapter - remote FTP server program execution

    Hi all,
    I have a scenario
    X12 -> XI -> File
    where sender File adapter is used. The input file is X12 txt document which needs to be converted into X12 xml format. I have created astylus studio XSLT mapping which uses Convertor to convert this txt file to X12 XML.
    I don't know how to configure sender file adpater to run this mapping on the source file before picking it up. have created a windows batch file on the FTP server which runs tis XSLT mapping on the txt file and replaces it with X12 format xml. This batch file uses command line parameters of stylus studio to run XSLT mapping on input txt file and generates an xml.
    I am not sure how to run this mapping on the input file before processing starts in PI file adapater.
    I tried running command line parameters of Sender file adapter but that didn't worked.
    Please help.
    Thanks
    -Kulwant

    Hi, Kulwant:
    Looks like you would like to execute your mapping program before file adapter pick it up.
    Right ? for one interface, it seems out of the XI scope, however if this is your requirement, you can separate into two interfaces:
    The first interface is file to file scenario, it is used to execute your mapping program:
    The file sender just pick up the txt file, send to integration engine.
    Your Message Mapping program need to specify your XSLT mapping, after the mapping, the message is XML format,
    then you will use file receiver to send it to certain directory.
    Now the XML format file is your input of your second interface.
    Regards.
    Liang

  • Droplet to Rename and Move files into Folders

    Hello,
    I am a Graphic Designer and I am trying to optomize my workflow. I would like to be able to save out files with different prefixes in a folder then run a droplet on the folder that will create sub-folders and move the files to their respective folders based on their prefix. I would also like to remove the prefix from the filename after it is moved.
    Here is an example of what I am trying to achieve:
    So far I am able to Create the folders, and move the files, but I am stuck on removing the prefixes from the filename.
    property aFolder : "a"
    property bFolder : "b"
    property cFolder : "c"
    property dFolder : "d"
    property eFolder : "e"
    try
              tell application "Finder" to set theLocation to the selection as alias
              tell application "Finder" to set thePath to the selection as text
    on error
              tell application "Finder" to set theLocation to (folder of the front window as alias)
    end try
    tell application "Finder"
              if not (exists folder aFolder of theLocation) then
      make new folder at theLocation with properties {name:aFolder}
              end if
              if not (exists folder bFolder of theLocation) then
      make new folder at theLocation with properties {name:bFolder}
              end if
              if not (exists folder cFolder of theLocation) then
      make new folder at theLocation with properties {name:cFolder}
              end if
              if not (exists folder dFolder of theLocation) then
      make new folder at theLocation with properties {name:dFolder}
              end if
              if not (exists folder eFolder of theLocation) then
      make new folder at theLocation with properties {name:eFolder}
              end if
    end tell
    tell application "Finder"
              set this_list to every file of theLocation
              repeat with i in this_list
                        if (name of i) begins with "a" then
                                  move i to thePath & "a:"
                        else if (name of i) begins with "b" then
                                  move i to thePath & "b:"
                        else if (name of i) begins with "c" then
                                  move i to thePath & "c:"
                        else if (name of i) begins with "d" then
                                  move i to thePath & "d:"
                        else if (name of i) begins with "e" then
                                  move i to thePath & "e:"
                        end if
              end repeat
    end tell

    Here:
    property aFolder : "a"
    property bFolder : "b"
    property cFolder : "c"
    property dFolder : "d"
    property eFolder : "e"
    tell application "Finder"
    try
    set theLocation to the selection as alias
    on error
    set theLocation to (folder of the front window as alias)
    end try
    if not (exists folder aFolder of theLocation) then make new folder at theLocation with properties {name:aFolder}
    if not (exists folder bFolder of theLocation) then make new folder at theLocation with properties {name:bFolder}
    if not (exists folder cFolder of theLocation) then make new folder at theLocation with properties {name:cFolder}
    if not (exists folder dFolder of theLocation) then make new folder at theLocation with properties {name:dFolder} 
    if not (exists folder eFolder of theLocation) then make new folder at theLocation with properties {name:eFolder}
    set this_list to every file of theLocation
    repeat with i in this_list
    if (name of i) begins with "a" then
    move i to folder "a" of theLocation
    else if (name of i) begins with "b" then
    move i to folder "b" of theLocation
    else if (name of i) begins with "c" then
    move i to folder "c" of theLocation
    else if (name of i) begins with "d" then
    move i to folder "d" of theLocation
    else if (name of i) begins with "e" then
    move i to folder "e" of theLocation
    end if
    set name of (the result) to items 3 thru -1 of (get name of (the result)) as string
    end repeat
    end tell
    (98558)

  • File Archive in FTP Server

    I'm using odiscpget to extract file from remote FTP server and i have a requirement to archive the file after successful extraction into archive directory in the same server.
    Do i have an utility to perform a file move in remote server from ODI?
    Thanks in Advance

    odiscpput will look for a file in local directory to move to remote server isn't it?Yes .. it is.
    If you want to do file operation on the remote server only then you need to write your own code for it.

  • Posting an Excel file to a FTP Server

    Hi,
    I have a requirement, where I have to convert the contents of an internal table to an excel file, along with header details and put that file to a FTP Server.
    I am able to create an excel file in FTP server, using function module FTP_R3_TO_SERVER and transfer contents of my internal table. But the contents of my internal table are getting copied to one column. How do I get the contents in different columns?
    Also how do I get the header details?

    Hi,
    you can simply create a comma-separated text file on your SAP application server, line by line, each column separated by a semicolon (;). That file can later easily be opened with Excel. Afther the file has been created you can send it to the remote FTP server.
    HTH!

  • Unable to connect to the remote ftp server using dreamweaver.

    For the last one week I have been trying to connect to the remote ftp server using dreamweaver. I spoke to the technical support agency who manage our remote server but they are saying that there is no problem with the server adn they dont know anythign about dreamweaver so cant assist me.
    I was suggested to check with adobe team directly and i spoke to a technical support person on the live chat but they said since the version is CS4 - education version, they cant assist me at all!! This is just ridiculous...I am constantly being sent from one place to the other without anything getting resolved!!
    Please help somebody!!

    I am having a similar problem... maybe.  I was connected to my remote site all day yesterday, then out of the blue I tried to "put" an edited file... as I had been doing all day, and I received an FTP error:  Cannot make connection to host. Your login or password is incorrect.  That's odd, I've been connecting all day.  So I went into my sites > manage sites and clicked the Test button on my remote server information and it returned Adboe Dreamweaver CS connected to your webserver successfully.  I went back to my file and tried once more to "put" it on the remote server... again FTP Error: cannot make connect to host...  So I reboot my computer and start Dreamweaver CS3 again.  I reenter my remoter server information and click the Test button.  "... connect to your webserver successfully".  I try to put any file, FTP error again.  So I call my server administrator, he checks the servers logs and says there are no errors and you've connected successfully several times today.  I went through the trouble shooting steps listed here, though my FTP Logs are empty.  I cannot stay connected or even see the remote folders to try to drag and drop.  I tried to run ftp from a windows command prompt and it seems to connect me.
    I downloaded an installed an SFTP client and was able to successfully connect to my remote server and upload the files.  It's definately a Dreamweaver problem.  Any suggestions?

  • Help Fetching files from an FTP server into a DBase or local folder

    Hello Gurus!
    I need help to automate or design/write an app capable of (replace a manual process) reading log files in an ftp server folder, this log files are called CDR (Call Detail Record) and named as follow cdr.txt.20020221010000 meaning that this log file was created on 2002/02/21 at 01:00:00.
    This CDR log files are generated every hour by a Lucent telephone switch using a software/program called EXS ExchangePlus in ASCII format (fixed length delaminated, Char data type). EXS ExchangePlus writes a record in this CDR/log files after the call is completed, i.e. Calling_Number, Called_Number, Date_connect (yyyymmdd), Time_connect (hhmmss), Charged_time (hhmmss, duration of the call), and so on.
    The manual process I am using now is:
    1. Log in the ftp server into the folder where the CDRs log files are, located the latest generated CDRs log files and downloaded them into a local folder/directory. Normally I download the CDR for full day or 24 CDRs log files.
    1a. Optionally sometimes I used a program called VEdit compiled/gather all 24 CDRs into a single file.
    2. Once I have downloaded the CDRs I want to process (normally I process a full day 24 CDRs) I imported then into a Data Base temp table, where then I do the conversion of data types (i.e. Dates and times fields from char type -> to ->Date type) and calculations for billing purposes.
    So if somebody can help with this, I would really appreciated ideas or any kind of information on how to automated this process.
    I�m familiar with Java2 platform (using JDeveloper ) so if somebody has done something like this before using java, this would very helpful. Or Maybe using Visual Basic 6.0 would help too.
    Thanks Gurus, and I look forward to hear from you soon!
    Alf Pathros!

    Thanks for the idea, even though an example would help me more.
    I already found the FTPClient class.
    I also would like to knwo if there is a away Ican append/merged various files CDRs into a single/one to then dump/import it into the database

  • How to archive files in another ftp server?

    Hi,gurus:
       My scenario is file to file and my sender adapter is ftp adapter.
       Now I want to archive the send file in another ftp server,how can I  implement it?
       There is a parameter "Archive files on FTP server" when I choose the processing mode "archive".What's  it's use?Thanks in advance.

    Hi,Santhosh:
      Thanks for your reply.
      I have checked your blog before,and it is very useful for me.
      I still have a problem about command line.
      In an sap note,I found the principle of the execution of the command line is like below code:
    import java.util.*;
    import java.io.*;
    public class test {
    public static void main(String args[]) {
    try {
    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec("C:/data/test.bat <param1> <param2>");
    } catch (Exception e) {
    e.printStackTrace();
    But you know this method has restriction.If my bat file has many commands,it only execute a part of commands(sometimes 8,sometimes 9 ).
    My bat file is like below:
    echo open 192.168.67.149 >c:
    data
    copyResult.txt
    echo <username> >>c:
    data
    copyResult.txt
    echo <password> >>c:
    data
    copyResult.txt
    echo cd /receive>>c:
    data
    copyResult.txt
    echo get %2>>c:
    data
    copyResult.txt
    echo cd /ok>>c:
    data
    copyResult.txt
    echo put %2>>c:
    data
    copyResult.txt
    echo cd /archive>>c:
    data
    copyResult.txt
    echo delete send.txt>>c:
    data
    copyResult.txt
    echo quit >>c:
    data
    copyResult.txt
    ftp -s:c:
    data
    copyResult.txt
    del %2
    I wanna merge all the "echo" in one command,so it may execute successfully,but I don't know the method.Any ideas?

  • CPS Simple File Deployer corrupts XLSX and DOCX files when copying to server. Solutions?

    When Contribute Publishing Service Simple File Deployment copies XLSX and DOCX files from our staging server to the live production web server, it is corrupting them.  The resulting file on the live web server is a few bytes different in size.  I published a 9015-byte docx file to our staging server using Dreamweaver (or Contribute).  The resulting file on the staging server opens correctly and remains 9015 bytes.  Then, using CPS Simple File Deployer, I deployed the file from our staging server to our live web server.  The resulting file on the live web server is 9017 bytes, and it won't open.  Something similar happens with XLSX files.  It works fine with XLS, DOC, Html etc.  Well, there is an issue with dependent files unless I synchronize with Dreamweaver, but that's another story.
    Once File Deployer has corrupted the files, opening them brings a message, such as "Excel has found unreadable content in filename.xlsx. . . ".  With Word, it says "The Office Open XML file filename.docx cannot be opened because there are problems with the contents . . . The file is corrupt and cannot be opened."  Sometimes the docx files can be recovered, but that doesn't help. 
    When I take the same original docx file and put it on the web server with an FTP program, it remains 9015 bytes and opens successfully on the live web server.
    For several reasons, such as many users updating the website with Adobe Contribute and not let them use FTP directly to the live server, we need to keep the staging server and use File Deployer (or something) to deploy the changed files from the staging server to the live website.
    I read somewhere that the programming code the uploads files can have problems and fail to work properly with Office 2007 files.  I don't have access to CPS's core.ctc and deployfile.cfc files, and I don't have Cold Fusion. 
    Any suggestions?
    Dean

    Try: 
    Open My Computer.
    Open the Tools menu and choose Folder Options...
    Select the File Types tab.
    Select the extension (for example DOC, or XLS) of the file that is slow to open.
    In the Details section, click [Advanced], and another dialog box will open. 
    In the Actions section, click Open then click [Edit...], and another dialog box will open.
    http://windowssecrets.com/forums/showthread.php/149672-10-9-2012-Updates-and-very-slow-opening-of-Office-files
    KR

  • File reading in FTP server

    Hai,
    I want to read the files present in FTP server without downloading.
    Using (org.apache.commons.net.ftp.*); this package I can view the files and directories present in particular host and can even download.
    But I want to read the files in directories without downloading them for displaying the file contents in my JApplet.
    How can I achieve this?
    Waiting for reply...
    Dhurai

    DHURAI wrote:
    How I have to specify the path (user name,password) for reading?If you are using the Apache Commons FTP package, as you said, then you don't specify a path. And the path you don't specify wouldn't contain a user name and password because you use those when you make the connection to the server. All of this is covered in the documentation.

  • Using Automator and Applescript to search and move files to flash drive

    I've used applescript and automator to do simple tasks like watch folders and move files and rename files, but that is about the extent. I am wondering if it is possible to set up a automator service or app that will do several things.
    When a flash drive is plugged it, it will ask for a file to be searched for, then it will search a predetermined directory for files with the word or number in them and then it will copy the found files to the mounted flash drive.
    Any help would be greatly appriciated!
    Thanks!

    As a start, you can use launchd to run a script when a volume is mounted:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
              <key>Label</key>
              <string>com.tonyt.LaunchOnVolMount</string>
              <key>ProgramArguments</key>
              <array>
                        <string>LaunchOnVolMount.sh</string>
              </array>
              <key>QueueDirectories</key>
              <array/>
              <key>StartOnMount</key>
              <true/>
              <key>WatchPaths</key>
              <array/>
    </dict>
    </plist>
    You can then have the LaunchOnVolMount.sh script perform the tasks you need.
    You can incorporate Applescript within the Bash script with osascript:
    #!/bin/bash
    answer=$( osascript -e 'tell app "System Events" to display dialog "What file do you want to search for?" default answer "" ' )
    echo $answer
    I beleive that you can also call an Applescript from launchd

  • I have created a Blog in iWeb and uploaded it to an FTP server.   It works fine, except that the 'Comments' facility is missing.   When I upload the blog to MobileMe   the 'Comments' facility is there and working great.   How can I solve the problem on th

    I have created a Blog in iWeb and uploaded it to an FTP server.   It works fine, except that the 'Comments' facility is missing.   When I upload the blog to MobileMe   the 'Comments' facility is there and working great.   How can I solve the problem on the FTP server Blog.

    You haven't a problem. You simply did not read the iWeb Help :

  • Polling of the current file from multiple files in the FTP Server

    Hello Experts
    I am working on a file to file scenario.We have to poll the file from the FTP server which may contain multiple files with different creation dates.The requirement is to poll only the file created in the current date.Could anyone throw some light on this.
    Thanks & Regards
    Sabyasachi

    Hi Sabyasachi,
        You can archive the files that you do not need into another folder manually for the first time.
    Later you can schedule the file adapter to poll the folder only once in a day (Poll INterval = 86400 secs)
    Do not forget to set the option to archive/delete the file that are already processed.
    Regards,
    Ravi Kanth Talagana

Maybe you are looking for