args Path, Name local Report = miscplugin.tempfilename() local Str = "/c dir " ++ Path ++ " /a:d /b > " ++ Report local ExitCode = file.runwait(0, "cmd", Str, "", "hide") if(file.size(Report) - 2 == length(Name)) quit("") local Temp local Hand = file.open(Report, "r") flag clear 2 if(Hand > 0 && not ExitCode) do for(not(file.eof(Hand))) Str = file.readstring(Hand) if(Str) do Str = file.nametype(file.getshortpath(Path ++ "\" ++ Str)) if(stricoll(Str, Name) == -1) do flag set 2 if(stricoll(Temp, Str) == -1) Temp = Str endif endif endfor else messagebox("ok error", "File not opened", "FILE plugin error") quit all endif file.close(Hand) if(pproflag(2)) do quit(Temp) else quit("") endif