@echo off :: make_web_index.btm *setlocal *unalias * ::on error goto done on break goto done if "%1"=="" goto usage if not exist %1 goto path_not_found set full_path=%@path["%@full["%0"]"] set dest_path=%@path["@full["%1"]"] if not exist "%full_path%down.gif" goto GIF_NOT_FOUND if not exist "%dest_path%down.gif" copy "%full_path%down.gif" "%dest_path%down.gif" goto start :GIF_NOT_FOUND echo. echo unable to find "%full_path%down.gif" goto done :PATH_NOT_FOUND echo. echo Unable to find path: %1 :usage echo. echo Usage: %0 path [path] [title] [suppress] echo. echo path - Path from which to build the index echo title - Title of the web page echo suppress - Files to not include in the list. Default is "*.php *.htm* *.bak *~" echo. goto done :start set f="index.php" rem set suppress=/[!*.ion index*.htm *.ba*] set suppress=/[!*.php *.htm* *.bak *~] set d="%@full[%1]" set based=%@filename[%d] set title=%@strip[%=",%2] if ".%title."==".." set %title=%d if not ".%3."==".." set suppress=/[!%@strip[%=",%3]] echo %=nUsage: %0 path [path] [title] [suppress] echo %=n%@upper[%0]: Hit Ctrl-C to abort or press any key to pause %@if[exist %f,re,]build %f from %d. cdd %d >!%f echo %=%=
>> %f echo %=>> %f text >> %f
| %=%ii%=%= | >> %f ) else echo %=%ii%= | >> %f endiff echo %=%@filedate["%ii",w,4]%= | >> %f echo %=%=%= %= %@format[5,%@filesize["%ii",K]]K%= | >> %f
set base_name=%@LEFT[%@index[%ii,.],%ii]
set description=%@descript["%ii"]
if "%description"=="" (
if "%ii"=="DESCRIPT.ION" set description=Contains file descriptions as used by 4NT
if "%ii"=="%based%.zip" set description=Compressed copy of entire directory
)
iff exist "%base_name%.html" then (
if "%description"=="" set description=%base_name.html
echo %=%=%description%%=%= | >>%f ) else echo %=%description%= | >>%f endiff echo %=
[%n files indexed on %@makedate[%@date[%_date],4] at %_time >> %f echo by %=%=4NT!%=> %f echo %=>%= ] >> %f echo %=
>> %f text >> %f