This is a folder backup tool, after i got tired of using tools made by others, that had either lack of functionality,
or were overly complex, i decided to make my own, and this is it.
MirrorDir mirrors dirs as the name says, simply select source and destination hit scan, review in the list if that's what you want it to do and press start copy.
As this is a mirror sync tool, this means files that exist in destination but dont exist in source are marked for deletion.
Other tools have other modes like the incrementing copy which does not delete anything, but i made this for me,
only if there is a request i may think about adding features just for fun.
Whats more? There's a save/load of profile and the profile is what contains the list of source and destination folders, these are kept in prefs.ini in folder MDir in local appdata.
There are context menu's that allow for the removal of items from the profile list, either just for the list (in case you dont want to sync a specific folder, just this time)
or delete from the list and the .ini .
Profiler - yet another backup script for Firefox and Thunderbird profiles
It automatically detects the last recently used profile directories of Firefox and Thunderbird (installed versions, no portables).
Clicking the Backup-Button creates a complete Backup of the found profiles with a timestamp.
Restore deletes the according profile dir and extracts the content of the selected archive into the profile directory.
Uses Winrar as compression tool, but feel free to change it to your needs
Please pardon my noobiness. I am working on backup restore script where a progress bar is required. I have tried using following code which works fine with folders but not really with single file because robocopy
Func CopyFolder($srcDir, $destDir, $part) ;======> $part shows whats being copied (e.g. Desktop, Documents etc.) If StringRight($srcDir, 1) = "\" Then $srcDir = StringLeft($srcDir, StringLen($srcDir) - 1) If Not FileExists($destDir) Then DirCreate($destDir) $srcSize = DirGetSize($srcDir, $DIR_EXTENDED) $1_percent = $srcSize / 100 $cmd = 'C:\Windows\System32\robocopy.exe "' & $srcDir & '" "' & $destDir & '" /E /Z /XO /XX /FFT /XJ /NDL /NJH /FP /ETA /NP /V /R:10 /W:5 /LOG+:"' & $logFile & '" /XF desktop.ini thumbs.db' Run(@ComSpec & " /c " & $cmd, "", @SW_HIDE) Do Sleep(300) Until ProcessExists("robocopy.exe") ProgressOn($part, $1_percent & "%", "", 0, 0, 16) Do $destSize = DirGetSize($destDir, $DIR_EXTENDED) ProgressSet(Round($destSize / $1_percent, 2), Round($destSize / (1024 * 1024), 2) & " MB of " & Round($srcSize / (1024 * 1024), 2) & " MB copied", Round($destSize / $1_percent, 2) & "%") Sleep(200) Until ProcessExists("robocopy.exe") = 0 ProgressOff() FileWriteLine($logFile, @CRLF & @CRLF) EndFunc ;==>CopyFolder Part of the problem is that I need to generate logs of files being copied. One particular problem is firefox profile directory. the directory is named as oi3jdslk.default or asdwdx.new and I need to copy places.sqlite from this directory.
Xcopy manages to copy FROM this directory but not TO this directory because of wildcards
Then I came across this neat script
Func CopyFile($fromFile, $todirectory) Local $FOF_RESPOND_YES = 16 Local $FOF_SIMPLEPROGRESS = 256 $winShell = ObjCreate("shell.application") $winShell.namespace($todirectory).CopyHere($fromFile, $FOF_RESPOND_YES) EndFunc ;==>CopyFile It helped me copy other single files but not the one required from firefox profile folder. Here is how I am trying to process that
$path = @UserProfileDir & "\AppData\Roaming\Mozilla\Firefox\" & $ffDir & "\places.sqlite" CopyFile($path, $BUFolder & "Mozilla") ;===> $BUFolder = "E:\" & @username & " - Backup\" #cs ====================================================== $ffDir is another variable derived from this function. This variable is the gets the default firefox profile to copy places.sqlite from $ffDir is returned as Profiles\xbsen2s.default (Firefox randomizes the profile directory for extra security(?). At least that's what they say. #ce ====================================================== Func FFProfile() Local $iniFile = @UserProfileDir & "\AppData\Roaming\Mozilla\Firefox\profiles.ini" Local $ddNumber Local $ddLine Local $Line If FileExists($iniFile) Then FileOpen($iniFile, 0) For $i = 1 To _FileCountLines($iniFile) $Line = FileReadLine($iniFile, $i) If StringInStr("DEFAULT=1", $Line) Then $ddNumber = $i - 1 ExitLoop ElseIf StringInStr("Name=default", $Line) Then $ddNumber = $i + 2 EndIf Next $ddLine = FileReadLine($iniFile, $ddNumber) $ffDir = StringReplace(StringTrimLeft($ddLine, 5), "/", "\") $ffInstall = 1 Else $ffInstall = 0 EndIf FileClose($iniFile) EndFunc ;==>FFProfile I really like how natural the progress bar from second copy script look like and would like to keep the progress bar uniform across the program. I am willing to learn if anyone can point me in right direction and help me achieve this.
Any help is highly appreciated!!
Hi I need your help
I need download backup from 200 remote pc. I calculate that I can download 20 backups in one time. I need to create loop, take localizations from txt file and start 20 downloads in one time (i want use ShellExecute and robocopy), after finish one from running 20 take another localizations from txt file until localizations finish. And I need trigger if is 7:00 pause script. I hope you know what I mean
Many thanks for help, sorry for my english.
This is what I got:
#include <MsgBoxConstants.au3> #include <WinAPIFiles.au3> #include <FileConstants.au3> #include <File.au3> #include <Array.au3> #include <Date.au3> Local $targets = @ScriptDir& "\targets.txt" Local $log_name = "\autoit.log" MsgBox($MB_SYSTEMMODAL, "", "start copy", 1) Example() Func Example() If Not FileExists($targets) Then MsgBox($MB_SYSTEMMODAL, "", "The file targets.txt - doesn't exist!") Exit EndIf FileOpen($targets, 0) Global $arr ReDim $arr[_FileCountLines($targets)+1] For $i = 1 to _FileCountLines($targets) $line = FileReadLine($targets, $i) $arr[$i] = $line ; Check if is online Local $iPing = Ping($arr[$i], 250) If $iPing Then ; ONLINE $rc = FileCopy("\\"&$arr[$i]&"\e$\backup\", @ScriptDir&"\downloads\"&$arr[$i]&"\", $FC_CREATEPATH) If $rc = 0 Then _FileWriteLog(@ScriptDir & $log_name, $arr[$i]&" ONLINE error") Else _FileWriteLog(@ScriptDir & $log_name, $arr[$i]&" ONLINE done") EndIf Else ;OFFLINE _FileWriteLog(@ScriptDir & $log_name, $arr[$i]&" OFFLINE") EndIf Next EndFunc ;==>Example MsgBox($MB_SYSTEMMODAL, "", "Finish downloads backups") Exit
is there a way to post into the "Usenet" with autoit ?
I didn't found any resources about it online.