Flasher

|
Posted: Wed Aug 17, 2011 01:11 Post subject: |
|
|
Code: | ' Выделение в панелях одноимённых, но разноразмерных файлов и папок
' Необходима регистрация Script Helper ActiveX for TC
' Параметр: "%P" "%T"
'==================================================
With CreateObject("Scripting.FileSystemObject")
Set P = .GetFolder(WScript.Arguments(0))
Set T = .GetFolder(WScript.Arguments(1))
End With
Set D = CreateObject("Scripting.Dictionary")
Set G = CreateObject("Scripting.Dictionary")
For Each F in P.SubFolders
D.Add F.Name, F.Size
Next
For Each F in T.SubFolders
G.Add F.Name, F.Size
Next
For Each F in D.Keys
If G.Exists(F) And D(F) <> G(F) Then S = S & vbnewline & F & "\"
Next
D.RemoveAll
G.RemoveAll
For Each F in P.Files
D.Add F.Name, F.Size
Next
For Each F in T.Files
G.Add F.Name, F.Size
Next
For Each F in D.Keys
If G.Exists(F) And D(F) <> G(F) Then S = S & vbnewline & F
Next
With CreateObject("TCScript.Helper")
T = .GetTextFromClip
.SetTextToClip(S)
.LockTC True
.SendCommand 4001
.SendCommand 2033
.SendCommand 4002
.SendCommand 2033
.LockTC False
.SetTextToClip(T)
End With
Wscript.Quit |
|
|