macro=; goto = %0 ; lquote [ ; if ( argnumber < 2 ) errmsg &10 --------------------------------------------------------------- This script finds all files (recursively traveling subdirectories) which match a file name. You must specify: arg 1 - file to do (possibly with wildcards) arg 2 - name (full path) of file with instructions to process each match --within instructions file, current file is identified as &34&36curfile&34. Make sure that any output files specified in instructions file contain a full path specification (as TNT travels subdirectories). arg 3 - 0/1 to indicate verbose/nonverbose [optional] --------------------------------------------------------------- ; end lquote = ; report-; var: verbose depth dast[50] daprocfile[50]; sil = all ; set dast $%1; set daprocfile $%2; set depth 0 ; set verbose 0 ; if ( argnumber > 2 ) set verbose %3 ; end goto dodirs * ; goto dofiles ; sil - all ; proc/; proc/; ------------------- label dodirs ; set depth ++ ; forfiles %1 if ( !curisdir ) proc/; end if ( 'verbose' ) sil-all ; quote &10; loop 1 'depth' quote &32 &32; stop quote Directory: $curfile &10&10; sil = all ; end cd $curfile ; goto dodirs * ; goto dofiles ; cd .. ; stop set depth -- ; proc/; -------------------- label dofiles ; set depth ++ ; forfiles $dast if ( curisdir ) proc/; end if ( 'verbose' ) sil-all ; loop 1 'depth' quote &32 &32; stop quote $curfile &10; sil = all ; end run $daprocfile ; stop set depth -- ; proc/;