@echo off :: make_web_index.btm *setlocal *unalias * ::on error goto done on break goto done if "%1"=="" goto usage if not exist %1 ( echo. echo Unable to find path containing the java files: %1 goto usage ) if "%2"=="" goto usage if not exist %2 ( echo. echo Unable to find path for the javadoc: %2 goto usage ) goto start :usage echo. echo Usage: %0 path [java_path] [doc_path] [file_spec] echo. echo java_path - Where the java files are located echo doc_path - Where the javadoc will be placed echo file_spec - include all directories containing this file spec echo. goto done :start set d="%@full[%1]" set based=%@filename[%d] cdd %d set thedir= rem global /h /i /q ( dir /b %3 >&>clip: >NUL & set thedir=%thedir %@if[%%@clip[0]==**EOC**,%%@full[./],]) rem global /h /i /q (set thedir=%thedir %@if[%@FILES[%3]==0,%@full[./]/%3,]) global /h /i /q (set thedir=%thedir %@if[%@FILES[%3]==0,,%@full[./%3]]) echo %thedir :done