When compressing files into a 7z file from the command line, it doesn't show empty files in the log. They are being added into the archive just fine, but the log just doesn't show them. When compressing into a zip file, the log does show them. I'm using the -bb3 switch to turn on full logging - are there any other switches I can use to show the empty files have been added to the archive?
it's not simple to fix it.
7z archive uses special records for empty files.
So 7Z.dll doesn't request the data for empty files from 7z.exe.
if we requst the data, data can be non-empty. So we can't use special records anymore. And we need another code for them.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I obviously have no idea how it works, but either at the point it looks at the file and decides it's empty, or wherever it uses the special record, might it be possible to add a note into the log? It's handling the files fine from what I can see, it would just be handy to have these empty files mentioned in the output, even if it's a separate section at the end etc
Never mind if not, I might just have to use zip files for this particular use-case.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When compressing files into a 7z file from the command line, it doesn't show empty files in the log. They are being added into the archive just fine, but the log just doesn't show them. When compressing into a zip file, the log does show them. I'm using the
-bb3switch to turn on full logging - are there any other switches I can use to show the empty files have been added to the archive?This is using 7-Zip 16.04 64-bit on Windows 10
7z Example
1) Create a new directory
2) Create an empty file
3) Create a file with some data in it
4) Create a 7z file. Note the switch
-bb3to turn on full logging, but only the file with data is shown as having been added to the archive5) List the archive file - note that the empty file has been added to the archive OK
Zip Example
1) Create a new directory
2) Create an empty file
3) Create a file with some data in it
4) Create a zip file. Note the switch
-bb3to turn on full logging. This time, both files are shown as having been added to the archive5) List the archive file - note that the empty files are again both in the archive
it's not simple to fix it.
7z archive uses special records for empty files.
So 7Z.dll doesn't request the data for empty files from 7z.exe.
if we requst the data, data can be non-empty. So we can't use special records anymore. And we need another code for them.
I obviously have no idea how it works, but either at the point it looks at the file and decides it's empty, or wherever it uses the special record, might it be possible to add a note into the log? It's handling the files fine from what I can see, it would just be handy to have these empty files mentioned in the output, even if it's a separate section at the end etc
Never mind if not, I might just have to use zip files for this particular use-case.
Thanks