Sending multiple files

in file to file. i am sending multiple file with different file name and in target side the same file names should be displayed.help me how to solve problem

Hi,
In recevier communication channel we have advanced tab, asam properties we have enable that file name.
try {
String filename    = "";
DynamicConfiguration conf1 = (DynamicConfiguration) container
    .getTransformationParameters()
    .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","FileName");
filename = conf1.get(key1);
filename = filename".xml";
conf1.put(key1,filename);
return filename;
catch(Exception e)
     String exception = e.toString();
      return exception;
regards,
ganesh.

Similar Messages

  • Sending multiple files using one socket

    Hi guys
    I'm working on a simple app that sends multiple files over LAN or I-NET. The problem is that the app run seems to be non-deterministic. I keep getting this error on the client side:
    java.io.UTFDataFormatException: malformed input around byte 5
            at java.io.DataInputStream.readUTF(Unknown Source)
            at java.io.DataInputStream.readUTF(Unknown Source)
            at service.DownloadManager.storeRawStream(DownloadManager.java:116)
            at service.DownloadManager.downloadFiles(DownloadManager.java:47)
            at manager.NetworkTransferClient$1.run(NetworkTransferClient.java:104)The byte position changes every time I run a transfer. The error is caused by this line: String fileName = in.readUTF(); Here's the complete code:
    Client
    private void storeRawStream() {                               
            try {
                FileOutputStream fileOut;                       
                int fileCount = in.readInt();           
                for(int i=0; i<fileCount; i++) { 
                    byte data[] = new byte[BUFFER];
                    String fileName = in.readUTF();               
                    fileOut = new FileOutputStream(new File(upload, fileName)); 
                    long fileLength = in.readLong();                                 
                    for(int j=0; j<fileLength / BUFFER; j++) {
                        int totalCount = 0;
                        while(totalCount < BUFFER) {                       
                            int count = in.read(data, totalCount, BUFFER - totalCount);
                            totalCount += count;                 
                        fileOut.write(data, 0, totalCount);
                        fileOut.flush();
                        bytesRecieved += totalCount;                                  
                    // read the remaining bytes               
                    int count = in.read(data, 0, (int) (fileLength % BUFFER));                                        
                    fileOut.write(data, 0, count);              
                    fileOut.flush();
                    fileOut.close();      
                    transferLog.append("File " + fileName + " recieved successfully.\n");  
            } catch (Exception ex) {
                ex.printStackTrace();
        }Server
    public void sendFiles(File[] files) throws Exception {
            byte data[] = new byte[BUFFER];
            FileInputStream fileInput;                                       
            out.writeInt(files.length);              
            for (int i=0; i<files.length; i++) {   
                // send the file name
                out.writeUTF(files.getName());
    // send the file length
    out.writeLong(files[i].length());
    fileInput = new FileInputStream(files[i]);
    int count;
    while((count = fileInput.read(data, 0, BUFFER)) != -1) {
    out.write(data, 0, count);
    bytesSent += count;
    fileInput.close();
    out.flush();
    Does anybody know where's the problem? Thanx for any reply.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Send the length of each file ahead of each file, with DataOutputStream.writeLong().
    When reading, read that long, then stop reading bytes when you've read exactly that length.

  • How to send multiple files by using File Adapter

    Hi Experts,
    I am trying with the scenario by using the File Adapter.
    As per my requirement, I need to send multiple files (like FileA.xml, FileB.pdf, FileC.txt, FileD.html etc) to the Target system.
    I have seen ‘Additional Files’ option, in Sender Communication channel. But I am not sure how to give the parameters, in case if I would like to send the multiple files as mentioned above.
    Could someone please explain about the steps, that I need to proceed further?
    Thanks in advance.
    Sree

    Anand,
    Thank you for your reply.
    My requirement is to send the multiple files like inone.xml, intwo.txt etc. In the Sender Communication channel, I had provided ' inone.xml ' in the File Name field under the "File System Access Parameters" section.
    Next I had chosen "Additional Files" option as Checked and provided ' intwo.txt ' in the field name of "File List".
    After activation, i have provided those two files (inone.xml, intwo.txt) in the Source folder. It is not processing? What could be the problem ?
    Thanks
    Sree

  • Send multiple files in different directories using Receiver File Adapter

    Hi Experts,
    I have one File to File without ESR scenario where I have to pick multiple files from different directories and to save them in different directories on receiver side.
    Can anyne help me to send multiple files in different directories using receiver file adapter.
    Is it possible??
    Any help will be appreciated.
    Regards,
    Danish

    hi ,
    that is possiable without esr,
    we need to create one sender communication channel , in that  we nend to use "adavnced selection for source file " for sending multiple files from multiple directories.
    we need to create 'n' receiver communication channels and 'n' receiver agreements based on communication channels .
    in receiver determination, provide multiple receivers
    In interface determination , provide * symbol for receiver communication components
    thanks,

  • Send multiple files in separate e-mails

    Hello!
    I want to send multiple files from finder in separate e-mails, but I can't find a way to do this in Mavericks and Apple mail (or gmail). In windows XP it was simple as Send to/Mail recipient. Is there an option similar to this is MacOSX?
    Thnx,
    Gas

    #Eric
    Of course that would work, but it is tiresome to do for every file (open-attach-write subject-insert recipients-send), and that is exactly what I would like to avoid.
    #Csound
    My Mail works fine, but I use gmail webmail usually. Now that I changed the preferences, so Mail is the default it works with the shortcut menu :-)
    But, when I select more files, it attaches them to one e-mail, and not per/file. Is it possible to split them to different mails so they can be sent individually?
    Thanks.

  • Why can't i send multiple files through airdrop ? , it accepts but shows only one photo

    why can't i send multiple files through airdrop ? , it accepts but shows only one photo

        Hello there Laurengrayce,
    I message all of the time and I want you to do the same, to anyone you would like!  Demmo provided a good suggestion of having this person check their services and ensuring they're setup as a 10-digit number, but I would like to provide some of my own suggestions.
    If they are in fact already setup as a 10-digit number, I would recommend deleting this persons contact from your phone as well as the entire messaging thread (long press and hold on thread to delete).  Readd them to your contact list and try again.
    Please advise if this continues and they've already checked with their provider.
    Thanks,
    MelissaM_VZW
    Follow us on Twitter @vzwsupport

  • Sending multiple files using file adapter

    The scenario I am implementing requires multiple files of different names to be picked up by my adapter. I dont want to create different file adapters for each file. I tried using the "Additonal Files" option in the sender file adapter in my configuration, but am not able to do the same. Any idea as to how the configuration for multiple files for same adapter isto be done?

    Hi bhavesh
    Fundamental of adapter configuration is you have to give valid xml structure to XI, so you will define your configuration according to your requirement.
    for .xml you have file as a message protocol while for .csv you have file content conversion as a message protocol.
    So you have to define adpater configuration for sender side for one type of structure.
    So you need a different communication channel for different extentions.
    for diffrent strcutures,having same extention, you can execute this.
    Please make me clear that what is your scenario?
    why you need to pick all files under a directory with a same communication channel?
    Regards
    Piyush

  • File Sender : Multiple File being picked

    Hi All
    I have a scenario where I have multiple files in a directory . I have set the option to Processing Parameters to be EOIO and poll interval to be 60 seconds.
    The processing sequence is by Name.
    This File sender triggers a BPM. What I see is that when the File sender polls the directory. If ther are  multiple files, they get picked up at the same time and as many BPM are started.
    I would like it to work pretty much in a serial format where it picks up only one file triggers the BPM. When the BPM is done it can trigger the next file.
    How can I do this ??
    Regards
    Aju Paul

    Hi Aju,
    I have come across such scenarios...but not ones wer you have files wid same names in the same path wid almost same time stamps:)...well, d time stamp format can be specified upto milli seconds!...
    Will you be able to give some kind of an "advanced selection for the source file"-this option is available in the ftp adapter..here's the link to the documentation(just in case u haven't come across it earlier):-
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    Regards,
    Sushumna

  • Issues with Receive Adapter receiving a file that has not completed uploading while send multiple files on the Send Adapter

    Hello,
    I am only a few weeks old into BizTalk so I am new to this application. 
    The pieces I have for my development environment consists of the following:
    FTP Server ---[SFTP Adapter]---> BizTalk 2013 ---[FILE Adapter]---> Internal Network Share Drive
    I currently configured a simple PassThru, One way Receive/Send in BizTalk where the Receive Port receives a file via SFTP 
    Adapter from our FTP server and the Send Port sends the file via the FILE Adapter to our Internal Network share drive. 
    The setup works great with small files.  However, when I receive a large file on the FTP server, the Send Port sends multiple instances of the file on the FTP server because the Receive Adapter sees that the file is there, but not yet
    fully uploaded.
    Can someone please guide me as to how I can determine when a file is fully uploaded to the FTP server before the Receive Adapter fires?
    Thanks,
    Mitch

    Yap BizTalk does not have control over locking the file during read/write Operation and its the third party which need to take care of this (by rename the file after upload ) .
    If the file size is too large I would suggest to bypass the message box as it has performance bottleneck during peak hours 
    Apart from being repetitive, this is not good advice.  There is no indication that the file is too large or will cause any "performance" issues.
    The concurrency problem can happen with a file of any size.

  • How to send multiple files with it's original name over HTTPS using one CC?

    I am working on a File to HTTPs scenario. It is in production and working fine. Currently we send only one file and I have hard coded the name in the communication channel in the header fields. Now we have to send more files with different names and I want to use only one receiver channel instead of many. We need to send the files with their original names.
    I used the ASMA in the sender File Adapter and I see the FileName in the dynamic configuration under http://sap.com/xi/XI/System/File name="FileName".
    I know we can use a UDF in message mapping and get the value and put it in HEADERFIELDONE. But we don't want to use mapping as the files are huge and we don't want to insert XML tags in the payload.
    So how do I put the Filename from the DynamicConfiguration to the HTTP header field as FileName without using mapping? Are there any settings?
    Can I put something in the PROLOG or can I use any other module in the File Sender Adapter or is there any other option?
    Any help is appreciated.
    Thanks
    Sai

    See my blog:
    /people/stefan.grube/blog/2009/06/19/unknown-use-case-of-dynamicconfigurationbean-store-file-name-to-jms-header-without-mapping
    You have to put the configuration in sender channel, as HTTP adapter does not allow modules.
    For the second module, put values related to HTTP adapter.

  • How to send multiple files in parallel using ftp with single connection

    Hi.
    i have written code for file upload manager using ftp..
    it perfectly working with sequence file uploading in single connection..
    And i tried to upload multiple files with parallel processing in a single connection.... but it is not working properly.. i also used thread concept
    but single file only transfered and connection refused...
    my code here...
    //////////////////// main class //////////////////////////////////////////
    ftp.connect();
    ftp.login();
    String [] archivos = new  String[100];
                                      File dir = new File("C:\\Files Uploading\\");
                                       archivos = dir.list();
                                       for (int s=0; s<archivos.length;s++)
         //Start Data Transfer Here
         new DataTransfer(archivos[s]).start();
                                       Thread.sleep(1000);
    /////////////////////// thread class ////////////////////////////////
    class DataTransfer extends Thread
          String FileName="";
          String LocalPath="",RemotePath="";
           public DataTransfer(String fname)
         FileName = fname;
         LocalPath = "C:\\Files Uploading\\" + FileName;
         RemotePath = FileName;
         System.out.println(LocalPath);          
            public void run()
                        System.out.println("DataTransfer Started");
         /File Transfer Here
         try
               FileInputStream input = new FileInputStream(LocalPath);
                               Ftp_Client.storeFile(RemotePath,input);
         System.out.println("Successfully sent : " + RemotePath);
         catch (Exception exc)
              System.out.println(exc.getMessage());
              System.out.println("DataTransfer Ended");
         }otherwise tell me any other alternate way

    And i tried to upload multiple files with
    parallel processing in a single connection....
    but it is not working properly.FTP isn't a multiplexing protocol. How could it work at all?

  • Send Separate Remittance Advice - Can I send multiple files to single supplier based on custom groups

    I want to send multiple emails to single supplier based on the Legal Entity of the invoice paid.
    eg. If a supplier has two invoices in a payment, both are paid by different legal entities of invoices payable .. then I want to send to different emails to the same supplier
    I am able to create 2 pages in the RTF using <?for-each-group:OutboundPayment;DocumentPayable/DocumentPayerLegalEntityName?>
    But I am unable to send 2 emails
    please help..

    When I know i'll be transforming or adding additional filters, I prefer to go directly to creating smart objects rather than grouping them first, since the relevant layers are automatically "grouped" by being pulled into the smart object. My thought is that the default name for a smart object (or a group, for that matter) should be the lowest layer on the selected stack that has a non-default name, since in most cases that's the one you'd want to use for the new smart object. I don't know exactly how Photoshop recognizes layer names, but since it knows what number to assign to new layers or individual types of adjustment layers, it should also be able to recognize when a layer name is not a default name.

  • How to send the mail with multiple file attachments ?

    Sending mails with multiple files as attachments.

    You need to start from the app, assuming that it has an email function, that contains the files that you want to send as attachments. The Photos app allows you to send up to 5 photos on the same email, but if you want to send multiple file types then you need an app that supports all those file types. I use the GoodReader app which supports quite a few document/file types (e.g. PDF, Excel, Word, pictures), and from that I can select multiple files (including different types) and attach them to the same email.

  • How can i send multiple Key note files attached in one e-mail

    I've problem with mail attachment. I want to send multiple files from keynote as 4 attached in one mail. Anyone know how? Do I've to wasting time send it one by one? Your kind advice will be a lot appreciated. Thank you ;)

    You can only email one file at a time from the app. Unless you can copy and paste all four files into the email, you can't do it in the Mail App either. There is a third party app called Group Email with Attachments that will allow you to do this. You will have to be running iOS 4 to attach documents I believe.
    Message was edited by: Demo

  • How to attach multiple file in one mail

    Hi,
    I've problems with sending multiple files via Gmail account (Ipad version)  When sending the photo or video, I've to just click the photo and choose send to mail one by one. Any simpler way?  Sometimes i did sent both mpg and jpg but the reciepient didn't see any attachment too
    Anyone can help advise how to attach different file (doc, video, photo) in one mail will be a lot appreciated. Thank you so much

    You can attach multiple pictures to an email on an ipad2. Don't know about original iPad.
    Choose a photo or take a screen shot (hold down home button and button next to volume control at same time--screen shot now will appear in photos).
    Go to photos and edit your picture or screen shot, save it, then hold down on the image and copy it.
    Go to mail, create a new mail and paste it in.
    Save you mail as a draft.
    Go back to photos and select a different photo, copy it, and return to your draft, and paste it in. Repeat if you need to add more.
    Anything that you can take a screen shot or have an photo of can be pasted in one at a time into that draft email.
    If mail gets uncooperative, during this process, then double click on home button and quit multitasking mail, then open up mail again and send your draft. Uncooperative means gets frozen.

Maybe you are looking for

  • No recognition connecting w530 to Samsung Smart TV

    Hello Everybody, Im having issues trying to connect my computer to my smart tv.  I have a new samsung smart tv and a thinkpad w530.  I also have a 15ft mini displayport to HDMI cable (NOT converter just cable) from monoprice I just got in the mail to

  • How do I create this color-picker-HSB gradient?

    What seemed trivial at first glance has turned out as quite a challange! I would like to create a special kind of black/white/alpha gradient to mimic the HSB color picker in Photoshop: Saturation 0 100 +--------------+ 100 |white.....pure hue| |.....

  • New Emails not in Bold

    I use Verizon/Yahaoo email and most of my new emails are not arriving in my inbox in bold.  New emails are unbolded or as if I've already read them.  I have a Firewall and I have changed my password twice in the last few days and still I have this pr

  • How does the Mac App Store work?!

    Hey guys i recently posted this quesiton in a different area of the community but instead of being helped was just ridiculed for posting in the wrong place... +1 for helpfulness guys :/ lol Anyways... ive been told to ask in the development section..

  • Enabling VC in bridge CS4

    http://kb2.adobe.com/cps/407/kb407015.html If you follow this link you see that acces to VC is temporarely not available. When will this be fixed?