Unable to delete file after in a file adapter

Hello,
I have a BPEL process , which gets invoked when there is a new .PDX file in a folder. After processing the data from the file , I want to move into the archive folder. The process moves the file properly to the archive folder, but I am unable to delete the file from the folder I read it from.
One solution that worked was forcibly dehydrating the process using a checkpoint(). But that seems a very inefficient solution considering its expensive to do this step. Does any one else have a better solution?
Thanks

Just check the option "Delete after reading" in Adapter wizard if that is something you can do.. Adapter automatically deletes it once the file is moved to archive..

Similar Messages

  • How to delete a jar file after loading image files from it

    Hi,
    How can I delete a jar file after some image files have been loaded? For example, say, I have "a.jar" which contains an image "a.gif" in the root directory of the c drive. I would like to get the image size and then delete the jar file. Here is the code snippet:
        URL url = new URL("jar:file:/C:\\a.jar!/a.gif");
        Icon icon = new ImageIcon(url);
        System.out.println("icon size ? " + icon.getIconHeight());
        File file = new File("c:\\a.jar");
        while(file.exists())
            file.delete();
            try
                Thread.sleep(100);
            catch (InterruptedException ignored)
        System.out.println("file deleted.");I get the image size correctly but just can not delete the jar file. Apparently the file handle is not released, but how to close it? Any hint will be appreciated.
    Justin Jan

    I am sure the URLConnection.defaultUseCaches is set before it is connected otherwise I should catch an IllegalStateException on conn.setUseCaches(false).
            try
                URL url = new URL("jar:file:/C:\\a.jar!/a.gif");           
             URLConnection conn = url.openConnection();
               conn.setDefaultUseCaches(false);
             conn.setUseCaches(false);
                Icon icon = new ImageIcon(url);
                System.out.println("icon size ? " + icon.getIconHeight());
                url.openConnection().getInputStream().close();
                System.gc();
             System.runFinalization();
                File file = new File("c:\\a.jar");
                while (file.exists())
                    file.delete();
                    try
                        Thread.sleep(10);
                    catch (InterruptedException ignored)
                System.out.println("file deleted.");
            catch (Throwable t)
                t.printStackTrace();

  • How do i transfer a compilation photo file from iPhoto consisting of canon(img) and lumix(p..) in the order i compiled them to a usb stick as at the moment it is putting all the lumix files after the canon files?

    I have a macbook pro 15 inch retina 16 gb 1600mhz 2.7intel i7 osx 10.8.5
    I have just put together an iPhoto file of wedding photos consisting of a compilation of images from my canon(img files) and lumix(p..files) I want to know how to transfer them to a usb stick in the order i compiled them as at the moment it is putting all the lumix files after the canon files which is not how i want to present them to the newlyweds?

    Files are ordered by the file-viewer being used.  What viewer are you using, and what data field are you sorting by?
    In Finder, as in most applications, you can select the data field to sort by clicking a column header.  Clicking the selected header will reverse the sort.
    This is the Aperture forum, but what applies to Aperture is likely also true for iPhoto:  if you want to be able to sort your files in a specific order in a file-viewer, you should give them names that allow for sorting in that order when the name field is selected as the data field to sort by.  In Aperture, one creates new files by exporting, and one uses a File Naming Preset to name the files.  The File Naming Preset can start with an ordinal count or a sequence number.  Either of which will allow you to retain your order when viewing your files in a file viewer.

  • Could'nt delete file after processing  sender file in windows environment ?

    Hi,
    I have problem with sender file adapter in windows 2003 server, because the file adapter cannot delete the file after processing, seems like permission problem. but then i have set full controll access to the pi7adm (sap instance admin). but the problem still persist.
    Please advise, me.
    Thank you and Best Regards
    Fernand

    Hi,
    Of course i set delete option in my CC sender, but the fail adapter couldn delete fail without any reason ?
    This is the error message from RWB Could not delete file 'K:\WORKDIR\FTP\data\data1.fer1' after processing.
    like i mention before i have set full access to sap admin user to the directory. but the error still persist.
    any idea.
    Cheers
    Fernand

  • Input file should be deleted only after the output file is successful.

    Hi Experts,
    Could you pleas solve the below issue.
                           In  a file to file scenario, the input file will be picked from a directory location and after processing output file will be placed in the output directory location specified in the receiver communication channel.
    In the sender communication channel for the scenario mentioned above, if the processing mode is given as delete, the input file will be delete as soon as the file was successfully read by the adapter, but this will not ensure that the file processing is complete and the output file is being created.
    If we have a scenario in such as way that the input file should be deleted from the input folder only if the complete process is successful and the output is generated. how can we achieve this functionality?.
    And one more thing if we got the successful output the output file should be placed in one folder. and the if the output file is having errors it should be placed in other folder.

    Hi,
    In Receiver communication channel I have used the below command in Run Operating System
    .And I have kept the processing mode of sender communication channel as test.
    cmd.exe: /C "del /Leela/test.xml"
    You are running the comman line program configured in the receiver File Adapter,but in command line you mentioned the Sender File Folder , So i guess it's not getting processed.
    Try this:
    Try to run the command line in the Sender File Adapter Side
    "Place this in " --> Run OS Command After Message Processing.
    Hope this would work and get in parrallel with u r requirement.
    regards
    Srini

  • SQL Loader deletes data, after reporting a file not found error

    I have several control files beginning:
    LOAD DATA
    INFILE <dataFile>
    REPLACE INTO TABLE <tableName>
    FIELDS TERMINATED BY '<separator>'
    When running SQL Loader, in the case of one particular control file, if the file referenced does not exist, SQL Loader first reports that the file could not be found, but then proceeds to delete all the data in the table in which the import was meant to take place. The corresponding log file reveals that the file could not be found, but also states that 0 records were loaded and 0 records were skipped.
    In the case of all other control files, if the file is not found, the log files simply report this exception but do not show any statisitcs about the number of records loaded/skipped nor does SQL Loader delete the data in any of the referenced tables. This is obviously the expected behaviour.
    Why is SQL Loader deleting the data referenced by one particular control file, even though this file does not exist and the corresponding log file has correctly picked up on this?

    in the ressource name box of your file model, when you push the search button ("...") do you see the file ?
    Cause the problem can occur when you write directly the path without selectionning the file with the assistant.
    Try this.
    I think too that that you can't see the data by right clicking and selectionning View Data ?
    Let me know the avancement...

  • How to remove zip file after unzipping the file

    I'm trying to delete zipfile in my program after unzipping the file. any suggestions? provide any sample code.
    Thanks
    kishore

    File.delete()

  • Illustrator won't open a file after a previous file was closed

    First of all, I've been using Illustrator since it first came out (87? 88?) but in all those years, have never encountered the following problem:
    After opening and closing an Illustrator file, I can not open any other Illustrator file without quitting the Illustrator app. I get no error messages, the program does not lock up or crash, it simply does nothing. It does not matter if the file I am opening (or the file just worked on) is a newly created one, or an older file, complicated or simple file, 1-color or multi. In other words, it does not seem to be related to the files.
    The only way to open a new file after closing a previous file is to QUIT the Illustrator application.
    In the old days, if an oddity would occur, deleting the app's pref file usually worked, though it's been years since I've had to do this. Is deleting the pref file still safe/recommended?
    Here are some specs:
    What I've tried:
    Cleared font cache
    Repaired disk permissions
    Run diagnostics (all clean as a whistle)
    System and app specs:
    2.66 ghz Intel iMac OS 10.6.8, 4 gig ram
    Illustrator CS5 15.0.2
    Does anyone have any suggestions? Thank you so much in advance...
    Susan

    Deleting the prefs is safe, worst that can happen is the setting for scale strokes and effects might get reset.
    Reset your preferences.
    Cmd-Opt-Ctrl-Shift when restarting AI on a Mac.
    Have you tried all the different methods for opening a files, drag and drop to AI  on dock, open command.

  • TS3682 how do you restore your old ipod file after restoring new file?

    how do your restore your old ipod back onto your ipod file after acidently losing your new ipod file

    i mean that i got a new ipod 5 generation but  then since my ipod forth generation was still on itunes, i accidently replaced all the info from my 5 generation and replaced it with the info from my fourth generation by clicking restore backup

  • Locating files after changing iTune file location

    iTunes 7 XP Pro
    I changed the default location and moved the contents of the iTunes Music folder, however iTunes does not automatically recognize the new location for existing files. Is there anyway I can globally change the location in iTunes so I do not have to change the location of hundreds of files one at a time?
    Thank you

    The location you set in preference only sets the location for all FUTURE additions to the library. Anything already in your iTunes library will remain in the location they were already being accessed.
    If you want to move all the files to the new location, then use the consolidate command. This command copies all files not located in the preference location into that location, thus consolidating them to one location. As I said, I think it copies, not moves the files. So after a consolidate, you may need to go and delete the old locations manually.
    Patrick

  • How do i play my videos in flash file after moving SWF file to website?

    Hello all,
    I am having some problems showing my videos in flash after moving it anywhere besides my computer.
    I published my flash file once as a exe. file and sent it to another computer, where it all worked but my videos, which didn't show up at all.
    I also published them as SWF files, then put them up on my free website (where i don't have access to the ftp) and the videos still aren't there.
    The videos will play fine in an SWF file on my computer, but i am assuming when they are away from the videos, they don't have a source to access them.
    I also tried sending the videos along with the SWF files when sending to other computers and it still doesn't work.
    I now have a free hosted website (with wix.com if that makes any difference) with my flash work on, but no videos. I even tried to embed a youtube video into the scenes the videos are meant to appear, and put the videos on youtube, then i discovered you can't put that sort of HTML into flash.
    Does anyone know how to show the videos on these sort of website, or even better, how to keep them in original file when sending them, so they show on other computers.
    Sorry if I've waffled but I'm trying to clear up my situation .
    Any help would be super, many thanks,
    Flasher87

    i am using the website wix, so in order to put the swf file up you just click the "Upload SWF" button, so i don't know how i could put the videos along with the swf, the swf is just sat on the page once i upload it.
    second, when using this type of website do you know how i'd go about giving the website the permissions to play flv files?
    Thank you.

  • Download problem with JSF: Cannot open PDF-file after opening WORD-file

    Hello,
    I have a JSP (created with Java Studio Creator) which displays a table with links to different files. Some links open PDF-documents, other for instance DOC-files (msword). I download the file as follows:
    public String downloadFile(String fileName) {
    try {
    int dotIndex = fileName.lastIndexOf('.');
    String fileExtension = "";
    String contentType = "";
    if(dotIndex > 0) {
    fileExtension = fileName.substring(dotIndex+1, fileName.length());
    contentType=CONTENT_TYPES.get(fileExtension.toUpperCase()).toString();
    if(!fileExtension.equals("") && !contentType.equals("")) {
    // method that reads file to the byte array
    byte[] fileContent = getContentOfFile(new File(fileName));
    FacesContext faces = FacesContext.getCurrentInstance();
    HttpServletResponse response = (HttpServletResponse) faces.getExternalContext().getResponse();
    response.setContentType(contentType);
    response.setContentLength(fileContent.length);
    response.setHeader("Content-disposition", "inline; filename=\""+fileName+"\"");
    try {
    ServletOutputStream out;
    out = response.getOutputStream();
    out.write(fileContent);
    } catch (IOException e) {
    e.printStackTrace();
    faces.responseComplete();
    catch(Exception ex) {
    return ("!!!ERROR: downloadFile(fileName) - Could not completely download file "+ fileName + ex.getMessage());
    return "";
    contentType is application/pdf if it`s a PDF-file or application/msword if it`s a word-file.
    fileName contains the full file path.
    link-properties:
    <ui:hyperlink action="#{showOriginalPDF.hyperlinkShowPDF_action}" binding="#{showOriginalPDF.hyperlinkShowPDF}"
    id="hyperlinkShowPDF" immediate="true" onClick="testSubmit()" target="_blank" text="#{currentRow.value['display']}"/>
    and the code of the JS-function testSubmit() (without this function I couldn�t get the right row selection in the hyperlink-table):
    function testSubmit() {
    document.getElementById('form1').submit();
    return false;
    All pdf-links are working fine and the correct document is displayed in a new browser window. but if I open a WORD-document and after that I click on another link to a pdf-file, the WORD-file is loaded again in the new window. Only if I close the window which contains the WORD-document, I can download the correct pdf after that.
    Is something wrong with the response header (I tried "attachment" instead of "inline" too but without effect)?
    Can anybody help?

    More than you asked for but good stuff. Permissions is buried in there somewhere.
    Reading
    [Resolve startup issues and perform disk maintenance with Disk Utility and fsck|http://docs.info.apple.com/article.html?artnum=106214]
    [Using Disk Utility in Mac OS X 10.4.3 or later|http://docs.info.apple.com/article.html?artnum=302672]
    [Disk Utility's Repair Disk Permissions 10.0-10.6|http://docs.info.apple.com/article.html?artnum=25751]
    "Try Disk Utility" (modified from [http://support.apple.com/kb/TS1417])
    1. Insert the Mac OS X Install disc that came with your computer (Edit: Do not use this disc if it is not the same general version as what you have currently on your computer, e.g. use a Tiger disc for a Tiger drive, not a Panther disc), then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu. (In Mac OS X 10.4 or later, you must select your language first.)
    Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.
    3. Click the First Aid tab.
    4. Click the disclosure triangle to the left of the hard drive icon to display the names of your hard disk volumes and partitions.
    5. Select your Mac OS X volume.
    6. Click Repair. Disk Utility checks and repairs the disk.
    Then boot in Safe Mode, (holding Shift key down at bootup; takes longer to boot this way so be patient), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    [Mac OS X: Starting up in Safe Mode|http://docs.info.apple.com/article.html?artnum=107393]
    [What is Safe Boot, Safe Mode? (Mac OS X)|http://support.apple.com/kb/HT1564]
    [Safe Boot takes longer than normal startup|http://docs.info.apple.com/article.html?artnum=107394]
    [Mac OS X 10.4, 10.5- Computer shuts down during Safe Boot|http://support.apple.com/kb/TA24054]

  • How to send 0-bit confirmation file after the original file upload finished

    Hi All,
    We are using Receiver FTP adapter (FTPS, FTP over SSL) to send/upload a Idoc file to external partner FTP server.
    Along with the IDOC file to be uploaded, and as soon as the IDOC file upload is finished, we will need to upload a 0-bit "confirmation file", thus indicating that the (main) file upload has finished.
    For example, if the IDOC file is named        example.idoc
    the confirmation file has to be named        example.idoc.cnf
    We are thinking to use "Run Operating System Command After Message Processing". Can someone give us more information if we can use this? if so what would be the command line??
    Thx
    N@v!n

    Hi,
    ok - to this solution: if you want to use (it would be possible), you must create repository objects for this (flagfile) and also directory objects.
    but other solutions:
    a, you can create a script in target system and call this script from the adapter (which would create a file)
    b, I'm not sure if there is a command for creating a file, but there is defe=inetely one for copying it. So what about storing some ampty file in location /template/ for example and call cp command from the adapter? and you would place this copy to required location
    Peter

  • Time Machine backing up huge files after opening wmv file in QuickTime

    Good evening to everyone;
    I have noticed that after I open wmv file (or any file that needs conversion) in QuickTime; the next TM back up backs up 10+ GB to my Time Capsule. Can anyone pls explain to me where can I find this big file so I can exclude it from the back ups?
    And maybe why are they even created?
    Not sure if it is relevant but I also have Perian 1.1 and Flip4mac latest version installed, which lets me open all kinds of files in QuickTime.
    Thanx a ton

    Might be that the Quicktime cache is hiding the data. In the Users>Libraray>Caches>Quicktime>Downloads, you'll probably see a pile of items. I've never gotten rid of all of them, but you can give it a try. Post back if you find anything interesting out.

  • Messeed up files after moving Itunes file

    ahhhh, someone help me please!!!!
    I wanted to move the C:\Muziek\Itunes to D:\Muziek\Itunes when I did, the question came if I wanted to move all files that where on C:\Muziek\Itunes to the "D\muziek drive.
    I chose YES. but now all my files that where allready on this D\muziek are messed up.
    Alle the complete albums that where on it are gone and all tracks are separated from each other!!!
    Can some one telle me how to undo this??? I tried with systemrecovery but no luck...
    please help!!!
    Rutger

    - get all your music into one folder.
    - in iTunes preferences set the folder you want to store your music or whatever.
    - then . . .
    - in iTunes select "add to library"

Maybe you are looking for