我想使用文本文件文件夹中的antscrpt显示一个下拉列表
我在Windows文件夹中只有一组文本文件 我想将这些文件名显示为用户的下拉列表 我尝试使用文件集和文件列表,但没有得到所需的输出 我已经使用了这行代码我想使用文本文件文件夹中的antscrpt显示一个下拉列表,ant,Ant,我在Windows文件夹中只有一组文本文件 我想将这些文件名显示为用户的下拉列表 我尝试使用文件集和文件列表,但没有得到所需的输出 我已经使用了这行代码 <target name="all"> <fileset id="myfileset" dir="C:\Users\MYSELF\Desktop\FOLDERNAME\test"> <include name="*" /> </fileset>
<target name="all">
<fileset id="myfileset" dir="C:\Users\MYSELF\Desktop\FOLDERNAME\test">
<include name="*" />
</fileset>
<property name="files" refid="myfileset" />
<input validargs="${files}" message="Select file Name"></input>
</target>
与java属性一起使用${line.separator}
每行显示一个文件: <fileset id="myfileset" dir="...">
<include name="*" />
</fileset>
<pathconvert property="foo" refid="myfileset" pathsep="${line.separator}"/>
<input validargs="${foo}" message="Select file Name"></input>
我使用了pathsep=“,”并在输入中将其传递给validargs属性…然后它就可以满足我的要求了…谢谢
<fileset id="myfileset" dir="...">
<include name="*" />
</fileset>
<pathconvert property="foo" refid="myfileset" pathsep="${line.separator}"/>
<input validargs="${foo}" message="Select file Name"></input>