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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
-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".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
> 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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
Write in Parameters:
tm-
or in command line version:
-mtm-
thank you vey much… i didn't know this trick..
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
-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".
Thank you ipavlov,
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.
ZIP format requires Modified Time field.
And I don't think that 0s are allowed there.
Why do you need that feature?
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.
You can try to compress files without folder items.
Create list file with paths for all files that you want to include to archive.
> 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 :-)
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.
Why do you change Test.txt's modification time in 3)?
> 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.
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.
It must work in all versions of Windows.
EXAMPLE code ion 7-zip source:
CPP\7zip\UI\Client7z\
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.
you need some resource editor.
or recompile source code.
could you please elaborate more?
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.
Thank you so much Igor Pavlov. Also can you please point me to the source code?
Last edit: revati pati 2023-10-05
can you please point me to the source code?
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.
get source code from here:
https://www.7-zip.org/download.html
to recompile you need visual studio, and call
nmake
command from folder: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.