什么操作系统您使用的? 看起来应该有办法做到这一点,如果你不介意安装程序7zip。 然后,您可以合并下面的7zip命令来仅提取SP_OUT.db文件。
7z e archive.zip -oc:\soft SP_OUT.db -r
提取物存档archive.zip所有SP_OUT.db文件到c:\文件夹中软
可能需要使用x
参数,而不是e
来源尝试:http://sevenzip.sourceforge.jp/chm/cmdline/commands/extract.htm
。
编辑:找出了一个脚本来提取每个文件。 但是,我还没有制定出如何将原始zip名称添加到解压缩SP_OUT.db文件名的开头。
我已经在下面的脚本中标记了你需要做这件事的地方,并且在它之后添加'REN'(重命名)以更改解压缩文件的名称。
@ECHO off
TITLE All your SP_OUT.db are belong to us
SETLOCAL ENABLEDELAYEDEXPANSION
REM Set your working directories below.
set targetFile=SP_OUT.db
set sourceDir=%CD%\source
set outputDir=%CD%\output
set 7ziplocation=C:\Progra~1\7zip\7z.exe
:start
FOR /f "delims=" %%a IN ('dir/s/b/a-d "%sourcedir%\*.zip"') DO (
%7ziplocation% e %%a -o%outputDir% SP_OUT.db -r
CALL :process2 %%a
)
GOTO :eof
:process2
SET "fdir=%1"
REM ********* %fdir% will be the full path including filename of original zip file.
REM ********* Work out how to get just zip file name and put save to variable here.
REN %outputDir%\SP_OUT.db %put_the_above_zip_name_here%_SP_OUT.db
GOTO :eof
您使用哪个程序从zip文件中提取?压缩? 7zip的? WinRAR的? – foxidrive