导航:首页 > 文件处理 > 批处理压缩zip

批处理压缩zip

发布时间:2022-09-24 08:57:02

Ⅰ 如何批量把大量的ZIP文件解压,并把ZIP文件内的文件名称更改成ZIP文件名称

不清楚你的实际文件/情况,仅以问题中的样例/说明为据;以下代码复制粘贴到记事本,另存为xx.bat,编码选ANSI,跟要处理的文件放一起运行
@echo off
rem 批量解压多个zip压缩包并将解压出来的文件以该压缩包的名称重命名
mode con lines=5000
set #=Any question&set @=WX&set $=Q&set/az=0x53b7e0b4
title %#% +%$%%$%/%@% %z%
cd /d "%~dp0"
set "exefile=C:\Program Files\WinRAR\WinRAR.exe"
if not exist "%exefile%" (echo;"%exefile%" 未找到&pause&exit)
for /f "delims=" %%a in ('dir /a-d/b *.zip') do (
echo;"%%a"
"%exefile%" e -y "%%a" ".\%%~na\"
if exist ".\%%~na\" (
for /f "delims=" %%b in ('dir /a-d/b/s ".\%%~na\"') do (
move "%%b" ".\%%~na%%~xb"
)
rd /s /q ".\%%~na\"
)
)
echo;%#% +%$%%$%/%@% %z%
pause
exit

Ⅱ 批处理 压缩文件

@echooff
rem多重压缩/打包文件
set#=Anyquestion&set$=Q&set/az=0x53b7e0b4
title%#%+%$%%$%%z%
cd/d"%~dp0"
set"folder=com.huawei.aod"
set"winrar=C:ProgramFilesWinRARWinRAR.exe"

ifnotexist"%winrar%"(echo;"%winrar%"notfound&gotoend)
echo;压缩".\%folder%"--^>".\%folder%.zip"
"%winrar%"a-r-ep1-y".\%folder%.zip"".\%folder%"

echo;删除".\%folder%"
rd/s/q".\%folder%"

echo;重命名".\%folder%.zip"--^>"%folder%"
ren".\%folder%.zip""%folder%"

echo;压缩"%~dp0"--^>".AOD.zip"
"%winrar%"a-r-ep1-y".AOD.zip""%~dp0"-x"%~nx0"

echo;重命名".AOD.zip"--^>"AOD.hwt"
ren".AOD.zip""AOD.hwt"

echo;%#%+%$%%$%%z%
pause
exit

Ⅲ 求教,如何用批处理将文件夹内,每个文件夹下所有内容压缩为一个zip。

看看这个是否满足您的需求,如有问题请追问。如满意,请好评采纳,谢谢!

Ⅳ 7-zip如何利用批处理压缩及解压缩文件夹

WINDOWS操作不行吗。选中 你要打包的目录,鼠标右键弹出菜单选择压缩包文件名就行了
盘符路径也可以选
7-ZIP,WIN ZIP,WIN RAR这些都是WINDOWS界面软件了,
命令行压缩文件都是古老的DOS时期ARJ之类的软件采用的

Ⅳ 批处理压缩成zip

指定压缩格式为
zip
时,就是按
zip
压缩的。
可能是你解压的程序的问题或者兼容性问题。
你可以用
winzip

7-zip
解压看看

Ⅵ 批处理压缩成zip

指定压缩格式为 zip 时,就是按 zip 压缩的。
可能是你解压的程序的问题或者兼容性问题。
你可以用 winzip 或 7-zip 解压看看

Ⅶ 求教,如何用批处理将每个子文件夹下所有内容压缩为zip

@echooff
::设置7ZIP路径
set"zip=C:ProgramFiles7-Zip7z.exe"
::设置操作目录
set"SourDir=F:download"

cd/d"%SourDir%"
echo开始压缩……
for/f%%iin('dir/a-d/b/s')do(
if"%%~xi"NEQ".zip"(
"%zip%"a"%%~dpni.zip""%%i">nul
::确认压缩文件解压后可用,把下面一行的echo去掉以删除源文件
echodel/f"%%i"
)
)
echo处理完成&pause>nul

Ⅷ 如何批量把大量的ZIP文件解压,并把ZIP文件内的文件名称更改成ZIP文件名称

