args Path static Quote = esc(?+\"+, ?+\+) local Str = Path ++ "*.*" if(find(Str, " ") != -1) Str = Quote ++ Str ++ Quote local One = miscplugin.tempfilename() Str = Str ++ " /ltree /h /fo" ++ One local Start = length(Path) static Slash = "\" local hwnd = win.handle("c=TTOTAL_CMD") local Next, Result, LO, LN, i local Temp = file.runwait(0, "c:\utils\xxcopy\xxcopy.exe", Str, "", "hide") if(Temp != 0 && Temp != 100) do messagebox("ok error", "XXcopy error #" ++ Temp, "BrowseSubFolder") quit endif local All = file.readall(One) local Len = line(All, 0) if(Len < 2) quit for(i = 2; i < Len; i++) Str = line(All, i) One = remove(Str, Start) Temp = line(All, i + 1) Next = remove(Temp, Start) LO = word(One, 0, Slash) LN = word(Next, 0, Slash) One = word(One, LO, Slash) if(LN > LO) do Result = Result ++ "SUB=" ++ One ++ "\n" ++ "..=" ++ Str ++ "n" else Result = Result ++ One ++ "=" ++ Str ++ "n" ++ repeat("ENDSUB\n", LO - LN) endif endfor Result = Result ++ word(Next, LN, Slash) ++ "=" ++ line(All, Len) Str = miscplugin.show_menu(Path, Result) if(Str != "NO_ITEM_SELECTED") tc.cd(hwnd, Str)