View Single Post
  #1 (permalink)  
Old August 3rd, 2011, 07:47 AM
raju.sathliya raju.sathliya is offline
Registered User
Points: 14, Level: 1
Points: 14, Level: 1 Points: 14, Level: 1 Points: 14, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Aug 2011
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default Nant Logger problem

I need to create log file for my each build and for this I'm using command line as
nant -logfile:output.txt

So above command is generating log file at same location at which my build script "" is running (let say C:\build) and log file (output.txt) is Ok and contains all the required data

but I want to move Or copy each of generated log files to new location which will be created by variable are passed to script and for this I'm using below target to copy log to new directory

<target name="build">

<mkdir dir="${logger.dir}" if="${not directory::exists(logger.dir)}" />
<some command to compile solution>
<copy file="C:\build\output.txt" tofile="${logger.dir}\webbuild.${}.txt" overwrite="true"/>


above target is copying empty webbuild.${}.txt without any data.

I did some investigation and found that since nant is using output.txt in above commandline (i.e nant -logfile:output.txt so It's not allowing to me to copy Or move output file to new location.

Can anyone suggest me some solution for this ..As what approch I should follow to make this posible.

note : after my commandline completes then only I can copy the file..but i need to copy/move generated log file to new location at one go using same above commandline


Last edited by raju.sathliya; August 3rd, 2011 at 07:55 AM..
Reply With Quote