Overwriting the File in File Adapter

Hi All,
I hav a module processor (in Receiver file Adapter)which checks the existence of the file by name DOWN.flg befor writing the file by the same name at the same location. if the file already exists, then it has to wait until another system deletes (as per the requirement). if not, it has to write the file. I had done this successfully with an FTP receiver. but when i'm moving the same functionality to the local drive(now the receiver is a local directory on the XI Server), then i'm getting the following error.
<b>Error</b>:Attempt to process file failed with java.lang.Exception: Overwriting file '/cpe/data/DEV/XI_/IN/APD/Commander/DOWN.flg' not allowed due to configuration flag
<b>Error:</b>
Exception caught by adapter framework: Overwriting file '/cpe/data/DEV/XI_/IN/APD/Commander/DOWN.flg' not allowed due to configuration flag
these are the errors which i found in the audit log. i din't check the overwrite Existing File option in the Receiver adapter.Can anyone help me out in resolving this.
Anyhelp wud  b greately apprecited...
Thnx in Advance.

Hello Jayakrishnan,
Thank you very much for the tip, actualy it was very tricky, since the overwrite existing file option is not possible in the "append" mode on my XI version (SP12). THis is what we have done :
- modify the communication channel to "create" mode and check the "overwrite existing file option".
- activate it
- chanche back to the "append" mode
- activate it again
And then it works !
Thanks for your help
Guislain

