2012-12-03 2 views
0

현재 디렉토리 아래에있는 모든 디렉토리를 찾으려고합니다. 현재 디렉토리에는 파일과 디렉토리가있을 수 있습니다.Ant : 현재 디렉토리 아래의 모든 디렉토리

이 시나리오에서는 현재 디렉터리 아래에 모든 하위 디렉터리를 제공 할 수있는 기존 작업을 찾고 있습니다.

답변

0
<project name="demo" default="run"> 

    <target name="run"> 
     <dirset id="dirs" dir="${basedir}/.."/> 

     <pathconvert targetos="unix" property="path.unix" refid="dirs"/> 

     <echo message="${path.unix}"/> 
    </target> 

</project> 
2

는이처럼 -path 옵션과 -sbudirectory 옵션을 사용해야합니다

find . -type d -path "./dir1/*.1" -"subdirectory*name" -o -print 
+0

하지만 Ant 스크립트와 방법이 필요합니다 ... – Vishal