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
Lev



PostPosted: Mon Jul 28, 2008 22:10    Post subject: Reply with quote

то же самое на vbs
Code:
'noduplines.vbs
'удаление дублирующихся строк из выделенного в тотале файла и сохранение в *.filtered
Set FSO = CreateObject("Scripting.FileSystemObject")
Set Dict = CreateObject("Scripting.Dictionary")
Set TCS = CreateObject("TCScript.Helper")
ff=TCS.GetSrcSelectedFiles(-1)(0)
Set TextFile = FSO.OpenTextFile(ff, 1)

Do While TextFile.AtEndOfStream <> True
 strLine = textFile.ReadLine
 If not Dict.Exists(strLine) Then Dict.Add strLine, 1
Loop

For Each m In dict.Keys
 s = s & m & vbCrLf
Next

Set f = FSO.CreateTextFile(ff & ".filtered")
f.Write s
f.Close
View user's profile Send private message


Powered by phpBB © 2001, 2005 phpBB Group