如何在儘可能少的步驟中壓縮和密碼保護檔案?

如果要壓縮大量檔案,並且要為每個檔案新增密碼保護,那麼最簡單或最快速的方法是什麼?今天的超級使用者問答帖子回答了一位好奇的讀者的問題。...

如何在儘可能少的步驟中壓縮和密碼保護檔案?

如果要壓縮大量檔案,並且要為每個檔案新增密碼保護,那麼最簡單或最快速的方法是什麼?今天的超級使用者問答帖子回答了一位好奇的讀者的問題。

今天的問答環節是由SuperUser提供的,SuperUser是Stack Exchange的一個分支,是一個由社群驅動的問答網站分組。

問題

超級使用者讀者DAE想知道如何用盡可能少的步驟壓縮和密碼保護檔案:

I need a way to take a bunch of files and compress them into separate zip files with each using the same password. I want to be able to do this in one simple step. I have created a batch file that zips each of them using 7zip (which worked perfectly), but does not password protect them.

Is there a command that I can add to the batch file that includes the password? Or alternatively, how can I create a batch file that will password protect the compressed files?

如何在儘可能少的步驟中壓縮和密碼保護檔案?

答案

超級使用者貢獻者DavidPostill為我們提供了答案:

How can I create a batch file that will password protect the compressed files?

Use the -p option, -p (set password) switch, which specifies the password.

Syntax

  • -p{password}

{password} specifies the password

Examples

Compresses *.txt files to archive.7z using the password “secret”. It also encrypts archive headers (-mhe switch) so that the file names will be encrypted.

  • 7z a archive.7z -psecret -mhe *.txt

If compressing folders:

  • “C:\Program Files (x86)\7-Zip\7z.exe” a “%%X.zip” -psecret “%%X\”

Extracts all files from archive.zip using the password “secret”.

  • 7z x archive.zip -psecret

Source: -p (set Password) switch


有什麼要補充的解釋嗎?在評論中發出聲音。想從其他精通技術的Stack Exchange使用者那裡瞭解更多答案嗎?在這裡檢視完整的討論主題。

  • 發表於 2021-04-08 03:33
  • 閱讀 ( 44 )
  • 分類:網際網路

你可能感興趣的文章

如何在一分鐘內對excel檔案進行密碼保護

... 如何對excel檔案進行密碼保護? ...

  • 發佈於 2021-03-12 07:52
  • 閲讀 ( 49 )

修復windows中損壞檔案的5個最佳工具

...題。如果檔案中丟失了整個資料塊,那麼工具就無法知道如何填補這些空白。不要被欺騙,以為一個更昂貴的應用程式將解決更多的問題!價格與此無關。 ...

  • 發佈於 2021-03-13 08:54
  • 閲讀 ( 46 )

為什麼密碼保護zip檔案很重要

您可能曾經處理過ZIP檔案。無論您是想自己歸檔一堆檔案,下載一個應用程式的可移植版本,還是向某人傳送一組檔案,ZIP檔案都是一種快速而簡單的方法。 ...

  • 發佈於 2021-03-13 19:19
  • 閲讀 ( 29 )

如何對mac上的檔案和資料夾進行密碼保護

... 今天我們將介紹如何在Mac上保護單個檔案和資料夾的密碼。 ...

  • 發佈於 2021-03-14 01:15
  • 閲讀 ( 51 )

如何為您的網站建立登入保護區

您已經學習瞭如何建立網站並閱讀了jQuery指南。下一步是什麼?為你的網站建立一個密碼保護區對於保證你的東西的安全是至關重要的。幸運的是,這比你想象的要容易! ...

  • 發佈於 2021-03-14 14:27
  • 閲讀 ( 55 )

如何密碼保護你的隨身碟:5個簡單的方法

想學習如何保護快閃記憶體驅動器嗎?不幸的是,你不能用密碼保護整個隨身碟。但是您可以加密分割槽、資料夾和存檔。 ...

  • 發佈於 2021-03-18 13:59
  • 閲讀 ( 47 )

es檔案管理器:它是android最好的檔案管理器嗎?

...,如果你覺得你的Android在它能做的事情上是有限的,那可能是缺少一個檔案瀏覽器。 ...

  • 發佈於 2021-03-26 00:16
  • 閲讀 ( 55 )

如何在mac上壓縮檔案

... 如何在mac上壓縮大檔案 ...

  • 發佈於 2021-03-26 21:26
  • 閲讀 ( 54 )

想保持個人資料的安全嗎?下面是如何加密檔案

...的解決方案,可以保護所有檔案和資料,而不管其重要性如何。 ...

  • 發佈於 2021-03-28 13:03
  • 閲讀 ( 44 )

如何在mac上製作zip檔案

... 本指南將介紹什麼是ZIP檔案,以及如何在macOS中建立ZIP檔案。 ...

  • 發佈於 2021-03-28 16:40
  • 閲讀 ( 69 )
ive87165
ive87165

0 篇文章

作家榜

  1. admin 0 文章
  2. 孫小欽 0 文章
  3. JVhby0 0 文章
  4. fvpvzrr 0 文章
  5. 0sus8kksc 0 文章
  6. zsfn1903 0 文章
  7. w91395898 0 文章
  8. SuperQueen123 0 文章

相關推薦