526549
Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору :@echo off chcp 866>nul set day=%date:~-10,2% set mon=%date:~-7,2% set year=%date:~-2,2% set hour=%time:~-11,2% set min=%time:~-8,2% set sec=%time:~-5,2% set destcab=%2 IF [%2]==[] set destcab=%year%-%mon%-%day%_%hour%-%min%-%sec% echo .OPTION EXPLICIT >%tmp%\files.txt echo .Set Cabinet=on >>%tmp%\files.txt echo .Set Compress=on >>%tmp%\files.txt echo .Set CompressionType=LZX >>%tmp%\files.txt echo .Set CompressionMemory=21 >>%tmp%\files.txt echo .Set MaxDiskSize=0 >>%tmp%\files.txt echo .Set FolderSizeThreshold=2147483648 >>%tmp%\files.txt echo .Set UniqueFiles=OFF >>%tmp%\files.txt echo .Set DestinationDir= >>%tmp%\files.txt echo .Set DiskDirectoryTemplate=. >>%tmp%\files.txt echo .Set InfFileName=%tmp%\files.inf >>%tmp%\files.txt echo .Set RptFileName=%tmp%\files.rpt >>%tmp%\files.txt echo .Set CabinetName1=%destcab%.cab >>%tmp%\files.txt for /f "delims=" %%A in ("%1\") do set S=%%~dpA if """" == "%S:~1,1%%S:~1,1%" (echo Error! & exit /b 1) if defined Len set Len= setlocal enabledelayedexpansion for /l %%A in (0,1,8184) do ( set I=!S:~%%A! if defined I (set /a Len+=1) else goto _end_Len ) :_end_Len endlocal & set Len=%Len% for /f "delims=" %%A in ('dir /s /a-d /b "%~1"') do ( set A=%%A setlocal enabledelayedexpansion >>"!tmp!\files.txt" echo "!A!" "!A:~%Len%!" endlocal ) chcp 866>nul makecab /f %tmp%\files.txt del /f /q %tmp%\files.txt >nul del /f /q %tmp%\files.inf >nul del /f /q %tmp%\files.rpt >nul | Всего записей: 359 | Зарегистр. 20-01-2007 | Отправлено: 19:41 07-03-2015 | Исправлено: 526549, 19:43 07-03-2015 |
|