如何批量添加整个文件夹到ZIP存档?

时间:2015-08-18 16:24:00

标签: batch-file zip

有人可以告诉我如何批量添加整个文件夹到ZIP存档?

我可以使用哪种软件来做到这一点?

我的文件夹名为FILES,应将其添加到名为FILES.ZIP的存档中 注意在其中添加所有文件:

/ FILE1 / FILE2

不喜欢

/ FILES / FILE1 / FILES / FILE2

1 个答案:

答案 0 :(得分:0)

你是说这个意思吗? http://www.info-zip.org/

C:>dir test
 Volume in drive C is OSDisk
 Volume Serial Number is F8F0-B00C

 Directory of C:\Users\pwatson\test

2015-05-28  06:56    <DIR>          .
2015-05-28  06:56    <DIR>          ..
2015-05-28  06:55               263 .profile
2015-05-28  06:56                74 .sh_history
               2 File(s)            337 bytes
               2 Dir(s)  355,497,390,080 bytes free

C:>zip newone.zip test\*
  adding: test/.profile (164 bytes security) (deflated 33%)
  adding: test/.sh_history (164 bytes security) (deflated 58%)

16:31:16.42  C:\Users\pwatson
C:>unzip -l newone.zip
Archive:  newone.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
      263  2015-05-28 06:55   test/.profile
       74  2015-05-28 06:56   test/.sh_history
---------                     -------
      337                     2 files

或者,你的意思是这样吗?

C:>cd test

C:>zip newtwo.zip *
  adding: .profile (164 bytes security) (deflated 33%)
  adding: .sh_history (164 bytes security) (deflated 58%)

C:>unzip -l newtwo.zip
Archive:  newtwo.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
      263  2015-05-28 06:55   .profile
       74  2015-05-28 06:56   .sh_history
---------                     -------
      337                     2 files