|
Title | BrowseSubFolder |
File Name | BrowseSubFolder.txt |
Description | Display menu of subfolders for current folder. Open specified subfolder |
Author | Vochomurka |
Parameters | "%P" |
Plugins Called | miscplugin, tc, file |
Icon | |
Version | 1.0 |
Updated on | 11.09.2008 |
External utility | Xxcopy |
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, "path\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)
Just look at the screenshot:
Breadcrumb bar introduced in version 7.5 does the same. But this command cn't be executed from outside Total Commander, for example, from another script.
All Scripts | Total Commander | TotalCmd.net | PowerPro |