Need help with compress keeping the old version

Help
2013-10-20
2013-10-20
  • Tô na Rede!

    Tô na Rede! - 2013-10-20

    Hi folks!

    I want to compress a folder keeping the old version every compression, like this:

    First run: c:\test
    test.7z

    Second run: c:\test
    test.7z
    test001.7z

    Third run: c:\test
    test.7z
    test001.7z
    test002.7z

    .
    .
    .

    And so on ...

    It's possible???

    Tks!

    Luciano (Belo Horizonte, Brazil)

     
    • fernando

      fernando - 2013-10-20

      no native function of 7-zip.
      solution is to script using OS native or third party utilities.
      on second run - test.7z of first run is renamed to test001.7z?

      here, ten iterations - look at...

      SETLOCAL ENABLEDELAYEDEXPANSION
      IF EXIST test009.7z DEL test009.7z
      FOR /L %%I IN (8, -1, 1) DO (
      IF EXIST test00%%I.7Z SET /A J=%%I+1
      REN test00%%I.7Z test00!J!.7Z
      )
      ENDLOCAL
      IF EXIST test.7z REN test.7z test001.7z
      7Z a test c:\test
      
       
      Last edit: fernando 2013-10-20

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks