args Path local List = file.listfiles(Path, 2) local Counter = line(List, 0) local Temp, j, One, Pos = 0 if(not Counter) quit(0) v = vec.create(1, 1) if(v <= 0) do messagebox("ok error", "Vector not created", "VEC plugin error") quit(0) endif for(j = 1; j <= Counter; j++) One = line(List, j) if(file.isfolder(One)) do v[Pos] = One Pos++ endif endfor if(not Pos) quit(0) Pos = 0 for(1) Temp = Pos ++ " / " ++ vec.length(v) osd.show(Temp, "INFINITE", "30", "Arial", "-1", "255 000 000") List = file.listfiles(v[Pos], 2) Counter = line(List, 0) if(not Counter) do Pos++ if(Pos >= vec.length(v)) break else for(j = 1; j <= Counter; j++) One = line(List, j) if(file.isfolder(One)) v[vec.length(v)] = One endfor Pos++ if(Pos >= vec.length(v)) break endif endfor osd.hide() vec.sort(v) Counter = vec.capacity(v) if(arg(2) == "v") quit(Counter) local Hand = file.open(Path ++ "\_subdirs.lst", "w") if(Hand <= 0) do messagebox("ok error", "File not opened", "FILE plugin error") quit endif for(j = 0; j < Counter; j++) file.writeline(Hand, v[j]) endfor if(arg(2) == "f") vec.destroy(v) file.close(Hand) quit(Counter)