Hey guys, I had made a mistake in my test script to see if it failed when trying to deleted a directory that does exist. It does indeed fail, likely due to access permissions, as I cannot delete the file through explorer either. However, I'm still curious as to why delete is silent when the UNC path passed to it does not exist?
On Thu, Feb 26, 2009 at 6:02 PM, Dominique Devienne <ddevie...@gmail.com>wrote: > On Thu, Feb 26, 2009 at 11:28 AM, Dave <davidcor...@gmail.com> wrote: > > The following reduced test case shows the problem. I've tested this with > Ant > > 1.7.1 and JDK 1.4.2_19 > > ======================= > > <project name="delete-UNC-test"> > > <property name="out.parent.dir" > > value="\\my-unc-path-that-does-not-exist\tmp"/> > > <delete dir="${out.parent.dir}" verbose="true"/> > > </project> > > ======================= > > > > Can anyone help me with this? > > UNC paths are so troublesome... > > You could try with <property location=""> instead of using the value > attribute. > If that doesn't work, you could force the script user(s) to map it to > a drive letter. > If that doesn't work, resort to <exec> using the DOS "cmd" shell as > executable and using a DOS command to delete the dir (if you use > absolute UNC paths, you're likely Windows only, no? If not, the os > attribute of Exec can restrict the <exec> for a specific OS like > windows). > > --DD > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@ant.apache.org > For additional commands, e-mail: user-h...@ant.apache.org > > -- "A lot of people are afraid of heights. Not me, I'm afraid of widths."