ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Finished Programs

DONE: auto-save AutoHotkey.ini daily to another folder

(1/2) > >>

brotherS:
Hi,

I'd like to add a few lines to my main AHK script (that's running 24/7) that will copy this script to another partition but with the name AutoHotkey-YYYY-MM-DD.ini (so for today it would be AutoHotkey-2005-11-24.ini) once a day only - so I'd get one copy for every day the PC is running.

Any ideas? Maybe this could be somehow combined with the auto-reload on save script?


--- ---;2005-11-23
;auto-reloads the AHK script
;http://www.autohotkey.com/forum/viewtopic.php?t=135&highlight=auto+reload
$^s::
  Send, ^s
  SetTitleMatchMode, 2
  IfWinActive, AutoHotkey.ini
    {
       TrayTip, AutoHotkey, reloading script...
       SetTimer, RemoveTrayTip, 1500
     }
return

RemoveTrayTip:
    SetTimer, RemoveTrayTip, Off
    TrayTip
    Reload
return
;http://www.autohotkey.com/forum/viewtopic.php?t=135&highlight=auto+reload

mouser:
very useful idea.
can i suggest two additional features:
1) dont make a new backup file for the day if its identical to the last one.
2) zip it when making backup (in this case you wouldnt have to add date to file, just to zip).

brotherS:
I didn't suggest option 1) because I want it to be as fast as possible, but I like your suggestion 2)!

skrommel:
 :) How about something along the lines of


--- ---SetTimer,BACKUP,60000

BACKUP:
IfNotExist,D:\AutoHotkey-%A_YYYY%-%A_MM%-%A_DD%.ini
  FileCopy,C:\AutoHotkey.ini,D:\AutoHotkey-%A_YYYY%-%A_MM%-%A_DD%.ini
Return
Skrommel

brotherS:
:) How about something along the lines of
[...]
-skrommel (November 24, 2005, 10:40 AM)
--- End quote ---
clean and simple solution, thanks! :)

Navigation

[0] Message Index

[#] Next page

Go to full version