See if tf.exe has an xml option to output in xml. If it does then you can use 
xmlpeek to get the specific information you need from the xml file from tf.

Adam Bruss
Senior Development Engineer
AWR Corporation
11520 N. Port Washington Rd., Suite 201
Mequon, WI  53092  USA
P: 1.262.240.0291 x104
F: 1.262.240.0294
E: abr...@awrcorp.com
W: http://www.awrcorp.com


-----Original Message-----
From: ssingh46 [mailto:sunil1...@gmail.com] 
Sent: Tuesday, October 04, 2011 2:45 PM
To: nant-users@lists.sourceforge.net
Subject: Re: [NAnt-users] Nant Exec task output to a file


Hi Adam,

Thanks. That did work.
Now i have one more issues. This command gives below output in version.txt
file
Workspace : Test(testuser)
Collection: sder.abc.group.com
$/sample/Branches/R03: G:\TFS\sample\R03


But i need only 
$/sample/Branches/R03

Eg:myfile.txt should have only below line

TFS Branch: $/sample/Branches/R03


Adam Bruss-2 wrote:
> 
> http://nant.sourceforge.net/release/0.91-beta1/help/tasks/exec.html
> 
> Use the output attribute of exec.
> 
> <exec program="${tf.cmd}  failonerror="true" output="myfile.txt">
>       <arg line="${tfArgs}" />
>  </exec>
> 
> Adam Bruss
> Senior Development Engineer
> AWR Corporation
> 11520 N. Port Washington Rd., Suite 201
> Mequon, WI  53092  USA
> P: 1.262.240.0291 x104
> F: 1.262.240.0294
> E: abr...@awrcorp.com
> W: http://www.awrcorp.com
> 
> -----Original Message-----
> From: ssingh46 [mailto:sunil1...@gmail.com] 
> Sent: Sunday, October 02, 2011 9:10 PM
> To: nant-users@lists.sourceforge.net
> Subject: [NAnt-users] Nant Exec task output to a file
> 
> 
> All,
> I am writting one program task which runs TFS command . I would like to
> store that output to the file but iam not able to write program output.
> Below is my coomand
> 
> <property name="source.path" value="G:\TFS\" />
> <property name="Modify_Assembly" value="2.3.0.6" />
> <property name="tf.cmd" value="G:\Program Files\Microsoft Visual Studio
> 10.0\Common7\IDE\tf.exe"/> 
> <echo message="version: ${Modify_Assembly}" file="version.txt"/>
> <property name="tfArgs" value="workfold &quot;${source.path}
> /workspace:betaEngineBuild  &quot;"/>
>        <exec program="${tf.cmd}  failonerror="true">
>                    <arg line="${tfArgs}" />
>        </exec>
> 
> I just need to return TFS source path(Server) into a file (version.txt). 
> I
> can write local path which is mapped to the project but need TFS server
> path.
> 
> 
> Output 
>      [exec] Workspace : Test(testuser)
>      [exec] Collection: sder.abc.group.com
>      [exec]  $/sample/Branches/R03: G:\TFS\sample\R03
> 
> 
> My need is to have server path  $/sample/Branches/R03  written to a file
> version.txt.
> Thanks in advance.
> 
> 
> -- 
> View this message in context:
> http://old.nabble.com/Nant-Exec-task-output-to-a-file-tp32579964p32579964.html
> Sent from the NAnt - Users mailing list archive at Nabble.com.
> 
> 
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> _______________________________________________
> NAnt-users mailing list
> NAnt-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nant-users
> 
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> _______________________________________________
> NAnt-users mailing list
> NAnt-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nant-users
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Nant-Exec-task-output-to-a-file-tp32579964p32591413.html
Sent from the NAnt - Users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to