Rogue5099 Posted April 29, 2008 Share Posted April 29, 2008 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 My projects: Inventory / Mp3 Inventory, Computer Stats Link to comment Share on other sites More sharing options...
Zedna Posted April 29, 2008 Share Posted April 29, 2008 File name based on Today's date: $name = StringRight(@YEAR,2) & '-' & @MON & '-' & @MDAY & '.rar' As for RAR: There are posts on the forum about using unrar.dll but for creating RAR archive the best will be call rar.exe by RunWait() Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Pain Posted April 29, 2008 Share Posted April 29, 2008 (edited) does it has to be .rar? if .zip is ok here is a topic about it http://www.autoitscript.com/forum/index.ph...=44524&st=0or use WinRARs command line if it has to be in .rar Edited April 29, 2008 by Pain Link to comment Share on other sites More sharing options...
Rogue5099 Posted April 29, 2008 Author Share Posted April 29, 2008 (edited) 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 April 29, 2008 by rogue5099 My projects: Inventory / Mp3 Inventory, Computer Stats Link to comment Share on other sites More sharing options...
Zedna Posted April 29, 2008 Share Posted April 29, 2008 Advice number one: Always use AutoIt helpfile Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Rogue5099 Posted April 29, 2008 Author Share Posted April 29, 2008 Advice number one: Always use AutoIt helpfileThere is no helpfile for this .zip plugin??? Having a hard time just creating a .zip file! Much less naming it and adding files to it. trying functions but no luck right now just errors... fixing them 1 at a time! My projects: Inventory / Mp3 Inventory, Computer Stats Link to comment Share on other sites More sharing options...
nobbe Posted April 30, 2008 Share Posted April 30, 2008 (edited) 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 April 30, 2008 by nobbe Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now