473,386 Members | 1,835 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

aFile.delete() strangely fails

Good afternoon. On windows 2000 -

aFile.exists() returns true
aFile.canRead() returns true
aFile.canWrite() returns true

....and immediately afterwards aFile.delete() returns false
and the file is not deleted.

Any ideas why?

Ron.



Jul 17 '05 #1
3 5403
"Ron Brennan" <rb******@magma.ca> wrote in message
news:Ru********************@magma.ca...
Good afternoon. On windows 2000 -

aFile.exists() returns true
aFile.canRead() returns true
aFile.canWrite() returns true

...and immediately afterwards aFile.delete() returns false
and the file is not deleted.

Any ideas why?

Ron.

Maybe it's in use by another process?
Jul 17 '05 #2
That would make sense. It looks like maybe an abnormally ended process but
be the culpret. I haven't found it yet but I'm still looking.

"Ryan Stewart" <zz********@gSPAMo.com> wrote in message
news:4M********************@texas.net...
"Ron Brennan" <rb******@magma.ca> wrote in message
news:Ru********************@magma.ca...
Good afternoon. On windows 2000 -

aFile.exists() returns true
aFile.canRead() returns true
aFile.canWrite() returns true

...and immediately afterwards aFile.delete() returns false
and the file is not deleted.

Any ideas why?

Ron.

Maybe it's in use by another process?

Jul 17 '05 #3
Good morning.

The problem turned out to be my not closing an ImageInputStream and an
ImageOutputStream:

try {
anImageInputStream.close();
} catch (IOException e) {
}

Ron.

"Ron Brennan" <rb******@magma.ca> wrote in message
news:Ru********************@magma.ca...
Good afternoon. On windows 2000 -

aFile.exists() returns true
aFile.canRead() returns true
aFile.canWrite() returns true

...and immediately afterwards aFile.delete() returns false
and the file is not deleted.

Any ideas why?

Ron.


Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Alexander Anderson | last post by:
I have a DELETE statement that deletes duplicate data from a table. It takes a long time to execute, so I thought I'd seek advice here. The structure of the table is little funny. The following is...
9
by: Robert Schneider | last post by:
Hi to all, I don't understand that: I try to delete a record via JDBC. But I always get the error SQL7008 with the error code 3. It seems that this has something to do with journaling, since the...
5
by: ms | last post by:
Why does this select query return the correct records but when I make it a delete query I get a msgbox with "Could not delete from specified tables". SELECT BMIDLog.* FROM stageBMIDLog INNER...
14
by: Darin | last post by:
I have a table that I want to delete specific records from based on data in other tables. I'm more familiar with Access '97, but am now using 2003, but the database is in 2000 format. In '97, I...
2
by: Robert Rotstein | last post by:
I’m running an ASP.NET web service which dynamically creates a registry key, stores some values in it, then, on a subsequent call to another method in the service, attempts to delete the key. The...
2
by: nholtz | last post by:
Is there any way to delete a widget (window) from a Text widget, and then add it back to the Text, without re-creating the original widget. For example, I think I would like to do something like...
9
by: Alex Vinokur | last post by:
What is difference between delete p; and delete(nothrow)p; ? -- Alex Vinokur email: alex DOT vinokur AT gmail DOT com http://mathforum.org/library/view/10978.html
12
by: Premal | last post by:
Hi, I tried to make delete operator private for my class. Strangely it is giving me error if I compile that code in VC++.NET. But it compiles successfully on VC++6.o. Can anybody give me inputs...
16
by: busterbaxter | last post by:
Hi All, I got a multiple delete working here but for some reason I occassionally get this error. The way the delete works is there is a text box where the user enters the quantity to delete. If...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.