args Path, Name, Ext local Len = length(Name) local hwnd = win.handle("c=TTOTAL_CMD") local Panel = ifelse(tc.active(hwnd) == "left", 8, 7) local TMLB = childwin.handle(hwnd, "TMyListBox", Panel) local Current = win.sendmessage(TMLB, 0x0188, 0, 0) local i, Group, Counter for(i = Len; i > 0; i--) Group = select(Name, i, i) if(not miscplugin.is_int(Group)) break endfor if(i) do Group = select(Name, i) Counter = select(Name, i - Len) else Group = "" Counter = Name endif for(i = 0; 1; i++) Len = fill(repeat("0", length(Counter)), Counter + i) Name = Group ++ Len if(not file.validpath(Path ++ "\" ++ Name ++ "." ++ Ext)) break endfor win.sendmessage(TMLB, 0x0183, Current, Current + i - 1)