Swiftease

7-Zip Filedate Resetter

In my respect, 7-Zip is the best file compressor ever. It is efficient, can be operated with a multitude of parameters at a command line and it’s free.

Unfortunately, with every update of an archive, 7-Zip also updates the archive’s file date even when the contents itself is unchanged. This is disturbing when you use 7-Zip as a simple, automated  backup-tool, to build archives, that are later transferred via FTP. As the FTP client finds a file with a later file date, it will transfer it unnecessarily when the contents is actually unchanged.

7zDateReset is a standalone command line tool which sets the date of the 7-Zip archive to the date of the latest contained file (=default). Alternativly it can set archive date to that of the oldest contained file.

Usage: Call with either archive or folder name to change either a single archive or all .7z archives in one folder. If date should be set to that of oldest contained file, state “/oldest” as 2nd parameter. Parameter “/batch” suppresses error-announcements (e.g. if zip file is empty or non-existent) for more tolerant batch handling. The program returns errorlevel codes.

No setup necessary, please check readme.txt for different installation procedures on 32- and 64-bit systems!

Already in 2010 7-zip received the “-stl” switch to set the archive timestamp to the most recently modified file. Unfortunately this and all later versions were alpha or beta versions only. In November 2015, with the appearance of the first final version after five years (15.12) this tool became redundant when the “-stl” switch is used. 

Please Note: Program will not work with “-mhe” encryption option

Windows Freeware / 32 & 64 Bit / Version: 2.2 / 545 kB

download_button

7 Comments

  1. Oliver Kemmesies

    7-Zip DateReset: Tolles Programm. Ich nutze es, um ein tägliches Backup mittels SkyDrive einzurichten. Damit nicht jedesmal nicht geänderte Dateien hochgeladen werden müssen, habe ich genau nach einem solchen Programm gesucht.

  2. Steffen (Post author)

    @citizen: That’s right. Still, command-line scripts are useful for repetitive tasks.

  3. citizen

    p.s., Command-line or scripting is not necessary. In Windows, drag a folder (or a single .7z file) onto your 7zDateReset.exe

  4. citizen

    Thank you for 7zDateReset (2.1.2).

    Please consider adding .zip extension, etc, if the 7z.dll handles that too. (I know the 7-zip application does, but I don’t know about the dll.)

  5. Chris Keller

    Hallo,

    7zDateReset: hab’ schon soo lange auf ein solches Tool gewartet!

    Funzt Dank perfekter Beschreibung auch mit 7z 64-Bit einwandfrei.

    Danke, Chris

  6. Steffen (Post author)

    @A.Ok: I extended the functionality to process also folders. Just call with a folder as parameter and all .7z files are processed.

  7. A.Ok.

    Hello,
    I just used 7zDateReset, works great, but one thought: does it work with only one file per call?

    I run this batch in a folder with ~2k files:

    FOR %%F IN (*.7z) DO “%program files%7-Zip7DateReset.exe” “%%F”

    so it is called thousands of times, is it OK for system hard drive and such?

Leave a Comment

Your email address will not be published. Required fields are marked *