// // DIR-FIND-DEEPEST.VDM Christian Ziemski 06.08.2004 // // #103=File_Check("|(VEDIT_TEMP)\dir.tmp") if (#103 != -1) { Buf_Switch(#103) Buf_Quit(OK) } Reg_Set(104, "C:\") #103=Dialog_Input_1(104,"`Find deepest directory level`, `Please enter the starting point`, `??`, `[OK]`, `[Exit]`",SET+SCREEN+CENTER,0,0) if (#103 != 1) { return } Reg_Set(104, "dir ", INSERT) Reg_Set(104, ` /s | find "\" > `, APPEND) Reg_Set(104, VEDIT_TEMP, APPEND) Reg_Set(104, "\dir.tmp", APPEND) System('|@(104)', DOS+SIMPLE+OK) File_Open("|(VEDIT_TEMP)\dir.tmp") BoF #103=0 while(!At_EoF) { #104=0 repeat (ALL) { Search_Block("\", Cur_Pos, EoL_Pos, ADVANCE+NOERR+ERRBREAK) #104++ } if ( #104 > #103 ) { #103=#104 #105=Cur_Line } Line(1) } Goto_Line(#105) Update Num_Str(#103, 103) Dialog_Input_1(103,"`Find deepest directory level`, `The deepest level is |@(103)`, ",SCREEN+CENTER,0,0)