取得分卷 7zip 檔案中的檔案列表

取得分卷 7zip 檔案中的檔案列表

我使用以下命令在 Windows 10 下建立多部分(每個 1G)7zip 存檔(基本上是我的文件區域的完整備份):

7z a -r -v1g -bb -y \path\to\zips\xyzzy.7z .

這成功地為我創建了大約 38 個 1G 檔案。但是,我想稍後獲得存檔中所有文件的列表,但我對如何執行此操作感到困惑。命令:

7z l xyzzy.7z.001

回傳錯誤:

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21

Scanning the drive for archives:
1 file, 1073741824 bytes (1024 MiB)

Listing archive: \somewhere\xyzzy.7z.001

--
Path = \somewhere\xyzzy.7z.001
Type = Split
Physical Size = 1073741824
Volumes = 1
Total Physical Size = 1073741824

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
                    .....   1073741824   1073741824  xyzzy.7z
------------------- ----- ------------ ------------  ------------------------
                            1073741824   1073741824  1 files
----------
Path = xyzzy.7z
Open ERROR: Can not open the file as [7z] archive

Errors: 1

因此,底層7z文件似乎在文件中可見.7z.001,但它抱怨它不是有效的存檔。

我也嘗試過使用它-tsplit刪除了錯誤,但只有這樣才顯示內容,而xyzzy.7z無需深入該文件以查看其內容。換句話說,輸出與上面的輸出相同,但最後一行是以 結尾的1 files

為什麼會這樣呢?是不是我的命令列參數寫錯了?如何從拆分存檔中取得文件清單?

答案1

請嘗試使用 7-zip 檔案路徑上的磁碟機號碼。例如:

7z l C:\somewhere\xyzzy.7z.001

這似乎是16.02版本的錯誤。我做了以下測試:

E:\temp>7za l \temp\archive.7z.001

7-Zip (a) [32] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21

Scanning the drive for archives:
1 file, 1048576 bytes (1024 KiB)

Listing archive: \temp\archive.7z.001

--
Path = \temp\archive.7z.001
Type = Split
Physical Size = 1048576
Volumes = 1
Total Physical Size = 1048576

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
                    .....      1048576      1048576  archive.7z
------------------- ----- ------------ ------------  ------------------------
                               1048576      1048576  1 files
----------
Path = archive.7z
Open ERROR: Can not open the file as [7z] archive

Errors: 1

E:\temp>7za l E:\temp\archive.7z.001

7-Zip (a) [32] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21

Scanning the drive for archives:
1 file, 1048576 bytes (1024 KiB)

Listing archive: E:\temp\archive.7z.001

--
Path = E:\temp\archive.7z.001
Type = Split
Physical Size = 1048576
Volumes = 6
Total Physical Size = 5533143
----
Path = archive.7z
Size = 5533143
--
Path = archive.7z
Type = 7z
Physical Size = 5533143
Headers Size = 170
Method = LZMA2:6m
Solid = -
Blocks = 1

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
2013-03-13 09:23:44 ....A      6010800      5532973  gotingeno-davideosendacommon.pdf
------------------- ----- ------------ ------------  ------------------------
2013-03-13 09:23:44            6010800      5532973  1 files

------------------- ----- ------------ ------------  ------------------------
2013-03-13 09:23:44            6010800      5532973  1 files

Archives: 1
Volumes: 6
Total archives size: 5533143

E:\temp>7za l archive.7z.001

7-Zip (a) [32] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21

Scanning the drive for archives:
1 file, 1048576 bytes (1024 KiB)

Listing archive: archive.7z.001

--
Path = archive.7z.001
Type = Split
Physical Size = 1048576
Volumes = 6
Total Physical Size = 5533143
----
Path = archive.7z
Size = 5533143
--
Path = archive.7z
Type = 7z
Physical Size = 5533143
Headers Size = 170
Method = LZMA2:6m
Solid = -
Blocks = 1

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
2013-03-13 09:23:44 ....A      6010800      5532973  gotingeno-davideosendacommon.pdf
------------------- ----- ------------ ------------  ------------------------
2013-03-13 09:23:44            6010800      5532973  1 files

------------------- ----- ------------ ------------  ------------------------
2013-03-13 09:23:44            6010800      5532973  1 files

Archives: 1
Volumes: 6
Total archives size: 5533143

相關內容