I have an xml file with ant tasks.
One of the tasks is
<mkdir dir="someDirectory"/>
How can I view the contents of this directory?
I tried
<echo>ls someDirectory</echo>
but this does not work
I have an xml file with ant tasks.
One of the tasks is
<mkdir dir="someDirectory"/>
How can I view the contents of this directory?
I tried
<echo>ls someDirectory</echo>
but this does not work
Copyright © 2021 Jogjafile Inc.
How you do it likely depends on what you need to do with the resulting information.
Here's some ideas that might help.
The first uses a
<fileset>
to gather the set of files, then thetoString
helper to show the list.The second runs the unix
ls
command using an<exec>
task - which is what you appear to be trying.For a test directory I get this output: