试下UHARC,支持右键发送到,自动识别文件数量、类型及是否文件夹、是否根目录,压缩文件名生成规则同WINRAR,直接生成自解压文件,压缩比堪称世界第一!
下面是我写的代码,供交流,有问题请大家完善。<img src="images/smilies/face-raspberry.png" align="absmiddle" border="0">
@echo off
set file=%temp%\list.lst
del /q/f %file% >nul
set dp=%~dp1
set dd=%dp:~0,1%
set name=%~n1
:loop
if "%~1"=="" goto go
if "%~x1"=="" echo "%~1\*">>%file%&goto lop
echo "%~1">>%file%
:lop
shift
goto loop
:go
for /f "delims=: tokens=1" %%a in ('findstr /N ".*" %file%') do set Num=%%a
if %Num% EQU 1 goto Fil
set ddp=%dp:~,-1%
for /f "skip=1 delims=:" %%i in ('^(echo "%ddp%"^&echo.^)^|findstr /o ".*"') do set/a l=%%i-5
if %l% LEQ 3 goto Drv
for /f "delims=" %%i in ("%ddp%"<img src="images/smilies/face-wink.png" align="absmiddle" border="0"> do set tag=%%~nxi
uharc.exe a -sfx -mx "%dp%%tag%.com" @%file%
goto :eof
<img src="images/smilies/face-smile-big.png" align="absmiddle" border="0">rv
uharc.exe a -sfx -mx "%dp%%dd%.com" @%file%
goto :eof
:Fil
uharc.exe a -sfx -mx "%dp%%name%.com" @%file%
这个不是UHARC把.
原版uharc根本没有-sfx开关...
UHARC 0.6a ----- high compression multimedia archiver ----- BETA version
Copyright (c) 1997-2005 by Uwe Herklotz All rights reserved 06 Feb 2005
**** Freeware for non-commercial use **** contact:
uwe.herklotz@gmx.de ****
Usage: UHARC command archive
---< Commands >----------------------------------------------------------------
a create archive and Add files e Extract files to current directory
m create archive and Move files x eXtract files with full pathname
l List files in archive t Test files in archive
---< Switches >----------------------------------------------------------------
d<0..2> Set display mode (0 = quiet, 1 = default, 2 = verbose)
m<0..3,x,z> Set cmp.mode (0 = STORE, 1..3 = ALZ:fast..best, x = PPM, z = LZP)
md<n> Set dictionary size in KByte (must be power of 2 : 1 .. 32768)
mm Disable/enable built-in multimedia detection/compression
o Overwrite existing files (- = never, + = always, p = prompt)
p<-,r,f,e> Store (- = no, r = relative, f = full, e = excluded) pathnames
ph Archive header encryption | ac Clear file archive attr
pw Set password | ae<attr> Set attr exclusion mask
r Recurse subdirectories | b<n> Set max filebuffer size
t<dir> Set extract target dir | bpb bpb instead of % ratio
vm Set virtual memory usage | ed Store empty directories
y Assume yes on all queries | lg<file> Log output to <file>
-------------------------------------------------------------------------------
不知道你用的什么版本.
C:\Documents and Settings\lenovo>"I:\UHARC GUI v3.06 Beta-3\System\UHARC_06.exe"
a -sfx -mx "asdasdasd.uha" I:\autoit3\*.*
UHARC 0.6a ----- high compression multimedia archiver ----- BETA version
Copyright (c) 1997-2005 by Uwe Herklotz All rights reserved 06 Feb 2005
**** Freeware for non-commercial use **** contact:
uwe.herklotz@gmx.de ****
ERROR: Can't create archive file
Process aborted.
..................
.....................
目前用NSIS+UNARC..