local fh = file.open(arg(1), "r") local Str, Counter, What, Depth, i, j, Result, Temp, Before, After local Char, Len, Path, Slash if(fh > 0) do for(not(file.eof(fh))) Str = file.readstring(fh) if(Str != 0) do Counter = Counter + 1 What = Str endif endfor else messagebox("ok error", "File not opened", "FILE plugin error") quit endif Depth = runfile.Subs\Sub_ParsePath(What, "") v = vec.create(Counter) if(v == 0) do messagebox("ok error", "Vector not created", "VEC plugin error") quit endif Path = "Copy " ++ Counter ++ " name(s) to clipboard" Temp = "maximum is " ++ Depth What = "default - Full Path" Result = Inputdialog("~What=What to Copy??Name with Extension (name.txt)|Path (c:\dir)|Name Only (name)|Extension Only (txt)|Full Path (c:\dir\name.txt)|File Size|Path + Name; No Extension (c:\dir\name), Temp=Path Depth, Before=Before, After=After, Slash=Replacer for \ (default - none)", Path) if(Result == 0) do file.close(fh) quit endif Depth = ifelse(miscplugin.is_int(Temp) == "1", Temp, 0) file.restart(fh) for(i = 0; i < Counter; i = i + 1) Str = file.readstring(fh) v[i] = Str if(Depth != 0 && Depth != "") do Path = runfile.Subs\Sub_ParsePath(Str, Depth) Path = Path ++ "\" else Path = file.folder(Str) ++ "\" endif if(What == "Name with Extension (name.txt)") do v[i] = file.nametype(Str) elseif(What == "Full Path (c:\dir\name.txt)" || What == "default - Full Path") do v[i] = Path ++ file.nametype(Str) elseif(What == "Path (c:\dir)") do v[i] = remove(Path, -1) elseif(What == "Name Only (name)") do v[i] = file.name(Str) elseif(What == "Extension Only (txt)") do v[i] = file.type(Str) elseif(What == "File Size") do v[i] = file.size(Str) elseif(What == "Path + Name; No Extension (c:\dir\name)") do v[i] = Path ++ file.name(Str) endif if(Slash != "") v[i] = replacechars(v[i], "\", Slash) v[i] = Before ++ v[i] ++ After endfor file.close(fh) Str = vec.makelines(v) clip.set(Str) vec.destroy(v) vec.unload file.unload