Loopback
|
Posted: Tue Sep 07, 2010 10:29 Post subject: |
|
|
Пока писал, уже два варианта появилось
Ну вот тогда третий до кучи, на 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
|
|
|