@echo off 
:http://www28.atwiki.jp/ooblkeland/pages/192.html
:http://demo.tc/Post/456
:http://blog.xuite.net/eric10104/blog/41711658-7-zip%E8%87%AA%E5%8B%95%E5%82%99%E4%BB%BD+%2B+(DOS%E6%89%B9%E6%AC%A1%E6%8C%87%E4%BB%A4)


7z a "R:\[%DATE:~0,4%.%DATE:~5,2%.%DATE:~8,2%].7z"  -p"ya" "R:\123test"
7z a "R:\[%DATE:~0,4%-%DATE:~5,2%-%DATE:~8,2%].test.7z" -p"ya" @"R:\list.txt"

7z a "R:\[%DATE:~0,4%-%DATE:~5,2%-%DATE:~8,2%].test.7z" -p"ya" @"R:\list.txt" > R:\7z.log

7z a -mx


:@echo off 
:7z a -mx=9 c:\7zip.7z  @c:\壓縮.txt > 7z.log &
:   * -mx=9,-mx為壓縮率,壓縮率又分為 -mx=0, 1, 3, 5, 7, 9 ,數字越大,代表壓縮率越高,檔案就越小!
:   * > 7z.log & ,輸出一個檔案為 7z.log , 可以記錄下壓縮的檔案名稱

:http://sevenzip.sourceforge.jp/chm/cmdline/switches/method.htm



:尚未測試Unicode   http://www.mobile01.com/topicdetail.php?f=512&t=2391655&p=1
@echo off

set a=%~dp0\7zG.exe

if "%~1"=="" goto end

set listfile=%~dp1%listfile.txt

if not "%~2"=="" goto Multi
set output_file=%~dp1%~n1.7z
goto CreateList
:Multi
for %%a in ("%~f1\..") do (
set output_file=%~dp1%%~nxa.7z
)

:CreateList
chcp 65001
:LOOP
if "%~1"=="" goto Window
echo "%~1" >> "%listfile%"
shift /1
goto LOOP

:Window
"%a%" a -ad "%output_file%" @"%listfile%" -scsUTF-8

del "%listfile%"

:end