How to zip a file using cmd line?

前端 未结 8 1269
灰色年华
灰色年华 2020-12-14 07:10

I want to zip a directory using bat file command.

For example if i want to unzip a file means i can use jar xf file.zip bat file command.

Like t

8条回答
  •  被撕碎了的回忆
    2020-12-14 07:45

    Not exactly zipping, but you can compact files in Windows with the compact command:

    compact /c /s:
    

    And to uncompress:

    compact /u /s:
    

    NOTE: These commands only mark/unmark files or directories as compressed in the file system. They do not produces any kind of archive (like zip, 7zip, rar, etc.)

提交回复
热议问题