args Path, Before, Start, End, After local hwnd = win.handle("c=TTOTAL_CMD") local Temp, i, Str if(Start >= End) do Temp = "Starting value of the counter (" ++ Start ++ ") must be less than " Temp = Temp ++ "ending value (" ++ End ++ ")" messagebox("ok error", Temp, "BatchMD Script") quit endif if(Start < 0 || End < 0) do messagebox("ok error", "Counter must be non-negative value", "BatchMD Script") quit endif for(i = Start; i <= End; i++) Temp = Path ++ Before ++ i ++ After if(file.validpath(Temp)) do messagebox("ok error", "Folder " ++ Temp ++ " already exisis", "BatchMD Script") quit endif Str = "/c md " ++ Temp file.runwait(0, "cmd", Str, "", "hide") endfor win.sendmessage(hwnd, 0x400+51, 540, 0)