How to zip a file using cmd line?

前端 未结 8 1245
灰色年华
灰色年华 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:49

    Yes, we can zip and unzip the file/folder using cmd. See the below command and simply you can copy past in cmd and change the directory and file name

    To Zip/Compress File
    powershell Compress-Archive D:\Build\FolderName D:\Build\FolderName.zip

    To Unzip/Expand File
    powershell expand-archive D:\Build\FileName.zip D:\deployments\FileName

提交回复
热议问题