5
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 5 years have passed since last update.

Windowsの標準機能でzip化すると、ピリオドで始まるフォルダの2個目が消える

Last updated at Posted at 2018-03-25

環境

  • Windows10
  • Windows標準搭載のzipプログラム(右クリック→送る→圧縮(zip形式)フォルダー)

image

問題

以下のような、ピリオドから始まるフォルダ(.settings, .mvn)が複数存在するフォルダを用意します。

sample1フォルダの中身
2018/03/25  19:30    <DIR>          .
2018/03/25  19:30    <DIR>          ..
2018/03/25  19:29    <DIR>          .mvn
2018/03/25  19:29    <DIR>          .settings
2018/02/03  13:16             1,243 sample1.txt
               1 個のファイル               1,243 バイト
               4 個のディレクトリ  83,119,607,808 バイトの空き領域

image

このフォルダを、Windows標準機能でzip化します。

zip化されたフォルダの中身を確認すると、.settingsフォルダが消えていました。

image

調査

.mvnフォルダのみ存在するフォルダをzip化して確認

image

zip化したフォルダの中身に、 .mvnフォルダは存在しました(復元できた)。

.settingsフォルダのみ存在するフォルダをzip化して確認

image

zip化したフォルダの中身に、 .settingsフォルダは存在しました(復元できた)。

結果

以下の条件を満たすフォルダを、Windows標準機能でzip化すると、完全に復元できません。

  • ピリオドから始まるフォルダが複数存在する

具体的には、ピリオドから始まる2個目以降のフォルダが、zip化ファイルに含まれません。
(たぶん名前順に並べたときの2個目以降)

解決方法

7-Zip を使い、完全に復元できることを確認しました。

感想

ピリオドで始まるファイル/フォルダをWindowsで扱う場合は、注意が必要ですね。

5
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
5
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?