7zip console output not showing all items

  • Buzz

    Buzz - 2014-01-10

    Hi there,

    It seems that when compressing a directory of files to 7z format the console output file count does not match the file count of the folder. So for example if i have a directory with 200 files the console only lists 185 items. The same command using zip format correctly lists all 200 items.
    Is this a bug in 9.20?

  • Shell

    Shell - 2014-01-11

    Please provide the commands you used to create the archives and to check the number of files inside them. Perhaps you did not include all of the files in a 7z-archive. For example, a common mistake is using the *.* wildcard.

  • Buzz

    Buzz - 2014-01-11

    The problem is not the command as all the files are added to the archive. Its just the console output that is incorrect.

  • Buzz

    Buzz - 2014-01-11

    Actually, it seems the problem is caused by empty text files. If you have a bunch of empty text files in a directory and compress them using 7z format no console output is shown for those files. The problem does not occur for zip format (-tzip). Maybe its not a bug, rather just the way 7z format is designed.

  • Shell

    Shell - 2014-01-11

    It is still desirable to look at the commands you issue. My experiment:
    for /l %i in (0,1,199) do copy nul %i.txt
    7z920 a test.7z *.txt
    7z920 l test.7z

    I used 7-Zip 9.20 Standalone and it shows all the files properly.

    Indeed, 7-Zip divides an archive into blocks, but folders and empty files are not linked to any block. It is possible to not list those files erroneously... but my version of 7-Zip works correctly.

    If it is possible, please upload an archive which behaves wrongly on your system. Also try another archiver or another 7-Zip version if you can - does it show all the files?

    Last edit: Shell 2014-01-11
  • Igor Pavlov

    Igor Pavlov - 2014-01-11

    Yes, there is difference between zip and 7z, when you compress empty files.

    7-Zip doesn't request data of empty files for 7z archives, but it request data for zip archives. For example, if empty file is changed after scan stage, the new data will be included to zip, but it will be not included to 7z.

    Empty file is not problem for zip archive, since 7-Zip can go back for zip archive and remove all extra things.
    But it doesn't go back for 7z archives. So empty file can create empty solid block, that is not too good. So 7-zip doesn't try to read empty file for 7z. And console program doesn't show
    Compressing file.ext

  • Buzz

    Buzz - 2014-01-13

    Ah Ok, thanks for explaining that.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks