I'm, usingNAnt 0.91 (Build 0.91.3881.0; alpha2; 17/08/2010) on Windows Server 2008.
When using the <move> command i have noticed that the relative path is wrong if the file attribute starts with a /.
Here is how to reproduce the issue:
my build file is located at
--> C:\Users\Administrator\Documents\Nant Projects\Sampleproject\sample.build
if I use
-> <delete file="\folder1\file1.txt" />
the file that is located at C:\Users\Administrator\Documents\Nant Projects\Sampleproject\folder\file1 is deleted correctly.
but if I use
-> <move file="\folder1\file1.txt" tofile="\folder2\file1.txt" /> it produces an error because it tries to access a wrong file path: c:\folder1\file1.txt
removing the backslash, makes the <move> task workingcorrecly.
-> <move file="folder1\file1.txt" tofile="folder2\file1.txt" /> works correcty.. infact is uses C:\Users\Administrator\Documents\Nant Projects\Sampleproject\folder\file1.
I have reported this as a bug because all the tas's relative paths are accessed using the backslah except this one.
Basically I would not use relative paths starting with "\" since i doubt windows will use it in same way as I think.
To narrow this somewhat could you please try copy task with your relative path?
As an overall option I want to suggest to use either relative paths without "\" or put a dot infront of: "\folder1\file1.txt" would become ".\folder1\file1.txt" Then it should waork again.