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
Loopback



PostPosted: Tue Sep 07, 2010 10:29    Post subject: Reply with quote

Пока писал, уже два варианта появилось Very Happy

Ну вот тогда третий до кучи, на Autoit.

Code:

; Параметры: "%P" "%T" 50

If $CmdLine[0] < 3 Then
    MsgBox (0, "", "Недостаточно параметров, должно быть 3.")
    Exit
EndIf

Global $nDirCounter = 0
Global $nFileCounter = $CmdLine[3]

$hSearch = FileFindFirstFile($CmdLine[1] & "*.*")

While 1
    If $nFileCounter = $CmdLine[3] Then
        $nFileCounter = 0
        $nDirCounter += 1
        $sCurrentTarget = $CmdLine[2] & StringFormat("%03d", $nDirCounter)
        DirCreate($sCurrentTarget)
    EndIf
    $sFile = FileFindNextFile($hSearch)
    If @error Then Exit
    If @extended Then ContinueLoop ; без каталогов
    FileMove($CmdLine[1] & $sFile, $sCurrentTarget)
    $nFileCounter += 1
Wend
View user's profile Send private message


Powered by phpBB © 2001, 2005 phpBB Group