Jump to content

Saving logs to .rar?


Recommended Posts

I made this to delete the log files I have and make new to replace, but I would like to actually store them as .rar files instead of deleting them. Have it save the file as that days date and time. I have looked through posts and search files just to do this script but saw nothing on saving as .rar but I did see something about this _Date_Time_SystemTimeToFileTime. Currently it is ran in the directory that the files are in cause I have several that I use. Any help would be great!

#include <File.au3>

Global $AwesomERR = "\Awesom-O.err"
Global $AwesomO = "\Awesom-O.log"
Global $Dump = "\Dumping.log"
Global $games = "\games.txt"
Global $ID = "\Identifying.log"
Global $Pick = "\Picking.log"
Global $Sell = "\Selling.log"
Global $Stash = "\Stashing.log"


FileRecycle (@ScriptDir & $AwesomERR)
FileRecycle (@ScriptDir & $AwesomO)
FileRecycle (@ScriptDir & $Dump)
FileRecycle (@ScriptDir & $games)
FileRecycle (@ScriptDir & $ID)
FileRecycle (@ScriptDir & $Pick)
FileRecycle (@ScriptDir & $Sell)
FileRecycle (@ScriptDir & $Stash)
MsgBox(4096, "Notice", "Awesom-O log files have been deleted to Recycle Bin")

_FileCreate(@ScriptDir & $AwesomERR)
_FileCreate(@ScriptDir & $AwesomO)
_FileCreate(@ScriptDir & $Dump)
_FileCreate(@ScriptDir & $games)
_FileCreate(@ScriptDir & $ID)
_FileCreate(@ScriptDir & $Pick)
_FileCreate(@ScriptDir & $Sell)
_FileCreate(@ScriptDir & $Stash)

Exit
Link to comment
Share on other sites

Thanks for your help but this is actually my first autoit script I am starting myself. I have edited others and that has worked out ok but doing this from scratch is a little challanging. I'm getting nowhere with RunWait or trying the the plugin (cause I'm retared lol). I'll see what I can work with, any other help feel free to send it my way!

-Edit .zip would work too I guess!!

Edited by rogue5099
Link to comment
Share on other sites

hi

you could use the internal rar function to name the rar file to current time / date

rar a -agDD_MM_YYYY_HHMM c:\backups *.log

with autoit

$rc= Runwait("rar a -agDD_MM_YYYY_HHMM c:\backups *.log")

Edited by nobbe
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...