1 post in this topic
is there a way to post into the "Usenet" with autoit ?
I didn't found any resources about it online.
I wanted to have a few lines that copy the whole registry into a file. I know that there is RegRead, but I don't want to type every single key into my code...
Any way of doing this easily? Filetype doesn't matter, as long as it isn't encrypted. A batch or exe would be okay, if it's in the same location on every PC. Doing this without admin permissions would be awesome too
TinyBackupBox : Do a Backup of folders you want to a local/external drive/directory by using Robocopy.
A Big Thank to Yashield for TVExplorer.au3 and WinApiEx.au3
Includes needed : >TVExplorer.au3 and >WinApiEx.au3
* Left Treeview :
Check all folders Checkboxes you want to backup.
Hold Shift key when clicking a first child Checkbox will check all other child Checkboxes.
A right click on a parent item will uncheck all his child Checkboxes.
* Right Treeview :
A left click for select Backup Directory.
A right click menu on an item for create a new sub-folder which you can give the name you want.
This new sub-folder will be created and added as child item of the item you have right clicked.
* Start Button :
A Click on Start Button will start backup normally.
Hold Shift key when clicking it will start backup on Idle Mode.
Idle Mode is used for start or resume backup after a period of user inactivity (that you can set by tray menu)
and will pause current backup if not idle.
* Stop Button :
A click on Stop Button will Pause backup, and any changes will affect the backup when resume it.
You can resume a current backup by Re-clicking Start Button.
Hold Shift key when clicking Stop Button will totally Cancel current backup.
In Idle mode Stop Button is inactive until you Hold Shift key and click for Cancel current backup.
* Refresh Button :
A Click will refresh both treeviews and set them to the previous selections you have done.
Hold Shift key when clicking it will refresh both treeview and set them to the root.
* Tray Menu :
By Default Robocopy copy only new files,
so i add the possibility to
_ delete previous existing dir.
_ delete destination files and dirs that no longer exists in source.
_ Preserve all Attributes.
_ Show Robocopy Console window.
_ Set Idle Time Delay.
_ Open Backup Dir.
Update of 2011-12-21
Previous downloads : 103
source and executable are available in the Download Section
minimalist but handy !
Hope you like it !
And do not forget to create backup periodically !
Do a backup of a folders list
WARNING: I never tried this on a root directory, I should probably write a fix for that case. EX: There is no C:\..\
I don't know how many of these there are on this forum and I know Tidy is real nice for making backups.
I have a few dislikes relying on the Tidy backup:
1 I'm not crazy about the backup folder it creates in project folder.
2. If no Tidy edits are performed script is not backed up on Tidy. I can't rely on that when I request a backup.
3. If I want to backup a select group of files without backing up the entire project folder, it is somewhat tedious to select each file and Tidy.
Now this is just a very simple script that I felt I could use to simplify backing up my project.
I'm not asking you to code it for me, but I welcome feedback. If you think you can make it better or know of something better please share.
I know of Github it's overkill for me, I'm not comfortable, and I won't use it as much as I need to.
So here it is:
You place it in the source folder, open it in Scite.
Change: Global $gBackup_dir_path = "..\Backup\" to wherever you want you backup folder Path to be.
in the main() add some backup("file_name") calls remember to remove file extension.
and it should make a new backup file for each backup("file_name") every time you run the script.
Test it out make sure it's working and you're good to go.
#cs ---------------------------------------------------------------------------- AutoIt Version: 126.96.36.199 Author: myName Script Function: To copy files to a backup folder. #ce ---------------------------------------------------------------------------- #include <File.au3> Global $gBackup_dir_path = "..\Backup\" ; Todo ; Add notes, options notes in file name main() func main() ; File list remember to remove extentions from file_name ; or add file extention as second parameter backup("Map_Editor") backup("DW_Server") EndFunc Func backup($spFile_name, $spFile_ext = ".au3") Local $error = 0 Local $iFile_num = 0 ; Make source file path Local $sFile_path_source = $spFile_name & $spFile_ext Local $sFile_path_dest = "" ; Sample the contents of the backup directory before creating a file there Local $aFile = _FileListToArray($gBackup_dir_path, $spFile_name&"*"&$spFile_ext, $FLTA_FILES) $error = @error If $error = 0 Then $iFile_num = $aFile EndIf out("Found: " & $iFile_num & " files named: " & $spFile_name) Do ; Incroment file_num to find available file_name $iFile_num += 1 ; Path to Write File Copy $sFile_path_dest = $gBackup_dir_path & $spFile_name & "_" & $iFile_num & $spFile_ext ; Refuse to Overwrite File If FileExists($sFile_path_dest) = 0 Then ExitLoop EndIf ; Am I right? Sleep(30) Until 0 ; Create the file FileCopy($sFile_path_source, $sFile_path_dest, $FC_CREATEPATH) $error = @error If $error Then out("FileCopy() error: " & $error) out("sFile_path_source: " & $sFile_path_source & " sFile_path_dest: " & $sFile_path_dest) EndFunc ;==>backup Func out($output = "", $user = 0);debug tool ConsoleWrite(@CRLF & $output);to console new line, value of $output EndFunc ;==>out Backup_Script.au3
The script isn't authorized to overwrite files, and tries to create the next number of file_name available.
The 'p' in my variable names stands for parameter.