7-Zip is an awesome tool, but sometimes it works in a strange way. Consider the following directory D:\dir
layout:
foo <DIR>
bar <DIR>
baz <DIR>
empty <DIR> -- this directory is empty by intention
Now when executing the following commands:
>D:
>cd D:\dir
>7z a -r -bb3 -mx9 -mmt -ms empty.7z empty
7-Zip [64] 16.04 : Copyright (c) 1999-2016 Igor Pavlov : 2016-10-04
Scanning the drive:
0M Scan foo\bar\baz
For some reason 7-Zip scans directories that are not relevant to the compression process. This is relevant to 7-Zip [64] 16.04, but it worked like that in much older versions. Not sure if it's also reproducible on Linux.
How do I disable the scan and make 7-Zip analyze the specified directory recursively only?
Edit
Igor Pavlov, the creator of 7-Zip, has kindly clarified to me how 7z
works for such a scenario.
7z
could take some time to scan them? What if you try to archive an empty directory, sayC:\7ztest
, from the root of your drive C?