PDA

View Full Version : Compress Log Files



SteveBazin
2013-12-03, 06:15
Hello,

I want to compress my log files every month with a script. However, I have not level on scripting.

I use a Windows 2008 Server to manage my checkpoint R75.40.

The logs are on the folder : C:\Windows\FW1\R75.40\fw1 and I have another disk to store the zip files.

Anyone can help me ?

Thanks

internallamp
2013-12-03, 15:17
Something like this. Not tested.

forfiles /p "C:\Windows\FW1\R75.40\fw1\log\" /s /m *.* /d +30 /c "cmd /c compact /c @path"

SteveBazin
2013-12-05, 09:03
http://gallery.technet.microsoft.com/scriptcenter/31db73b4-746c-4d33-a0aa-7a79006317e6

I modify this script with my informations and it is ok