PC Review


Reply
Thread Tools Rate Thread

ANT 1.5 unable to delete directory

 
 
Michael Giroux
Guest
Posts: n/a
 
      9th Jul 2003
I'm running Windows XP with 512 mb memory on 1ghz processor.

I am running an ANT script (www.apache.org) that creates a directory, unzips
several files into the directory, then later deletes the directory. the
delete is performed using the ANT <delete dir='classes'/> task.

The task fails because it gets an error trying to delete an empty
sub-folder. As the directive recurses through the sub-folders in the
classes directory, it deletes all the files, then deletes the empty folder.
ANT is getting an error trying to delete the empty folder.

Looking at the verbose output of the script, it actually appears that the
error occurs only when the last entry deleted (successfully) was also a
directory, but this may not be related.

ANT is a Java application, I'm not sure exactly what logic it might be using
to implement this <delete> task, but it seems there must be some API it is
calling that manages to cause an overlap between the time needed to delete
the last sub-folder, and the time ANT tries to delete the parent folder,
thus causing the delete to fail because of the outstanding reference.

Has anyone seen anything similar?


 
Reply With Quote
 
 
 
 
Mark Zbikowski \(MSFT\)
Guest
Posts: n/a
 
      11th Jul 2003
There may be a problem with "hidden" or "system" files in these
directories. Use ATTRIB * to see if there are any files left over
and use ATTRIB /-H /-S to unmark them so you can delete
them.


--
Disclaimer: This posting is provided "AS IS" with no warranties, and confers
no rights.


"Michael Giroux" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm running Windows XP with 512 mb memory on 1ghz processor.
>
> I am running an ANT script (www.apache.org) that creates a directory,

unzips
> several files into the directory, then later deletes the directory. the
> delete is performed using the ANT <delete dir='classes'/> task.
>
> The task fails because it gets an error trying to delete an empty
> sub-folder. As the directive recurses through the sub-folders in the
> classes directory, it deletes all the files, then deletes the empty

folder.
> ANT is getting an error trying to delete the empty folder.
>
> Looking at the verbose output of the script, it actually appears that the
> error occurs only when the last entry deleted (successfully) was also a
> directory, but this may not be related.
>
> ANT is a Java application, I'm not sure exactly what logic it might be

using
> to implement this <delete> task, but it seems there must be some API it is
> calling that manages to cause an overlap between the time needed to delete
> the last sub-folder, and the time ANT tries to delete the parent folder,
> thus causing the delete to fail because of the outstanding reference.
>
> Has anyone seen anything similar?
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to delete a directory mojo.chan@gmail.com Windows XP Help 11 31st Oct 2006 10:01 PM
Unable to delete active directory object (was a user account) Scott Wilson Microsoft Windows 2000 Active Directory 2 13th May 2004 05:04 PM
users unable to delete/destroy files/folders in /users/%username%directory Rafael Block Microsoft Windows 2000 Networking 4 8th Nov 2003 09:19 AM
Re: Unable to Delete Directory Alex Nichol Windows XP General 0 15th Aug 2003 11:31 AM
Unable to Delete Directory S.Sengupta Windows XP General 2 14th Aug 2003 05:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:38 AM.