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
Batya



PostPosted: Fri Jan 27, 2006 17:01    Post subject: Reply with quote

Другой вариант - изменения показываю в Excell:
Code:
'========================================================================
' Сравнивание папок в панелях TC на имена и количество вложенных подпапок

' В параметрах вызова из TC должно быть прописано (2 пар. через пробел):
' %P %T
'========================================================================

Dim FSO, FoldAct, FoldPas, Fold, objXL
Set FSO = CreateObject("Scripting.FileSystemObject")
Set FoldAct = FSO.GetFolder(WScript.Arguments(0))
Set FoldPas = FSO.GetFolder(WScript.Arguments(1))
Set objXL   = WScript.CreateObject("Excel.Application")

objXL.Workbooks.Add

Dim i, j
i = 1
j = 1
objXL.Cells(i,1).Value = FoldAct.Path
objXL.Cells(j,2).Value = FoldPas.Path
For Each Fold in FoldAct.SubFolders
  If Not FSO.FolderExists(FoldPas.Path & "\" & Fold.Name) Then
    i = i + 1
    objXL.Cells(i,1).Value = Fold.Name
  Elseif Fold.SubFolders.Count <> _
         FSO.GetFolder(FoldPas.Path & "\" & Fold.Name).SubFolders.Count Then
    i = i + 1
    objXL.Cells(i,1).Value = Fold.Name
    j = j + 1
    objXL.Cells(j,2).Value = Fold.Name
  End If
Next
For Each Fold in FoldPas.SubFolders
  If Not FSO.FolderExists(FoldAct.Path & "\" & Fold.Name) Then
    j = j + 1
    objXL.Cells(j,2).Value = Fold.Name
  End If
Next
objXL.Visible = True

Set FSO     = Nothing
Set objXL   = Nothing
Set Fold    = Nothing
Set FoldAct = Nothing
Set FoldPas = Nothing
Wscript.Quit()
View user's profile Send private message


Powered by phpBB © 2001, 2005 phpBB Group