Similar Messages

  • Migrating data and settings from XP to Win7, do I have to overwrite the profiles.ini file on the new Win7 system with the old XP version of the file?

    I have the Profiles folder and the profiles.ini file copied to a USB stick. I know I copy the Profiles folder content into the Profiles folder on the Win7 machine, but do I have to overwrite the profiles.ini file on the new machine too? Various strands of advice aren't clear on this. And are there any other files which also need to be migrated/overwritten? Clear directions would be welcome.

    don't transfer, reinstall.
    if you need to reset your activation count, contact adobe support -  http://helpx.adobe.com/x-productkb/global/service1.html
    Downloads available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  12 | 11, 10 | 9,8,7
    Lightroom:  5.5 (win), 5.5 (mac) | 5.4 (win), 5.4 (mac) | 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • While downloading file to application server its overwriting the earlier fi

    hi if i am using below code with date time stamp the file is downloaded to the application server correctly and each time i execut eht program a difference file is generated as date time stamp differs each time but
    whne i remove the date time stamp ie sy-datum and sy-uzeit as we dont need to display the date time stamp with the file each time i execute the program a file is generated but it overwrites the ealier existing file please suggest as each time it shoul generate a new file....
    Concatenate file name sy-datum sy-uzeit '.txt' into v_datetimefile
    file on Appplication Server is selected
      CALL FUNCTION 'FILE_GET_NAME'
         EXPORTING
                CLIENT                        = SY-MANDT
               logical_filename              = 'ZFILE'

    Hi,
    first of all decide you have to overwrite the existing file or you want to create the new, i think the answer is there in your query itself, if you want to create new then concatenate the date and time, else don't do that.
    below are the additions we can use while opening the data set.
    FOR INPUT
    FOR OUTPUT
    FOR APPENDING
    IN BINARY MODE
    IN TEXT MODE
    AT POSITION p
    TYPE ctrl
    MESSAGE mess
    FILTER f
    Reward if useful.
    Thanks,
    Sreeram.

  • Writing multiple arrays to a single xml file at seperate times without overwriting the previous file?

    Hi my name is Dustin,
    I am new to labview and teststand... I am trying to right multiple arrays of data to a single xml file. I can do this with a cluster but I have to create a variable for each of those arrays (21 arrays) and I was hoping to use the same variable for each array. Meaning I obtain my array of data write it to an xml file then replace that array in that variable with a new array and then call up my VI that writes that array to an xml file and write it to the same xml file underneath the first array without overwriting it. Attached is my VI I created to write an array to an xml file. Again I am wondering if there is a way to write multiple arrays to a single xml file at different times without overwriting the previous xml file.
    Thanks
    Solved!
    Go to Solution.
    Attachments:
    Write_to_XML_File.vi ‏11 KB

    Hi dlovell,
    Check the attached example. I think it may help you.
    Regards,
    Nitz
    (Give Kudos to Good Answers, Mark it as a Solution if your problem is Solved) 
    Attachments:
    Write to XML.vi ‏17 KB

  • How can I rewrite the java.io.file class to a custom file class?

    Hi All!
    Im new to Java. Well, I did some experiments with small Applets. Because it is not allowed to use Files in an unsigned Applet, I need to know, how I can manage to overwrite the java.io.File class. The background: I have to port some Applications which need file access into Applets.
    I think it is necessary to create a class with the same signature then the Java.io.File that stores the information in an database on the Webserver or read information from there. Then overload the java.io.File with my custom file class.
    Is this possible and, if so, how?
    Thanks!

    Hi yawmark !
    Thanks for the quick answer! My idea to store the filecontent into a database is caused by the plan to make the application-port independent from the workstation executing it. So it would be a nice feature storing the "files" into a database.
    JavaBeginner2009

  • File Adapter Overwriting the output files

    Hi All,
    I´m using a File Receiver Adapter to write flat files on to an FTP. Same Communication Channel is used for all types of output files (As per the business requirement the file name(
    MzOutput.txt) shud b same for Deliverz orders, Purchase orders etc...). The receiver legacz szstem reads one file at atime and deletes it. So if i´m writing a Deliverz Order File, i have to wait until the file MzOutput.txt gets deleted and then i have to write the next file using the same name. in order to acheive this, i had used a module processor which waits until that MzOutput.txt gets deleted. Mz problem is
    As there are ´n´ no of orders waiting in the queue, if at 12:14:00 the MzOutput.txt gets deleted, then two threads which check for the existance of the MzOutput.txt file finds nothing and tries to write at same time. as a result, first file got overwritten by the second file.
    I dint check the indicator OverwriteExisting File in the CC configuration.If i use two different CC channels to write the same file, it is giving FTP Exception which is true.
    I´m loosing few deliveries as a result of the above case. Can anzone please help me out in this regard?
    Thnx in Advance
    Anil

    Hi Anil,
    Why dont you write the files with 'Add time stamp' option on for the file name and then the third party/legacy system to read the files in the order which they were created.?
    Another option will be to write these files into a folder with these Add time stamp option/counter option and make a shell script check the folder for the MzOutput.txt file exists in the folder from where the third party/legacy system reads the file and once it has deleted the existing file, then ur files shud be moved in the order in which they were written n the temporary folder.
    This will avoid the queue of messages in the adapter engine.
    Cheers
    JK

  • Using sender file adapter to read the most current file

    Hi,
    in my sender file adapter , i have to read the latest file- all files in  the source directory are named as <filename><timestamp>.txt . I need to read the file with the latest timestamp (i.e. the most current file )
    How do i configure this using file adapter.
    thanks

    Hi Sreeram,
    thanks for the answer- but i found that the option can only be used with NFS transport protocol. what if i am using FTP ?
    alos, by date option means- files are processed according to their time stamp in the file system, starting with the oldest file.
    However in my case i only want to read the latest file and ignore the older files.
    Thanks

  • How to overwrite  the xml file by  flash using Php

    Hi
    i am creating getting data from the xml file ... and i am
    doing some Alteration in the xml file by flash after that flash
    producing the xml file i finished upto this process...
    nw i neeed to overwrite the xml file.... using Php.....
    can any one give me some idea ... to solve this issue
    ~~SK

    Flash Player cannot write XML files at all. but using
    php+flash we could do it .

  • Limiting the number of files being picked up by the sender file adapter

    We are running a file adapter to collect xml files from a legacy system in a shared network location.  The files are picked up, information is sorted and mapped, and then sent to a proxy on our CRM system to store the data.  Very simple and not-complex.
    Our initial data load will consist of somewhere in the neighborhood of 900k records, which is killing CRM.
    A co-worker with a bit more experience was telling me that he believes there is a way to limit the number of files that will be pulled per iteration of the file communication channel.  If this is the case, can someone share with me the parameters that need to be set?
    My apologies if this is a duplicate post - I have tried to look for a good answer in the forums and have come up empty.
    We are running PI 7.1, and I believe it is SP 6. 
    Thanks in advance for the help,
    Ben

    Hi Ben,
    There is no standard way to limit the number of files to be processed by the communication channel.
    On the Sender File CC, there is a parameter " Maximum File Size" which restricts the files bigger than the specific size, but this is just a prevention not a solution.
    If you have a single big size file, then somehow you have to create small sized files out of it.
    Thanks,
    Pooja Pandey

  • How to read the whole text file lines using FTP adapter

    Hi all,
    How to read the whole text file lines when error occured middle of the text file reading.
    after it is not reading the remaining lines . how to read the whole text file using FTP adapter
    pls can you help me

    Yes there is you need to use the uniqueMessageSeparator property. Have a look at the following link for its implementation.
    http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/adptr_file.htm#CIACDAAC
    cheers
    James

  • Is it possible to read the file using File Adapter which is in client machi

    Is it possible to read the file using file Adapter which is in client machine(on the same network).Then what is thee need of FTP Adapter?

    You can achieve that by exposing your client machine as a drive, then you can go using file adapter.
    FTP adapter will help you to communicate with different machine which is in different network.
    It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
    Thanks,
    Vijay

  • HT202020 Using a SDHC card adapter I can import directly on my iPad2 videos (.mov) taken with a Panasonic DMC-ZS3. The same video files (same file format) imported in Aperture 3.3 cannot be synchronized with iPad. Is Aperture causing the problem?

    Using a SDHC card adapter I can import directly on my iPad2 videos (.mov) taken with a Panasonic DMC-ZS3. The same video files (same file format) imported in Aperture 3.3 cannot be synchronized with iPad. Is Aperture causing the problem?

    Oh, baby! This bad boy flies!! Here's what to expect:
    I had 40,000 images in Aperture 3 and it was dog slow at everything. I installed 3.1 update today. It took 5 minutes to update the database and then behaved marginally better than before at ASIC library navigation. I was disappointed.
    Then I QUIT the app. It took a couple of hours to "update files for sharing" with a counter that went to 110,000 images. So it must have updated every thumbnail and variation of preview. Turned it back on , and BAM. Came up fully in seconds. Paused for 10 seconds ten everything was lickrty split. For the first time ever, I can use the Projects view with all 791 projects and scroll quickly. I even put it in photos modevand whipped thru all 49,000 images!
    Haven't done anybprocessing yet, but i'm liking it!!
    Jim

  • Extra Blank Line gets added at the Beginning of the file by File Adapter...

    Hello All,
    I have created an RFC to File Adapter scenario in PI 7,1 and I am using Content Conversion in the File Adapter to convert the payload structure to flat text file. The input Structure is simple as follows:
    <File>
    <FName>some file name</Fname>
    <Record>
      <Data>
          <Line>Text Lines</Line>
    </Date>
    </Record>
    </File>
    while using the following Content Conversion Parameters: While I have defined "Record" as Structure.
    Record.addHeaderLine   = 0
    Record.fieldSeparator      = 'nl'
    Record.endSeparator      = 'nl'
    Here everything is working fine except that the text file getting generated has a blank line at the beginning. I was thinking that by adding "Record.addHeaderLine   = 0" parameter, no header line will be added to the file but this seems to be not working. I tried to include the top element "File" with the same parameters and different combinations but was not able to achieve the result and it stopped the file creation altogether.
    So, I'll appreciate if anyone can suggest something to get rid of the this blank line at the beginning of the file.
    Regards,
    Athar

    Extra blank line is actually provided for the FNAME node, but not displayed because of it has different structure with Record node.
    Change the structure for FNAME to :
    <FName>
    <Data>
    <Line>some file name</Line>
    </Data
    </Fname>
    this way "some file name" will be dispalyed in the text file at the first line of file. To remove it use this trick, define the following values in Content Conversion Parameters:
    in the Recordset Structure : FName,Record
    FName.fieldFixedLengths     = 0
    FName.fixedLengthTooShortHandling =     Cut
    FNamee.fieldSeparator = '0'
    FName.endSeparator =     '0'
    Record.fieldSeparator = 'nl'
    Record.endSeparator = 'nl'
    Rgds,
    Triana

  • How to programmatically overwrite the file in Labview?

    Iam using Copy.VI for copying a file from one directory to other. If the file is already exist in destination directory, Copy.VI generates an error of "10". I wanted to overwrite the file which is already exist. Does anyone has solution. I have attached a file which is written in Labview 6.1.
    Attachments:
    Copy_File.vi ‏21 KB

    Always run a delete first, or alternatively; run a delete if the copy fails with error 10 and then redo the copy operation...
    MTO

  • Java.io.NotSerializableException when overwrite the JTable data into .txt file

    hi everyone
    this is my first time to get help from sun forums
    i had java.io.NotSerializableException: java.lang.reflect.Constructor error when overwrite the JTable data into .txt file.
    At the beginning, the code will be generate successfully and the jtable will be showing out with the data that been save in the studio1.txt previously,
    but after i edit the data at the JTable, and when i trying to click the save button, the error had been showing out and i cannot succeed to save the JTable with the latest data.
    After this error, the code can't be run again and i had to copy the studio1.txt again to let the code run 1 more time.
    I hope i can get any solution at here and this will be very useful for me.
    the following is my code...some of it i create it with the GUI netbean
    but i dunno how to attach my .txt file with this forum
    did anyone need the .txt file?
    this is the code that suspect maybe some error here
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    String filename = "studio1.txt";
              try {
                  FileOutputStream fos = new FileOutputStream(new File(filename));
                  ObjectOutputStream oos = new ObjectOutputStream(fos);
                   oos.writeObject(jTable2);
                   oos.close();
              catch(IOException e) {
                   System.out.println("Problem creating table file: " + e);
                   return;
              System.out.println("JTable correctly saved to file " + filename);
    }the full code will be at the next msg

    this is the part 1 of the code
    this is the full code...i had /*....*/ some of it to make it easier for reading
    package gui;
    import javax.swing.*;
    import java.io.*;
    public class timetables extends javax.swing.JFrame {
        public timetables() {
            initComponents();
        @SuppressWarnings("unchecked")
        private void initComponents() {
            jDialog1 = new javax.swing.JDialog();
            buttonGroup1 = new javax.swing.ButtonGroup();
            buttonGroup2 = new javax.swing.ButtonGroup();
            buttonGroup3 = new javax.swing.ButtonGroup();
            buttonGroup4 = new javax.swing.ButtonGroup();
            jTextField1 = new javax.swing.JTextField();
            jLayeredPane1 = new javax.swing.JLayeredPane();
            jLabel6 = new javax.swing.JLabel();
            jTabbedPane1 = new javax.swing.JTabbedPane();
            jScrollPane3 = new javax.swing.JScrollPane();
            jTable2 = new javax.swing.JTable();
            jScrollPane4 = new javax.swing.JScrollPane();
            jTable3 = new javax.swing.JTable();
            jButton1 = new javax.swing.JButton();
            jButton2 = new javax.swing.JButton();
    /*       org.jdesktop.layout.GroupLayout jDialog1Layout = new org.jdesktop.layout.GroupLayout(jDialog1.getContentPane());
            jDialog1.getContentPane().setLayout(jDialog1Layout);
            jDialog1Layout.setHorizontalGroup(
                jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(0, 400, Short.MAX_VALUE)
            jDialog1Layout.setVerticalGroup(
                jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(0, 300, Short.MAX_VALUE)
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jLayeredPane1.add(jLabel6, javax.swing.JLayeredPane.DEFAULT_LAYER);
            String filename1 = "studio1.txt";
            try {
                   ObjectInputStream ois = new ObjectInputStream(new FileInputStream(filename1));
                   jTable2 = (JTable) ois.readObject();
                   System.out.println("reading for " + filename1);
              catch(Exception e) {
                   System.out.println("Problem reading back table from file: " + filename1);
                   return;
            try {
                   ObjectInputStream ois = new ObjectInputStream(new FileInputStream(filename1));
                   jTable3 = (JTable) ois.readObject();
                   System.out.println("reading for " + filename1);
              catch(Exception e) {
                   System.out.println("Problem reading back table from file: " + filename1);
                   return;
            jTable2.setRowHeight(20);
            jTable3.setRowHeight(20);
            jScrollPane3.setViewportView(jTable2);
            jScrollPane4.setViewportView(jTable3);
            jTable2.getColumnModel().getColumn(4).setResizable(false);
            jTable3.getColumnModel().getColumn(4).setResizable(false);
            jTabbedPane1.addTab("STUDIO 1", jScrollPane3);
            jTabbedPane1.addTab("STUDIO 2", jScrollPane4);
            jTextField1.setText("again n again");
            jLabel6.setText("jLabel5");
            jLabel6.setBounds(0, 0, -1, -1);
            jButton2.setText("jButton2");
            jButton1.setText("jButton1");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
          

  • Overwrite the xml file

    hi
    is there any other possible way to overwrite the xml file
    using the javascript ....
    Thanks in Advance
    ~~
    SK

    Thanks Feldkircher for your reply, But in my Project we are
    using javascript , so we can't migrate for Php.
    so is it possible to overwrite the xml file by using
    javascript . Bcoz after flash produced the xml file i am going to
    pass as string to javascript through external Interface. from there
    i need to overwrite the xml file by javascript
    is it possible to find the solution by this way...
    ~~
    Sk

Maybe you are looking for