>From personal experience, Win2k seems to be especially bad with keeping open
file handles on NTFS volumes (even if explorer isn't showing it). My
solution was to use a FAT partition for development.
Hope thats of use to someone.
Rob
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Glenn McAllister
> Sent: 22 January 2001 18:02
> To: [EMAIL PROTECTED]
> Subject: Re: delete and mkdir problem
>
>
> Sibon Barman wrote:
>
> > Hi all,
> > I have the following target in my build script:
> > <target name="real-clean">
> > <delete dir="${classes.dir}" />
> > <delete dir="${lib.dir}" />
> > <delete dir="${javadocs.dir}" />
> > <mkdir dir="${classes.dir}" />
> > <mkdir dir="${lib.dir}" />
> > <mkdir dir="${javadocs.dir}" />
> > </target>
> >
> > But once in a while it is not successful in creating all 3 directories.
> > Sometimes it works --- sometimes it doesn't. Can somebody help
> me with this
> > unpredictable problem? This error also occurs when I am in the
> lib.dir or
> > classes.dir from Windows Explorer and the ant script tries to
> delete them
> > and create them ---- could that be the problem?
>
> If there is any process that has an "open" handle on the directory you are
> trying to delete or create, the <delete> and <mkdir> tasks will
> fail. I used
> to have this problem a lot when I was testing builds on my WinNT box. The
> upshot is, never have Explorer open on any directory you are
> working with in
> your build. Its safer that way.
>
> >
> >
> > My second question is how can I delete everything underneath classes.dir
> > with removing the classes.dir?
>
> I'm assuming you mean "without" removing classes.dir:
>
> <delete>
> <fileset dir="${classes.dir}" />
> </delete>
>
> Glenn McAllister
>