See updated answer below
Windows batch files.
I really like 7-Zip and it works great, but like WinZip, you can move files and timestamp files. However, WinZip (command line interface) has limitations on file size and number of files in the archive, for example.
Googling we see that there is a person who made a 7-zip code and recompiled the code to use the -m (move) switch. However, I do not feel comfortable using third-party Developers of 7-zip in our production environment.
Also, I saw - http://alternativeto.net/software/7-zip/
I coded: IF NOT ERRORLEVEL 1 (after the Zip process) to delete the file, but it is unsafe if there are several identical file name structures.
Here are some examples of code bits: 7zip:
D:\scripts\7za -tzip -y a D\zips\20140116_someclient_%computername%@%location%.zip D:\logs\apache_log.2014-01-16* >nul >>%logfile%
IF NOT ERRORLEVEL 1 ECHO Y|DEL D:\logs\apache_log.2014-01-16*
Where apache_log.2014-01-16 can be:
apache_log.2014-01-16.1
apache_log.2014-01-16.2
apache_log.2014-01-16.3
and etc.
Winzip
c:\progra~1\WinZip\Wzzip.exe -T -ex -m D\zips\20140116_someclient_%computername%@%location%.zip D:\logs\some_file.2014-01-16* >nul >>%logfile%
I think, in terms of software requirements, I would like to have some WinZip features in 7Zip. I like 7Zip, as it has the ability to work with large Archives. I like PeaZip and I used PowerArchiver many moons ago. My problem is that I work with Apache Tomcat for Windows, and we have to archive hourly logs, which can be more than 200-300 MB per hour, and it is necessary that the servers are not cleared of old logs.
Hope this makes more sense.
UPDATE:
Believe me, I answered my question.
FOR /F %%F IN ('dir /B "D:\serverlogs\server.log.2014-01-19*"') DO (
D:\work\scripts\7za.exe –tzip –y a "D:\ziplogs\201401109_COMPANY_SERVERNAME@DATACENTER.ZIP" >> D:\WORK\SCRIPTS\LOGS\LOG_20140120.LOG && DEL "D:\serverlogs\%%F"
)
Now it works well.