args Path, Where local Source = Path[0, 2] local Len = length(Path) local Source, Target local Str, Dir, i static Disks = file.alldrives static Quote = esc(?+\"+, ?+\+) local Num = line(Disks, 0) flag set 1 for(i = 1; i <= Num; i++) Str = line(Disks, i) if(Str == Source) do flag clear 1 Dir = slice(Path, 3 - Len) break endif endfor if(pproflag(1)) do messagebox("ok error", "Current drive not found", "SameDir Script") quit endif local hwnd = win.handle("c=TTOTAL_CMD") local Exepath = win.exepath(hwnd) Str = ifelse(miscplugin.is_int(Where), line(Disks, i + Where), Where ++ ":\" ) ++ Dir if(not validpath(Str)) do messagebox("ok error", "Invalid path: " ++ Str, "SameDir Script") quit endif do(Exepath, "/O /S /L=" ++ Quote ++ Str ++ Quote)