Reason why file can't be deleted?

When I want to delete a file via
file.delete()
the result is false. No IOException or other Exdeption just false. But what is the reason? When I try to delete the same file from another (simple test) application, i can delete the same file (result = true).
this happens for any new files in my directory. So, how can I find out the reason why the result is false and the file is not deleted?

yes, i'm pretty shure as i open the file to zip the
content to a new zip file, closing all the
input/output streams and then to a delete on the
original file. no exception, no error it just doesn't
get deleted and the return value is false. :-(
btw: the original file is not read only or something.
the files i want to zip are generated/copied on the
fly. and after processing, i want to zip them (which
works) and delete the original unzipped files (which
doesn't work).I know the feeling. But I'm pretty sure the file you want to delete isn't in the mood to getting deleted -:). Give it another try. Explicitly close is. Then delete it.

Similar Messages

  • When i open my computer this appears "c:\Programdata\AppleVerifierPolicy.dll  the specific module caould not be found"  i think this may be the reason why i can not open itunes store

    when i open my computer this appears "c:\Programdata\AppleVerifierPolicy.dll  the specific module caould not be found"  i think this may be the reason why i can not open itunes store

    With Windows Explorer, navigate to your C:\Program Files\Common Files\Apple\Apple Application Support folder.
    Copy the SQLite3.dll that you should find there, navigate to the nearby Mobile Device Support folder, and Paste it in there also.
    Restart the programme all should be well
    In case that your OS is (64 bit)
    1. Open windows explorer, go to location C:\Program Files (x86)\Common Files\Apple\Apple Application Support
    2. Copy file "SQLite3.dll"
    3. Now paste it in the folder  C:\Program Files (x86)\Common Files\Apple\Mobile Device Support
    4. Restart the programme, it should not display that message, it should be clear.
    Good Luck

  • Is there a technical reason why I can't sync both my iCloud and Yahoo/Gmail contacts at once?

    Is there a technical reason why I can't sync both my iCloud and Yahoo/Gmail contacts at once? I would like to be able to sync between all three services.

    Definetely not. It's as simple as maintaining a single database and use it for iCloud, Google, Yahoo or any other... like it was earlier. It's just Apple being barbaric in their strategy to restrict use of competing devices and services.

  • I am trying to download i tunes onto my pc but get an error saying that some old i tune files can not be deleted before reinstalling.

    I am trying to download i tunes onto my pc (Windows XP) but get an error saying that some existing files can not be deleted to be re installed.  I have tried several time but to no avail.

    Many thanks, that's perfect.
    The older version of apple software update cannot be removed. Contact your technical support group.
    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any Apple Software Update entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install using an iTunesSetup.exe (or iTunes64Setup.exe) downloaded from the Apple Website:
    http://www.apple.com/itunes/download/
    Does it go through properly this time?

  • Files can't be deleted b/c they're 'in use'

    I'm being told that a couple of folders on another drive on my network, that I know aren't, are 'in use' and, thus, can't be deleted.
    What's this from and how can I address it?
    TIA,
    David

    If the OS is saying they're in use, they are. That message indicates that something on the boot drive is linked to the other disk or vice-versa. Quit all applications and try deleting again. If you get the same message, you'll have to track down what's open. One way is to launch the Terminal.app in /Applications/Utilities/, type in this command, hit the return key, and get the /dev/disk information for the attached disks:
    df -h
    This is an example of what you should see:
    /dev/disk0s10 52162400 35274040 16888360 68% /Volumes/<name of other HD>
    Then, enter this command, hit the return key, and peruse the output for the culprit(s) on that other drive:
    lsof /dev/disk0s10
    The only thing that should be listed is something like this, but that shouldn't prevent the disk from unmounting.
    Finder 260 username 27r VDIR 14,20 68 425847 /Volumes/HD/.Trashes/501
    If there are other processes and open files, you'll have to stop the processes. Launch Activity Monitor, check the process number that's running (in this example it's Finder w/process #260), select it, click on the Quit Process button, and click on the Quit button in the dialog box that pops up. Now, try deleting the folders.
    G4 450 MP Gigabit   Mac OS X (10.4.9)  

  • Which files can I safely delete in my Pictures Folder/ iPhoto Library

    Hello
    Thanks in advance for any advice on the following. I am trying to free up some space on my Macbook Pro hard drive. In the Pictures/ iPhoto Library folder, I seem to have a lot of duplicates. At this folder level, I have series of sub folders with years 2002-2006 listed, and there is also a folder titled data, which also has subfolders 2002-2006. Can I safely delete one set of folders without losing my pictures?
    Thank you
    Jonathan

    Johnathan:
    In a word, NONE. Those are all necessary item for the operation of the library. Those files in the Originals folder are obviously the originals. Those in the Data folder are the thumbnails iPhoto uses to display in the main library window. The Modified files are those that you've editied, rotated, etc. To do any moving, renaming or editing of files directly from the folder is tantamount to committing the cardinal sin of iPhoto: Don't tamper with files in the iPhoto Library folder from the Finder.
    What with the low cost of external FW HDs, they are a very cost effective way to protect and preserve important files. As you may know it's recommended to have a minimum of 10G free space for optimum performance of the system and applications. More if possible. You can use Monolingual to remove any language module you don't need (be sure not to select English or American English and DO NOT run any of the Architecture items). I saved nearly 900MB the first time I ran it.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've written an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • What files can be safely deleted?

    I love my 400 MHz TiBook but its 10 GB hard drive is filling up. I have approx. 1.5 GB of free space left. What files that can be safely deleted? Can I delete extraneous printer files, modem files, packages, etc? I use MacJanitor to clean out caches and I don't have any music or photo files that might be causing the bloat. Also, before I delete anything I will back my hard drive up to a FW drive with SuperDuper.

    Hi, Fred. You're wise to be thinking about how little free space you have left now, before the operation of your Powerbook is seriously impaired. But rather than just nibble away at the contents of your drive, which will only buy you a small amount of time before you're back where you started, you should be thinking about replacing your tiny 10GB hard drive with a larger one. You could easily get a 60GB drive for $50 plus the cost of shipping, and installing a drive in a Tibook is very simple — a 20-minute job at the outside. Then you'd just start up from the external FireWire drive on which you've cloned your 10GB drive, and use SuperDuper to clone its contents onto the new drive. The whole drive swap and data transfer, including the original cloning, could probably be accomplished in less than two hours. Then you wouldn't have to worry about hard drive space for a long time to come.
    For expert guidance on what you can do in the short term to regain disk space, see this.

  • HELP!  What server files can safely be deleted?

    I think it is safe to delete C:\windows\tempdirectory
    Can we safely delete C:\Program
    Files\RoboEngine\Reserved\Web348881018
    Thanks!

    I do not know how server files are set up/deleted/added so
    not sure exactly the process (using add/remove from control panel)
    my engineers are taking - they are asking me, to save disk space,
    if they can delete those old files.
    Yesterday, through another source, I found out an entire set
    of my 2007 project files might be stored on my server and will be
    looking into that today also.
    Thanks for the reply.
    Cindi

  • Duplicate folders/files can't be deleted

    Some duplicate folders/files may caused read error on the filesystem. After deleted those folders/files, the XSAN client seems work now.
    However some duplicate folders/files still automaticaly gengrated and be seen on Server side(highlighted below).Those files won't be seen on client machine and are all unable to be deleted.
    Can't you help us to figure out what's the problem?
    [root@NLEMDC-1 snfs1]# ls -lah
    total 83G
    drwxrwxrwx 14 root root 2.0K Jan 15 12:08 .
    drwxr-xr-x 4 root root 32K Jan 8 10:16 ..
    drwxr-xr-x 5 516 root 2.0K Sep 21 10:32 co
    -rw-rw-rw- 1 501 root 6.1K Jan 15 12:07 .DS_Store
    -rw-rw-rw- 1 501 root 6.1K Jan 15 12:07 .DS_Store
    drwxr-xr-x 5 516 root 2.0K Oct 1 16:34 fruit
    drwxrwxrwx 2 516 root 2.0K Jun 25 2009 koc2009
    -rw-r--r-- 1 517 root 37G Jul 14 2009 koc-color-test.mov
    drwxr-xr-x 3 505 root 2.0K May 21 2009 mac-1-backup
    drwxr-xr-x 4 516 root 2.0K May 21 2009 mac-2-backup
    drwxr-xr-x 4 501 root 2.0K Jun 5 2009 mac-4-backuo
    drwxr-xr-x 5 506 root 2.0K Sep 4 16:07 mm
    -rw-r--r-- 1 517 root 25G Jul 13 2009 sport_grd03.mov
    -rw-r--r-- 1 517 root 22G Jul 13 2009 sport.mov
    drwxr-xr-x 2 501 root 2.0K Jun 5 2009 Test Folder
    d-wx-wx-wt 2 root 80 2.0K Jan 15 16:59 .Trashes
    d-wx-wx-wt 2 root 80 2.0K Jan 15 16:59 .Trashes
    --w--w--w- 1 root 80 4.0K Jan 15 12:06 ._.Trashes
    --w--w--w- 1 root 80 4.0K Jan 15 12:06 ._.Trashes
    -rw-r--r-- 1 517 games 22K Jul 14 2009 Untitled Project 1.fcp
    -rw-r--r-- 1 517 games 19K Jul 14 2009 Untitled Project 2.fcp
    drwxr-xr-x 2 517 root 2.0K Jun 3 2009 yo

    If the OS is saying they're in use, they are. That message indicates that something on the boot drive is linked to the other disk or vice-versa. Quit all applications and try deleting again. If you get the same message, you'll have to track down what's open. One way is to launch the Terminal.app in /Applications/Utilities/, type in this command, hit the return key, and get the /dev/disk information for the attached disks:
    df -h
    This is an example of what you should see:
    /dev/disk0s10 52162400 35274040 16888360 68% /Volumes/<name of other HD>
    Then, enter this command, hit the return key, and peruse the output for the culprit(s) on that other drive:
    lsof /dev/disk0s10
    The only thing that should be listed is something like this, but that shouldn't prevent the disk from unmounting.
    Finder 260 username 27r VDIR 14,20 68 425847 /Volumes/HD/.Trashes/501
    If there are other processes and open files, you'll have to stop the processes. Launch Activity Monitor, check the process number that's running (in this example it's Finder w/process #260), select it, click on the Quit Process button, and click on the Quit button in the dialog box that pops up. Now, try deleting the folders.
    G4 450 MP Gigabit   Mac OS X (10.4.9)  

  • Pages '09 flat files can't be deleted but package files can

    Hi all
    If I save Pages '09 files in their default 'flat' format, then I can't delete them (empty trash command says files still in use, even if computer restarted and Pages closed), but if I save files as '09 packages, they are easy to delete. Anyone else come across this, or got an explanation?

    Thanks to people for suggestions. Oddly, I've found a very simple solution... if I leave the items in the Trash for a few minutes, sooner or later they become deletable (possibly helped if the computer not doing anything else). Other files are deletable from the moment they hit the trash can, so there's still something different about the pages files. I wonder if another app or process finds it hard to let them go, or some odd thing like that. So it's turning into a minor oddity/ quirk rather than major problem. I'm still a bit puzzled, but I can live with the current level of weirdness (unless it gets worse...!)

  • What files can I safely delete?

    My Premiere Pro CS2 Files are a mess!
    Since I got into HD with my Canon HV20 I've been filling internal and external hard drives like no tomorrow. My TerraByte drives are full. I have thousands of files with extensions like: PRV, CFA, DEK, MACC, XMPSES and more. I don't know what I can delete and what I need to keep, collectively they are taking up an incredible amount of space.
    Right now, I'm really hung up as I'm virtually out of space on one drive and CS2 can't conform (?) or render my movie.
    How do Premiere CS2 users organize their files - what do they keep and for how long?
    Ideas and methods would be much appreciated. Thanks.

    If the project is finished and you never need to return to it. Export an uncompressed Master and archive it with the Source files and a .proj file. Use an external drive. (I use a e sata HD docking station for this purpose.)
    Delete everything else.

  • What is a .BAK file & can I safely delete it?

    In doing a workaround to solve a stutter problem in iMovie 4, my .iMovieProj files got completely out of whack. (Yes, I had more than one .iMovieProj file for my project. That's another story.) I had to go to my external backup disk to retrieve an .iMovieProj file. Because it would be better to keep the entire folder intact, rather than just put the .iMovieProj file into the current folder, I copied the entire project folder to my Desktop.
    I deleted the current project folder and moved the Desktop folder into the iMovie folder, so now I have a previous, intact project folder, albeit a bit out of date, but at least all my videos & audios are there.
    Anyway, as I updated my project, I noticed in the Movies window I had open on the desktop, that a file: <projectname>.BAK would appear & disappear. The project name was a bit altered. I think the file appeared & disappeared when I did a save, which I now do often.
    What's going on? Should I delete this file when it shows again, or just ignore it & let iMovie 4 manage it, as apparently it's doing? On my last save, the file is not there, but it may show up, again. BTW, I noticed that the file decreased in size at one point. It's a small file, now, about 8KB as I recall.

    Just let iMovie manage it.
    When an application saves a document it's a bad idea to delete or empty the old one first and then write the new one. What if something goes wrong? A power outage or what ever.
    The proper way is to keep the old (original) file until the new one has been completely written and THEN delete it. It seems as iMovie keeps the original under the <projectname>.BAK name until the new file is written.

  • THE REASON WHY YOU CAN'T DOWNLOAD

    Having knocked myself out trying to get my DE download to work, so I can read my paid-for book, I had a look at the source code for the download page. It is a loop. Right-click on the 'download now' button, look at the properties, and you will see that the URL is the same as the page you are already on. Not going to get very far with that.
    Anyone having this problem: for the sake of all of us dumb useless users... contact the source of your eBook and ask for your money back, explaining why. It just MIGHT cause someone to repair the link.

    See my other thread - Something worked for me...
    Download works with Mozilla Firefox.

  • Trc files:  can they be deleted?

    Our Oracle 10 installation has hundreds of *.trc files in its /dbdump directory. These files go back about two years. I would like to remove any that are not necessary for the day to day operation of the db.
    Is it safe to remove any or all of these?
    Thanks,
    -=beeky

    yes its very safe to remove them...in our env we remove all the trace files 15 days old..
    find /u02/app/oracle/admin/CHIOPSWN/bdump -mtime +15 -print
    to find the files that are older than 30 days
    find $PWD -mtime +15 -print
    same thing like above,if u r in the same directory
    find /u02/app/oracle/admin/CHIOPSWN/bdump -mtime +15 -exec rm -r {} \;
    to remove the files
    find $PWD -mtime +15 -exec rm -f {} \;
    same thing like above if u r in the same directory
    find / -name "*.inst*" -exec ls -ltr 2>/dev/null {} \;
    find with long listing
    CHANGE LOCATIONS/PWD respectively

  • Is there a reason why I can't copy and paste from Illustrator to Photoshop

    Before the last update, I was able to copy and paste from Illustrator to Photoshop, and now I can't. Which really suck. Is there a new way I would have to do it?

    I'm not privy to what impact the latest update my have had, but I believe Photoshop still has "its own" clipboard, and there may still be a tendency under certain conditions for it to become inaccessible from/to the rest of the system. Reboot everything and try again.

Maybe you are looking for

  • How to write the start routine in the transformations ?

    Hi Experts, I am working on BI 7, As I want to write a start routine in transformations of 0FIGL_O02 DSO, to allow the GL accounts with cost center data. Already there is a delete statement please find. *DELETE SOURCE_PACKAGE where BAL_FLAG = 'X'. I

  • Which of the P6 web features do you use?

    Primavera P6 is the most powerful, robust, and easy-to-use solution for prioritizing, planning, managing and executing projects, programs and portfolios. If you have upgrade to P6, please tell us which of the P6 web features you use, and how we can m

  • Advert bug

    Think this is a bug and it's pretty annoying. When typing a message, a new advert appears periodically in the side bar and this causes the message box to lose focus. Consequently, I'm half way through a long message and realise that the text is no lo

  • Do i have to render every time??

    i have a simple piece of text in my browser (named the default name "text") that i use over and over in lots of sequences. i stuck a drop shadow in and now i have to render every time? is that right? i didn't have to render before; is there a way to

  • How to use a timer

    can anyone tell me how to implement a timer in my program import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Sudoku extends JApplet implements ActionListener{ JButton button [][] = new JButton [9][9] ; public void init() C