Total Commander Forum Index Total Commander
Форум поддержки пользователей Total Commander
Сайты: Все о Total Commander | Totalcmd.net | Ghisler.com | RU.TCKB
 
 RulesRules   SearchSearch   FAQFAQ   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Single Post  Topic: Удаление дубликатов 
Author Message
Volniy



PostPosted: Thu Apr 05, 2007 19:03    Post subject: Re: Удаление дубликатов Reply with quote

yuris5 wrote:
И ещё один вопрос: как можно отметить файлы в панели "через один" т.е. в виде "зебры".

Пишу код без тестирования, наобум. Я не понимаю, зачем это может быть нужно, но раз уж просили, то...

Code:
Option Explicit
Dim FSO, ListFile, SelFile, TCS
Dim File1, File2, Cnt, Buf
Set FSO = CreateObject("Scripting.FileSystemObject")
Set TCS = CreateObject("TCScript.Helper")
Set ListFile = FSO.OpenTextFile(WScript.Arguments(0), 1)
Do While Not ListFile.AtEndOfStream
SelFile = ListFile.ReadLine
Cnt = Cnt + 1
File2 = FSO.GetFileName(SelFile)
If Cnt Mod 2 = 0 Then
   Buf = Buf & SelFile & vbNewLine
End If
Loop
ListFile.Close
TCS.ClearClip
TCS.SetTextToClip CStr(Buf)
TCS.SendCommand "cm_LoadSelectionFromClip", True
Set ListFile = Nothing
Set FSO = Nothing
Set TCS = Nothing
MsgBox "Выделено ""зеброй"":): " & Cnt \ 2 & " файлов", vbInformation, "Завершено!"
WScript.Quit
View user's profile Send private message


Powered by phpBB © 2001, 2005 phpBB Group