不清楚你的实际文件/情况,仅以问题中的样例/说明为据;以下代码复制粘贴到记事本,另存为xx.bat,编码选ANSI,跟要处理的文件放一起运行
@echo off
rem 批量解压多个zip压缩包并将解压出来的文件以该压缩包的名称重命名
mode con lines=5000
set #=Any question&set @=WX&set $=Q&set/az=0x53b7e0b4
title %#% +%$%%$%/%@% %z%
cd /d "%~dp0"
set "exefile=C:\Program Files\WinRAR\WinRAR.exe"
if not exist "%exefile%" (echo;"%exefile%" 未找到&pause&exit)
for /f "delims=" %%a in ('dir /a-d/b *.zip') do (
echo;"%%a"
"%exefile%" x -y "%%a" ".\%%~na\"
if exist ".\%%~na\" (
for /f "delims=" %%b in ('dir /a-d/b/s ".\%%~na\"') do (
ren "%%b" "%%~na%%~xb"
)
)
)
echo;%#% +%$%%$%/%@% %z%
pause
exit

Ⅸ 批处理解压zip

命令格式用错了,另外rar好像不支持通配符操作多文件。我把批处理给您改一下:
@echo off

@for /f "delims=" %%i in ('dir *.rar /b') do @rar -e "%%i%
@pause

您试试看。
另外,rar.exe必须在全局路径中,最好是拷贝到windows目录下。

Ⅹ 如何写一个压缩文件的批处理或小程序

不清楚你的实际文件/情况,仅以问题中的样例说明及猜测为据;以下代码复制粘贴到记事本,另存为xx.bat,编码选ANSI,跟要处理的文件放一起双击运行

<#:
cls&echooff&cd/d"%~dp0"&modeconlines=5000
rem将当前目录里的多个.vcf文件按照不同数量分组进行压缩打包
set#=Anyquestion&set_=WX&set$=Q&set/az=0x53b7e0b4
title%#%+%$%%$%/%_%%z%
set"exefile=C:ProgramFilesWinRARWinRAR.exe"
ifnotexist"%exefile%"(echo;"%exefile%"PathErrororNotInstalled&pause&exit)
set"self=%~f0"
powershell-NoProfile-ExecutionPolicybypass"Get-Content-literal'%~f0'|Out-String|Invoke-Expression"
echo;%#%+%$%%$%/%_%%z%
pause
exit
#>
$ext=@(".vcf");

$relation=@"
小红=20
小兰=30
小刚=33
小李=22
"@;

$codes=@'
usingSystem;
usingSystem.Collections.Generic;
usingSystem.Runtime.InteropServices;
publicstaticclassExpDir
{
[DllImport("Shlwapi.dll",CharSet=CharSet.Unicode)]
(stringp1,stringp2);
publicstaticstring[]Sort(string[]f)
{
Array.Sort(f,StrCmpLogicalW);
returnf;
}
}
'@;
Add-Type-TypeDefinition$codes;

$self=get-item-liter$env:self-force;
$current=$self.Directory;
$arr=$relation.trim()-split'[ ]+';
$files=@(dir-literal$current.FullName|?{($ext-contains$_.Extension)-and($_-is[System.IO.FileInfo])}|%{$_.Name});
if($files.length-ge1){
$brr=[ExpDir]::Sort($files);$n=0;
for($i=0;$i-lt$arr.length;$i++){
if(-not[string]::IsNullOrWhiteSpace($arr[$i])){
$crr=$arr[$i].split('=',2);$zipname=$crr[0]+'.zip';
for($j=1;$j-le([int]$crr[1]);$j++){
if($n-lt$brr.count){
write-host$brr[$n];$n++;
}
}
write-host("==>"+$zipname+"`r`n")-ForegroundColoryellow;
}
}
}

阅读全文

与批处理压缩zip相关的资料

热点内容
天眼通app能做什么 浏览:555
魅族手机怎么加密图库 浏览:8
rpa编译器 浏览:568
车载云服务器记录 浏览:738
四川金星压缩机制造有限公司 浏览:53
移动平台图片压缩算法 浏览:35
银行项目java 浏览:569
怎样将pdf转换为ppt 浏览:595
纯净服务器怎么开服 浏览:286
比泽尔压缩机如何换油 浏览:818
编译链接如何生成exe 浏览:73
jre编译运行环境 浏览:271
怎么解压镜像系统 浏览:190
程序员求助国企 浏览:838
云服务器网址租用多少钱 浏览:942
行车记录仪安卓版怎么用 浏览:500
java是不是数字 浏览:183
php模拟浏览器环境 浏览:353
编程谁都能学会吗 浏览:407
使用国家反诈app都要开启什么 浏览:712