|
|
| Title | MultiDel |
| File Name | MultiDel.txt |
| Description | Delete same files in all tabs of source panel |
| Author | Vochomurka |
| Parameters | ("%F") |
| 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")
global TT = cl.Create("Tabs", 1)
win.sendmessage(hwnd, 0x400+51, 580, 0)
static CR = esc(?+\n+, ?+\+)
local i, j, Target
;Sub_ReadTabs - name of script ReadTabs
local T = runfile.Subs\Sub_ReadTabs(tc.active(hwnd))
if(T == 1) do
win.sendmessage(hwnd, 0x400+51, 908, 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)
Str = "Are you sure to delete the following files?" ++ CR ++ CR
for(i = 0; i < Counter; i++)
v[i] = file.nametype(v[i])
for(j = 0; j < T; j++)
Target = TT.GetId(j)
Str = Str ++ Target ++ v[i] ++ CR
endfor
endfor
if(messagebox("yesno warning", Str, Counter*T ++ " files in total") == 7)
quit
local Total = T*Counter
for(i = 0; i < T; i++)
Target = TT.GetId(i)
for(j = 0; j < Counter; j++)
Str = i*Counter + j + 1
Str = Str ++ " of " ++ Total ++ " files deleted"
osd.show(Str, "INFINITE", "30", "Arial", "-1", "255 000 000")
file.delete(Target ++ v[j])
endfor
endfor
osd.unload
vec.unload
Attention! This script does not work in Total Commander 7.5 pb1 and pb2!
If you need to delete same name file(s) in several directories, just do the following:
|
Main Page |
|
Total Commander |
|
PowerPro |
|
|