// // VIA-DIR.VDM C.Z. 18.07.2003 // // // c:\vedit\vpw.exe -x "via-dir.vdm" %TMP%\VI-DIR.TMP %tmp%\via-dir.cmd // // Buffer1 (VI-DIR.TMP): // --------------------- // tkesa950 <=== HOST // p40adm <=== USER // /home/p40adm/ <=== PATH // ./ // ../ // .dtprofile // .sh_history // .vnc/ // LSMW.CMD // applic_serv/ // cz // cz2 // file1 // // // Buffer2 will contain the generated CMD file like: // ------------------------------------------------- // @echo off // :: // :: VIA-DIR.CMD generated by VIA-DIR.VDM // :: 18.07.2003 // set ENDE=N // // call :doit // if %ENDE%==Y goto ende // call :doit // goto ende // // :doit // choice /C:JNC /T:J,5 Weiter mit %1's %2 auf %3 // if errorlevel 3 set ENDE=Y && goto :EOF // if not errorlevel 2 call vi /%2 -l // goto :EOF // :ende Buf_Switch(1) Replace("|W|>","", BEGIN+ALL+NOERR) // delete trailing whitespace BoF RCB(103, CP, EoL_Pos) // HOST Line(1) RCB(104, CP, EoL_Pos) // USER Line(1) RCB(105, CP, EoL_Pos) // PATH with trailing "/" Line(1) if (At_EoF) { Reg_Set(106, PATHNAME) File_Quit(OK) File_Delete(@106, OK) Exit(1) } Save_Pos() Replace("|<|*/|N","", ALL+NOERR) // delete directory entries (trailing "/"s) Restore_Pos() Buf_Switch(2) Del_Block(0,Filesize) Ins_Text("@echo off :: :: VIA-DIR.CMD generated by VIA-DIR.VDM :: set ENDE=N ") Buf_Switch(1) while (! At_EoF) { Reg_Copy_Block(106, CP, EoL_Pos) Buf_Switch(2) Ins_Text("call :doit ") Reg_Ins(106) EoL Ins_Newline(1) Ins_Text(" if %ENDE%==Y goto ende") Ins_Newline(1) Buf_Switch(1) Line(1, NOERR) } Buf_Switch(2) Ins_Text(" goto ende :doit choice /C:JNC /T:J,5 Weiter mit ") Reg_Ins(104) Ins_Text("'s %1 auf ") Reg_Ins(103) Ins_Text(" if errorlevel 3 set ENDE=Y && goto :EOF if not errorlevel 2 call vi ") Reg_Ins(105) Ins_Text("%1 -l ") Reg_Ins(104) Ins_Text(" ") Reg_Ins(103) Ins_Text(" goto :EOF :ende ") File_Save(OK+NOMSG) Qally