|
|
| Title | MultiCopy |
| File Name | MultiCopy.txt |
| Description | Copies files to all directories represented by target panel tabs |
| Author | Vochomurka |
| Parameters | ("%L") |
| Plugins Called | win, tc, file, vec, osd |
| Icon |
|
| Version | 2.0 |
| Updated on | 08.06.2009 |
global Config = "path/wincmd.ini"
local hwnd = win.handle("c=TTOTAL_CMD")
local i, j, T, Target, Panel, Opp
global TT = cl.Create("Tabs", 1)
win.sendmessage(hwnd, 0x400+51, 580, 0)
;Sub_ReadTabs - name of script ReadTabs
if(tc.active(hwnd) == "left") do
T = runfile.Subs\Sub_ReadTabs("right")
Opp = 2
else
T = runfile.Subs\Sub_ReadTabs("left")
Opp = 1
endif
if(T == 1) do
win.sendmessage(hwnd, 0x400+51, 3101, 0)
quit
endif
local Str = file.readall(arg(1))
local v = vec.createfromlines(Str)
if(v <= 0) do
messagebox("ok error", "Vector not created", "VEC plugin error #1")
quit
endif
local Counter = vec.length(v)
local Total = T*Counter
for(i = 0; i < TT.Length; i++)
Target = TT.GetId(i)
T = TT.GetMiddleCmd(i)
if(T == Opp && validpath(Target)) do
for(j = 0; j < Counter; j++)
Str = Panel*Counter + j + 1
Str = Str ++ " of " ++ Total ++ " files copied"
osd.show(Str, "INFINITE", "30", "Arial", "-1", "255 000 000")
file.copy(v[j], Target)
endfor
Panel++
endif
endfor
osd.unload
vec.unload
Attention! This script does not work in Total Commander 7.5 pb1 and pb2!
Script copies all files selected (or one file under cursor) to all directories represented by tabs in the target panel.
|
Main Page |
|
Total Commander |
|
PowerPro |
|
|