How to delete a file when it is open ?

Hi all,
I want to delete a file even it is open, and that should be deleted with out exiting the program itself. By using deleteOnExit() method of File class it is possible, but it is not valid for all types of files, and it works if we exit the program only.
I need a way to delete a file even it is opened, and we should not use deleteOnExit() method to achieve it.
Help appreciated ...

Not possible.

Similar Messages

  • How to delete ear file when it is installed as library

    Hi All,
    I have installed one ear file as (library not as application) in WEBLOGIC server but I am not able to delete it as it is not visible in deployment screen.how to locate this file and delete it so that I can install new one .
    Thank
    Sumit
    Edited by: user8687839 on Jan 7, 2010 10:21 PM

    Hi Sumit,
    Option 1). Open Config.xml and delete the Entry for your Shared Library and then Restart the Server.
    Option 2). Use the Following ANT build to undeploy your Application
    http://jaysensharma.wordpress.com/2009/12/19/ant-to-deploy-applications/
    While using this ANT script Just make a small change put library="true"
    <target name=”undeploy”>
    <wldeploy action=”undeploy”
    name=”${deploy.name}”
    failonerror=”false” user=”${wls.username}”
    password=”${wls.password}” verbose=”true”
    adminurl=”t3://${wls.hostname}:${wls.port}”
    targets=”${deploy.target}” library="true" />
    </target>
    Option3). Login to AdminConsole---> Deployments -->Customize this table(Click Here) --->Exclude libraries when displaying deployments (UNCHECK) this checkbox
    Thanks
    Jay SenSharma
    http://jaysensharma.wordpress.com (WebLogic Wonders Are Here)
    Edited by: Jay SenSharma on Jan 8, 2010 5:18 PM

  • In adf,how to delete a file generated on server,when the webpage is closed

    Hi,
    I have an application consisting of 2 pages. in the 1st page i will give some input details and when i click on submit, some java code is getting executed in the back. That java code generates a csv file in the server location. after succesful execution of java code, i was redirected to 2nd page. In 2nd page, i am giving option to download and when the user clicked on download button and after the file is downloaded -- in the backend i am deleting the file from the server. Till this point everything is fine. But if the user didnt click on the Download button and instead if he closes the browser, the csv file gets remained on the server itself. This is the issue i am facing .. I am not able to get an idea in ADF Framework, how to delete a file when the browser is closed. Please help me out in this.
    Thanks in advance !!!

    ADF has nothing to do with tracking browser close buttons. What you can do is call a JS function and call the method which deletes the file from within the JS function. ADF has a component for calling java code from JS call.

  • How to delete a file in Keynote Remote for iPhone4?

    Any one know how to delete a file in Keynote remote app for iPhone4? I uploaded a Keynote file from iDisk to my iphone and I can't delete the file. The file does not show up when I connect my phone to iTunes.
    I also cannot connect my Iphone to Keynote anymore because of this file.

    The file is actually in the Keynote app and not the Keynote remote app for iPhone.

  • How to delete recent file history in adobe reader in Mac PC ?

    How to delete recent file history in Adobe Reader in Mac PC ?
    In Adobe Reader - Edit - Preferences - select Documents in the left panel and change the "Documents in recently used list" to 0. Yes ! the file history is gone But when you set back the value, you will see the file history again. This is not the way to do...
    I have checked all the preference or setting. I couldn't found any clear recent file history in adobe reader.
    Please help ! Thanks !

    First off, you CANNOT set recent documents to zero. The absolute minimum it will accept is 1. And on my MacMini, (I just checked it to be 100% sure) I opened seven documents with Recent Docs set to 10 - they were ALL listed. I set it to 1 and all but the most recent cleared. I then closed Reader and reopened it. The list was 1 item. I reset Recent Docs to 10 and there was still only 1 item in the list.

  • How to delete archivelog file at standby database

    Hi All,
    I'm running Physical Standby Database on ASM. At standby database, I can see all logs using asmcmd:
    ASMCMD> ls
    thread_1_seq_14.330.625772527
    thread_1_seq_15.346.625772527
    thread_1_seq_16.329.625772527
    thread_1_seq_17.327.625772559
    thread_1_seq_18.324.625772599
    thread_1_seq_19.341.625772367
    thread_1_seq_2.325.625772329
    But when I run RMAN to delete all these archivelogs, its give me error:
    oradr:/u01/app/oracle$rman rcvcat rman/rman@rman target /
    Recovery Manager: Release 10.2.0.3.0 - Production on Thu Jun 28 13:50:41 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    connected to target database: AIXDB (DBID=2438430915, not open)
    connected to recovery catalog database
    RMAN> delete archivelog all;
    Starting implicit crosscheck backup at 28-JUN-07:01:50:56
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of delete command at 06/28/2007 13:50:56
    RMAN-12010: automatic channel allocation initialization failed
    RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog
    RMAN> register database;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of register command at 06/28/2007 13:51:06
    RMAN-08040: full resync skipped, control file is not current or backup
    Even it is not registering it. So how to delete archivelog file at standby database.
    Thanks in Advance
    Rakesh

    This appears related to Bug 3298797 that was supposed to be fixed in 10.2.0.1. The workaround is to switch over to the standby, register the standby and then switch back.

  • Question:  why isn't how to delete a file available.

    How come you have to search for the information on how to delete a file from Adobe Reader.   This should be in the instructions on how to use with how to download.  Does anyone agree?

    If it is a system file and even if the file is corrupted, it cannot be deleted.
    Try reinstalling phone software using Nokia suite if the phone supports Nokia suite and an USB port.
    -------------------If this post helped you, click on accept as solution.------------------
    -----------------------------Appreciate by clicking on white star.----------------------------

  • Anyone knows how to delete a file from a directory?????

    hi there
    anyone has any idea on how to delete a file from a directory? delete(String filename)? thank you.

    Hi,
    Check this link.
    Gives you an example code to show how to delete a file.
    http://examples.oreilly.com/jenut/Delete.java
    Hope this helps.
    Roopasri Vittal
    Developer Technical Support
    Sun Microsystems
    http://sun.com/developers/support

  • How to delete the file with space in name

    Hi
    I want to delete the file "test ex.txt" file.
    i run the following command in command prompt.i can delete the file successfully.
    /bin/rm -f /mnt/"test ex.txt"
    I want to run the command from java.So i am using the following code
    String cmd = "/bin/rm -f /mnt/\"test ex.txt\"";
         Runtime rt = Runtime.getRuntime();
    process = rt.exec(cmd);
    The file was not deleted.
    How to delete the file with space in name?
    Help me

    Use the form of exec that takes an array of command + args.
    arr[0] = "/bin/rm"
    arr[1] = "-f"
    arr[2] = "/home/me/some directory with spaces";Or use ProcessBuilder, which is the preferred replacement for Runtime.exec, and which Runtime.exec calls.

  • How to delete zip files on iPhone

    I'm using Safari on iPhone 5S (iOS 8.1.3) to surf the web. Unfortunately, it downloaded a .zip file. I don't know how to delete it.
    I try to open it in a app and delete it in that app. However, opening the safari this file's still there.
    Thanks for your help.

    Hi, hduc.yds.  
    Thank you for visiting Apple Support Communities.  
    I understand that you are experiencing an issue with Safari for iOS.  I would recommend clearing all website data, force closing Safari and restart the phone.  One this is done test the results.  
    Clear information from your device
    To clear your history and cookies from Safari in iOS 8, tap Settings > Safari > Clear History and Website Data. In iOS 7 or earlier, tap Clear History and tap Clear Cookies and Data.
    To clear other stored information from Safari, tap Settings > Safari > Advanced > Website Data > Remove All Website Data.
    Safari web settings on your iPhone, iPad, or iPod touch
    Force an app to close in iOS
    -Jason H.  

  • How to delete  Plugins files in Library

    Hello guys.
    I am using AU plugins called Aalto .I saved files.
    That makes Logic keep crashing.
    So I wanna deleted the files I saved.
    I try to find a folder to removed it but I cound not find it .And try reinstall plugins and loading again but still the files is there. I dont get it.
    Can somebody help that how to delete the file  " Test version recoding ,Welcome to Aalto."?
    Please help.
    Thanks.
    Luna
    CCCcan

    If the cache path is to this folder then go with purging or else stop bi service and delete

  • How to delete temp files in /u99/temp/obiee_tmp

    Hi All,
    We have 50gb on /u99 but it got filled suddenly 35gb. While checking I found that following files are created with 7.1 gb size.
    nQS_7676_24_20578926.TMP
    Can someone please help us how to delete these files.
    1. Will running purge_cache.sh scripts clears these files?
    2. Can we delete these files manually?
    We have Oracle Business Intelligence 10.1.3.4.1
    Thanks in advance.

    If the cache path is to this folder then go with purging or else stop bi service and delete

  • Very Urjent: How to delete temporary files on the server.

    EBS:
    We are facing a big issue with huge volume of temporary directory.We have created invoice program which uses Bursting concept. Every concurrent program is erroring out. How to delete those files automarically.
    Where these temp files are getting stored. How can we delete them once the concurrent request is completed.
    Please help me..its a huge issue. Thanks in advance.

    Sorry Steven,
    I saw your solution. Thanks for that. But I just want to know, do we have any setups in XML Publisher Administrator or bursting control file to delete the files automatically once the concurrent request is completed.
    And one more thing I found is, In the xml administrator, General properties i have specified the temporary directory as '/tmp'. But all the temporary files are loading in '$XDO_TOP/temp' directory. Why is this..

  • How to delete temporary files on IPAD2?and is it possible or required!

    Dear all ,how to delete temporary files on iPad2

    Other than the browser items that King Penguin has described for you, there are no temporary files that are stored on the iPad. The iPad iOS does not work the same that a computer's OS works. There is nothing to delete.

  • How to delete locked files on flashdrive

    how to delete locked files on flashdrive

    1. Unlock them. http://support.apple.com/kb/ts1402
    or
    2. Format the drive.

Maybe you are looking for