Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Java in General and the fly likes files are not delete Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "files are not delete " Watch "files are not delete " New topic
Author

files are not delete

Rajesh vamisetti
Greenhorn

Joined: Dec 27, 2009
Posts: 1
i hava some file in diffrent folder in that files are not delete in windows o/s The same code is woking file in linex Please help me if any one Knows


Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Welcome to the Ranch ! Next time, don't forget to UseCodeTags to make your source more readable. I've added them for you.


[My Blog]
All roads lead to JavaRanch
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4637
    
    5

Yes, welcome to the Java Ranch. It would help us to help you if you can cut your code down to a much smaller size. For a file opening error, can you get it down to ten lines or so of real code directly relating to the problem?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19543
    
  16

If a file cannot be deleted it means it is still in use. That can be by an external program, or you may have forgotten to close a Reader, Writer, InputStream or OutputStream for the file.

You can check which process still holds locks on the file using the free tool Process Explorer. Start it up, select Find -> Find Handle or DLL..., type in the name of your file and press Search. You then get a full list of all processes that have a lock on any file that matches your search criteria. If this list is empty after you close the JVM then the problem must be in a remaining open reader, writer or stream.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: files are not delete
 
Similar Threads
FTP with sun.net.ftp.
Strange File Behavior
ZipInputStream problem
Copying files
Unable to Delete Folder + I can't belive i m posting this :(