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
Flasher



PostPosted: Sat Jul 02, 2011 12:15    Post subject: Reply with quote

Code:
' Cоздание подкаталога в папках активной панели
' и перемещение в него одноимённого файла
' Параметры: "%P" <расширение файлов> <имя создаваемой папки>
' Пример: "%P" xml 1
'================================================
With CreateObject("Scripting.FileSystemObject")
On Error Resume Next
  Set FF = .GetFolder(WScript.Arguments(0))
  For Each F In FF.SubFolders
    For Each P In F.Files
      If F.Name = .GetBaseName(P) And _
        .GetExtensionName(P)=WScript.Arguments(1) Then
        .CreateFolder F & "\" & WScript.Arguments(2)
        .MoveFile P, F & "\" & WScript.Arguments(2) & "\"
      End If
    Next
  Next
End With
Wscript.Quit


Last edited by Flasher on Sat Jul 02, 2011 12:32; edited 1 time in total
View user's profile Send private message


Powered by phpBB © 2001, 2005 phpBB Group