Имя пользователя:
Пароль:
 

Показать сообщение отдельно

Пользователь


Сообщения: 61
Благодарности: 1

Профиль | Отправить PM | Цитировать


Цитата Iska:
Как-то так:
Скрытый текст
Код: Выделить весь код
@echo off
setlocal enableextensions enabledelayedexpansion
set sSourceFolder=%~1
if defined sSourceFolder (
if exist "%sSourceFolder%\." (
set "sPassword=1"
set sSelection=
for /d %%i in ("%sSourceFolder%\*.*") do (
start /wait "" "WinRAR.exe" a -r -p!sPassword! -df -ep1 "%sSourceFolder%\%%~nxi.rar" "%%~i"
if not defined sSelection set sSelection="%sSourceFolder%\%%~nxi.rar"
)
start "" "explorer.exe" /e,/select,!sSelection!
) else (
echo Can't find source folder [%sSourceFolder%].
exit /b 2
)
) else (
echo Usage: %~nx0 ^<Source folder^>
exit /b 1
)
endlocal
exit /b 0
Также можно просто перетащить целевую папку в Проводнике на пакетный файл. »

Спасибо помогло

Отправлено: 17:40, 04-07-2015 | #8