1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Windows10の標準機能でZIP圧縮するぞい(手動とコマンド両方のやり方)

Posted at

バージョン

Windows10 Pro バージョン1909 OSビルド18363.1198

手動

ファイル右クリック ⇒ 送る ⇒ 圧縮(zip形式)フォルダー
image.png
ファイルと同じフォルダーにzipができる。

コマンドプロンプトで

環境変数使いつつファイル名に現在日付を埋め込む、というオマケ付のコマンドがこちら。

powershell compress-archive %USERPROFILE%\Desktop\ぺこりーぬ.png %USERPROFILE%\Desktop\ぺこりーぬ_%date:~0,4%%date:~5,2%%date:~8,2%.zip

PowerShellで

コマンドプロンプトと同じことをPowerShellでやる場合はこちら。

compress-archive $env:UserProfile\Desktop\ぺこりーぬ.png ($env:UserProfile + "\Desktop\ぺこりーぬ_" + (Get-Date).ToString("yyyyMMdd") + ".zip")

蛇足

powershellではなく、コマンドプロンプトで実行できるコマンドは、レガシーな仕様や要件に対応できるから、個人的には使い勝手いいなあって思います。

コマンドはデータベースの定期バックアップファイルを圧縮するバッチで使ってます。
(データベースのdumpファイルは圧縮するとがっつり容量小さくなる場合がありんす)

zipパスワードの方法は残課題。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?