Menu

Archiving without timestamps

i74
2010-12-03
2023-10-06
  • i74

    i74 - 2010-12-03

    Would be possible to implement an option like this in the next versions of 7-Zip? That is, the 7z archive stores ONLY the files with their CRCs, but without modification time, creation time, etc…

    Regards

     
  • Igor Pavlov

    Igor Pavlov - 2010-12-03

    Write in Parameters:
    tm-
    or in command line version:
    -mtm-

     
  • i74

    i74 - 2010-12-06

    thank you vey much… i didn't know this trick..

     
  • Ulrich VACHON

    Ulrich VACHON - 2010-12-06

    Hi ipavlov,

    Can you tell me where I can find a list of this hiddens parameters. In fact, I could not find documentation about it.

    Regards,
    Ulrich VACHON

     
  • Igor Pavlov

    Igor Pavlov - 2010-12-06

    -m switch.
    but help file is not full - I'll fix it in next version

    tm= default=on Stores last Modified timestamps for files.
    tc= default=off Stores Creation timestamps for files.
    ta= default=off Stores last Access timestamps for files.

    And you can use "-" instead of "=off".

     
  • Ulrich VACHON

    Ulrich VACHON - 2010-12-06

    Thank you ipavlov,

     
  • suyash motarwar

    suyash motarwar - 2010-12-22

    Hello Ipavlov,

    The switches mentioned above works perfectly fine for "7Z" archieve format. However it doesn't work the same way when using "zip" archieve format.

    In case of zip archive format, -mtc- switch avoids embedding file creation and access time, however irrespective of the switch provided it always embeds modification time.

    Is it possible to have these switches for zip archive format as well.

    Thanks a ton in advance.

     
  • Igor Pavlov

    Igor Pavlov - 2010-12-22

    ZIP format requires Modified Time field.
    And I don't think that 0s are allowed there.
    Why do you need that feature?

     
  • suyash motarwar

    suyash motarwar - 2010-12-22

    I deploy my client components in the form of multiple zip files. I also maintain MD5Sum values of my zip files in a master file. Every release some of my zipped components might change. My upgrader module identifies the changed components by comparing md5sum value of components present on users machine with the master file deployed on the webserver. This way Upgrader ensures that only changed components are downloaded.
    However every time I run my build tool it changes MD5sum of all the zipped component(because of the file modification time). I am working with > 200 components and this is bringing too much overhead to track all the modified components in a release.

    Thanks in advance for your patience.

     
  • Igor Pavlov

    Igor Pavlov - 2010-12-22

    You can try to compress files without folder items.
    Create list file with paths for all files that you want to include to archive.

     
  • dos386

    dos386 - 2010-12-24

    > ZIP format requires Modified Time field.
    > And I don't think that 0s are allowed there.

    Just drop 1980-01-01 00:00:00 there in ;-)

    > Why do you need that feature?

    Me too, please :-)

     
  • suyash motarwar

    suyash motarwar - 2010-12-28

    Following is my use case:
    1. I have a file Test.txt
    2. Lets say MD5sum of this value is "XXXXXXXXXXXXXXXX"
    3. If I change Test.txt's creation/modification/access date, the md5sum value for this file will remain same, as the MD5sum utility doesn't consider file modification time for evaluating md5sum value.
    4. However if I zip the Test.txt in step 1 and Test.txt in step 3, the md5sum value of zipped files would differ.
    5. This is due to the fact that 7Zip(for that matter any compression utility) embeds file modification time.

    In my Source repository I maintain the assets in uncompressed form, however when I deploy my assets on the webserver I deploy it in compressed form, to save on bandwidth consumption.

    If Zip format does require modified time, then putting in 1980-01-01 00:00:00 would solve the issue for me as wel.

    bty,
    > ZIP format requires Modified Time field.
    Could you elaborate more on this, just curious about it.

     
  • Igor Pavlov

    Igor Pavlov - 2010-12-28

    Why do you change Test.txt's modification time in 3)?

     
  • suyash motarwar

    suyash motarwar - 2010-12-28

    > Why do you change Test.txt's modification time in 3)?
    All my assets are committed in SVN, and each time I checkout the assets(prebuilt dlls/exes/images), it gets the latest timestamp on the checked out file.
    I can see an option on the SVN "Set file dates to last commit time", however this option is not suggested as the source files will also get the last commit time stamp.

    Also, this option doesn't work on folders, folders always get the current time stamp. So if my package contains folders, each time I start my build the zip archive would get new MD5sum.

     
  • suyash motarwar

    suyash motarwar - 2011-01-03

    Hello Ipavlov,

    Considering your comments above I am contemplating on using 7Zip archive format for compressing my components. For this I would have to ship new unzipper libraries.
    For my requirements the unzipper component need to be light weight. I suppose I would have to use 7zxa.dll. Could you point me to any sample application for integrating 7zxa.dll. I couldn't precisely locate this in SDK.

    Also the documentation says:
    7za.dll and 7zxa.dll can work in Windows 95/98/ME/NT/2000/XP/2003.  - Does is mean its not supported on Vista/Win7

    Thanks in advance for your comments.

     
  • Igor Pavlov

    Igor Pavlov - 2011-01-03

    It must work in all versions of Windows.
    EXAMPLE code ion 7-zip source:
    CPP\7zip\UI\Client7z\

     
  • revati pati

    revati pati - 2023-10-05

    Hi IPovlov,

    Is there a way to suppress the "File description", "Company", "File version" for the generated .exe files? I mean while we generating self extract exe files, can we suppress the above 3 attributes. I would like to show only the "Date created" and "Size" for the self extarct exe files.

     
  • Igor Pavlov

    Igor Pavlov - 2023-10-05

    you need some resource editor.
    or recompile source code.

     
  • revati pati

    revati pati - 2023-10-05

    could you please elaborate more?

     
  • Igor Pavlov

    Igor Pavlov - 2023-10-05

    version information is included to resoure part of 7-zip sfx executable.
    There is no feature in 7-zip to change it.
    You need external program (resource editor) to change it.
    Or you can recompile sfx with visual studio.

     
  • revati pati

    revati pati - 2023-10-05

    Thank you so much Igor Pavlov. Also can you please point me to the source code?

     

    Last edit: revati pati 2023-10-05
  • revati pati

    revati pati - 2023-10-05

    can you please point me to the source code?

     
  • Igor Pavlov

    Igor Pavlov - 2023-10-05
    SRC\C\7zVersion.h
    CPP\7zip\Bundles\SFXCon\
    CPP\7zip\Bundles\SFXCon\resource.rc 
    
     
  • revati pati

    revati pati - 2023-10-06

    Thank you Igor Pavlov. Can I take the source code for the git https://github.com/mcmilk/7-Zip and update the changes as per the your suggestion. And using visual studio we can recompile the source. Then use the generated .exe file from the release folder and copy it to my installation directory. Is this the correct process? Basically i am asking how do i recompile with the updated changes. Thanks in advance for the help.

     
  • Igor Pavlov

    Igor Pavlov - 2023-10-06

    get source code from here:
    https://www.7-zip.org/download.html
    to recompile you need visual studio, and call nmake command from folder:

    CPP\7zip\Bundles\SFXCon\
    

    note that latest visual studio doesn't give compatibility with old systems: (like Windows XP).
    So you need old visual studio if you want Windows XP compatibility.

     

Log in to post a comment.