How to log the output from cmd tree command using Apache Ant exec task?
- by S.N
Hi,
I am trying to log the output from cmd tree command using ant with the following:
<exec dir="${basedir}" executable="cmd" output="output.txt">
<arg value="tree" />
</exec>
However, I am seeing the following in the "output.txt":
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
When I run the command in the windows cmd:
C:\tree>tree
I get something like:
C:\tree
+---test
+---test
Can anyone tell me how to write a Ant script to print the tree structure in to a file?