Comments (7)
Just a bit of background as I believe you are referencing some of the work that I did to the move task that was backed out prior to 0.91 release. That work was to introduce a simplified way of moving entire directories with the move task. It was backed out because there was question/concern with the proposed syntax as well as how it functioned internally. I do have plans of taking another stab at it but it'll take a bit of time.
In the meantime, the move task today can move entire directories with the following example:
<move tofile="target/dir">
<fileset basedir="source/dir"/>
</move>
It's a bit of a wrist cramper but it works.
Hope this adds clarity.
from nant.
I found that in the documentation, but it doesn't seem to actually work. It in fact seems to do nothing. For example:
<target name="build">
<mkdir dir="a"/>
<mkdir dir="a/test"/>
<touch file="a/test/stamp" />
<move tofile="b" verbose="true" includeemptydirs="true">
<fileset basedir="a" />
</move>
</target>
produces:
build:
[delete] Deleting directory 'C:\src\nantest\a'.
[mkdir] Creating directory 'C:\src\nantest\a'.
[mkdir] Creating directory 'C:\src\nantest\a\test'.
The mkdir and touch calls do their thing, but when it gets to the move task, it seems to silently decide that there's nothing it needs to do. No messages, warnings, or errors.
If I change tofile to todir, and add an in the fileset, then it moves all the files over, but leaves all the directories behind.
I ended up resorting to calling out to cmd.exe via the exec task for my scenario, esp. since it's important for me that the directory rename be atomic, and not leave partial results behind if there is a file locking error.
from nant.
Ok, I'll take a look.
from nant.
Yeah, there is an issue here. This task is assigned to me. My work for this issue will be done here.
from nant.
I believe I have addressed this issue in the referenced pull request but it needs review. If you are interested, please take a look and see if this fixes it.
from nant.
Just merged Pull Request #39 that should address this issue. The next nightly build (should be built tomorrow) should have this fix included. In the meantime, I'll close this ticket.
from nant.
think your syntax is just wrong. should use todir not to file. try...
On Fri, May 23, 2014 at 11:33 AM, andrewducker [email protected]:
I'm trying to do this - and failing. If I use the following then I get an
exception:System.NullReferenceException: Object reference not set to an instance of
an object.
at
NAnt.Core.Tasks.CopyTask.FileOperation.TargetDirectoryDoesNotExist(DirectoryInfo
source, DirectoryInfo target)
at NAnt.Core.Tasks.CopyTask.ExecuteTask()Is this related to the above error? We're using Nant 0.92
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/11#issuecomment-44026211
.
from nant.
Related Issues (20)
- About long path support HOT 2
- nant.sourceforge.net has been down for a while HOT 4
- makefile usage reasons HOT 1
- Mail Task doesn't play nicely with TryCatch Task HOT 2
- Licensing question HOT 3
- OnBuildSuccess vs. OnSuccessfulBuild in csproj files HOT 1
- <script> failed on mono 4.2 HOT 8
- System.OutOfMemoryException starting yesterday HOT 1
- It seems like nant does not support ".net framework 4.6.1" now. HOT 3
- Package new binary release on sourceforge to get bug fixes HOT 4
- Road Plan for nant project HOT 2
- Build failure on current master branch HOT 1
- Question: Any plan for .NET Core support?
- How to embed an application manifest using CSC task HOT 1
- exec program="java" fails if JDK7 & JDK8 are installed
- NAnt does not find .NET SDK 4.8 when compiling for .NET4.0
- <get /> fails on certain websites
- nant does not support ".net framework 4.8"
- Null pointer due to absent registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows on Windows 10 64bit HOT 6
- NAnt2 fork
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nant.