首先,安装
7-zip.
原文链接:https://www.f2er.com/windows/370780.html在包含许多子目录的目录的根目录中创建一个bat文件,其中包含存档.然后粘贴以下内容:
FOR /D /r %%F in ("*") DO ( pushd %CD% cd %%F FOR %%X in (*.rar *.zip) DO ( "C:\Program Files\7-zip\7z.exe" x "%%X" ) popd )
启动蝙蝠,所有rar / zip将被提取到它们所包含的文件夹中.
这是如何运作的?
FOR /D /r %%F in (“*”) DO (
For loop to loop through all folders in the current directory,and put the path into a variable
%%F
.
pushd %CD%
Put the current directory that we are in into memory.
cd %%F
Set the folder from variable
%%F
as the current directory.
06001
For all the
rar
andzip
files in the current folder,do:
06002
Run 7-zip on the files. Quotes are needed around
%%X
because some file names have spaces in them.
06003
Return to the prevIoUs directory that we prevIoUsly stored in the memory.
希望这对某人有用.