Jump to content

Simple backup scripts.


Diana (Cda)
 Share

Recommended Posts

I feel daring enough to contribute something. I've been backing up files with fantastic freeware app for years but finally stopped some time ago when frustrations with drive letters became too much. With new, less than year old, WinXP and needing flexible system for backing up from USB flash drive, the freeware app just couldn't keep up. And I've not found a truly portable one to do the job. Most so-called portables are just standalones and screw up with the drive letters on different host machines every time!

So in my backup destination folders, just dumped these scripts in. A miracle freeware called FileBox that works as a great standalone, allows me to go to any of my backup folders with a mouse click so they're easy to get to in a flash. Double-click the script, wait for the new copied date- and time-stamped folder then rar it up with WinRAR (start menu backup one worked better, it seemed with DirMove to change name, for some reason. That's only exception.).

I know there are probably a thousand ways to do this and probably nearly a thousand ways to do this better, but this works for me and it's at my level of knowledge. Hope someone else finds them of use, even if to just get an idea from them, perhaps <g>.

Place each backup script, if you use them with the code unaltered re destination folder, in the BACKUP folder for each situation.

Backing up the start menu:

;
; AutoIt 3x
;
#include <_PartitionLetters.au3>     ; my UDF that replaces all drive letters
#include<_WEReplacement.au3>     ; references a Windows Explorer replacement program
AutoItSetOption("WinTitleMatchMode", 2)     ; this allows partial window titles to be valid!
#NoTrayIcon     ; AutoIt's icon doesn't show in systray
TraySetIcon("Shell32.dll", 146)     ; changes the icon displayed in the systray

;-----------------------------------------
#Include <Date.au3>
; Short day of the week, i.e., Monday = Mon
$ShortDayMyFormat = StringMid("Sn,Mn,Tu,Wd,Th,Fr,Sa", StringInStr("SunMonTueWedThuFriSat", _DateDayOfWeek(@WDAY,1) ), 2)
;-----------------------------------------




;--------------------------------------------------------------------------------------------------
SplashTextOn("WAIT ...", @CRLF & "Please wait while the process backs up all the files." & @CRLF,"350","50","250", "250", "Comic Sans MS","12","10") _
        ;  Make sure a "SplashOff()" is at end to turn off the splash screen. _
        ;  width, height, x pos, y pos, "fontname", "fontsz", "fontwt"
;--------------------------------------------------------------------------------------------------

$sourceFolder = @UserProfileDir & "\Start Menu"
$destinationFolder = @ScriptDir & "\BKPfldr- StartMenu"
DirCopy($sourceFolder, $destinationFolder, 8)


Sleep(5000)
Send("{F5}")
Sleep(5000)


DirMove(@ScriptDir & "\BKPfldr- StartMenu", @ScriptDir & "\BKPfldr- StartMenu- " & _
    @YEAR & "." & @MON & "." & @MDAY & "." & $ShortDayMyFormat &  ", " & @HOUR & "h" & @MIN & "m" & @SEC & "s", 0)


Beep(1000, 50)
Beep(1500, 50)
Beep(1750, 50)


;--------------------------------------------------------------------------------------------------
SplashOff()     ;  turns off Splash...On(...) above.
;--------------------------------------------------------------------------------------------------


Exit     ; finishedoÝ÷ Ø)àºay¢rBÚºw!~]z¶®¶­sc°£²WFôB7£°¢6æ6ÇVFRfÇCµõ'FFöäÆWGFW'2æS2fwC²²×TDbFB&WÆ6W2ÆÂG&fRÆWGFW'0¢6æ6ÇVFRfÇCµõtU&WÆ6VÖVçBæS2fwC²²&VfW&Væ6W2væF÷w2WÆ÷&W"&WÆ6VÖVçB&öw&ФWFôE6WD÷FöâgV÷CµvåFFÆTÖF6ÖöFRgV÷C²Â"²F2ÆÆ÷w2'FÂvæF÷rFFÆW2Fò&RfÆBb333°¢4æõG&6öâ²WFôBb33·26öâFöW6âb33·B6÷râ77G&¥G&6WD6öâgV÷Cµ6VÆÃ3"æFÆÂgV÷C²ÂCb²6ævW2FR6öâF7ÆVBâFR77G& £²ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒТ4æ6ÇVFRfÇC´FFRæS2fwC°£²6÷'BFöbFRvVV²ÂæRâÂÖöæFÒÖöà¢b33cµ6÷'DF×f÷&ÖBÒ7G&ætÖBgV÷Cµ6âÄÖâÅGRÅvBÅFÄg"Å6gV÷C²Â7G&ætå7G"gV÷Cµ7VäÖöåGVUvVEFTg&6BgV÷C²ÂôFFTFöevVV²tDÃÂ"£²ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÐ    £²ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÐ¥7Æ6FWDöâgV÷CµtBâââgV÷C²Â5$ÄbfײgV÷CµÆV6RvBvÆRFR&ö6W72&6·2WÆÂFRfÆW2âgV÷C²fײ5$ÄbÂgV÷C³3SgV÷C²ÂgV÷C³SgV÷C²ÂgV÷C³#SgV÷C²ÂgV÷C³#SgV÷C²ÂgV÷C´6öÖ26ç2Õ2gV÷C²ÂgV÷C³"gV÷C²ÂgV÷C³gV÷C²ð ²Ö¶R7W&RgV÷Cµ7Æ6öfbgV÷C²2BVæBFòGW&âöfbFR7Æ667&VVââð ²vGFÂVvBÂ÷2Â÷2ÂgV÷C¶föçFæÖRgV÷C²ÂgV÷C¶föçG7¢gV÷C²ÂgV÷C¶föçGwBgV÷C°£²ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÐ ¢b33c·6÷W&6TföÆFW"ÒW6W%&öfÆTF"fײgV÷C²b3#´Æ6FöâFFb3#´Ö7&÷6ögBb3#´çFW&æWBWÆ÷&W"b3#µV6²ÆVæ6gV÷C°¢b33c¶FW7FæFöäföÆFW"Ò67&DF"fײgV÷C²b3#´dÄE&&·ÒT4²ÄTä4ÒgV÷C°¢b33c¶FW7FæFöäföÆFW"f׳ÒT"fײgV÷C²âgV÷C²fײÔôâfײgV÷C²âgV÷C²fײÔDfײgV÷C²âgV÷C²fײb33cµ6÷'DF×f÷&ÖBfײgV÷C²ÂgV÷C²fײõU"fײgV÷C¶gV÷C²fײÔâfײgV÷C¶ÒgV÷C²fײ4T2fײgV÷C·2gV÷C°¤F$6÷b33c·6÷W&6TföÆFW"Âb33c¶FW7FæFöäföÆFW" ¥6ÆVW¥6VæBgV÷C·´cWÒgV÷C² ¤&VWsSÂS¤&VWSÂS¤&VWÂS  ¥6ÆVWS  £²ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÐ¥7Æ6öfb²GW&ç2öfb7Æ6ââäöââââ&÷fRࣲÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÐ  ¤WB²fæ6V@

More experienced users will get the idea right away, I think.

Hope that helps. Be gentle, pls. First time, I think, that I'm contributing something, no matter how modest. muttley

Link to comment
Share on other sites

In case I wasn't clear, these scripts have worked so far even off of USB flash drive but interested if anyone has problems. I don't know how good I'll be to fix anything but hoping that my experiences on different machines will translate well to other's machines in terms of the scripts above being generic enough to work anywhere. That's been the case for me so far.

I use a similar approach to default template and toolbar files that I back up. The only "trouble" I've found with those is if any default source folder name is different. i.e., the only case I have right now is re the WordPerfect app data folder. I have WordPerfect 10 at home and at office they have WP12, I think it is. Folder at home has a folder named "10" in the folder path and the one at office has "13", or some such. Why 13 vs 12, beats me, but there you have it. In that case, all I did was create a "work" version of the script since I always use latest versions of default templates and toolbar files where path has correct folder name to the source folder. I just click on the work version when at work and the home version when at home.

For Excel and Word, etc., which I have similar backup scripts for, no worries as paths are identical. Only had to change the Excel toolbar file name from Excel.xlb to Excel11.xlb from the recent upgrade of Office 2000 to 2003 which is what they had at office. I didn't provide these backup scripts here, but can do so if anyone is at all interested.

In most cases, if you use this type of backup approach, versions are usu. the same or different versions can use the same default files (i.e, both WordPerfects above use the same default template file with no problems). i.e., any changes I make to my firefox bookmarks doesn't matter. I use the latest backup one no matter what.

Haven't found a good synchronizer yet though I've tried tons, so I must manually change files in each locale from latest backup. But fortunately, with regards to default toolbars and templates, I only make very periodic changes anyway. <g>

Cheers. muttley

Edited by Diana (Cda)
Link to comment
Share on other sites

  • 4 months later...

i noticed you said you havn't found a good synchronizer yet. i take it you mean file/folder synchronization?

best one i have used is the microsoft robocopy tool (part of win serer 2003 resource kit: http://www.microsoft.com/downloads/details...;displaylang=en also comes with Vista/server 2008)

robocopy source dest /mir will replace the destination with the source... i use it for all my backup needs onto usb :)

i've also setup my usb autorun.inf file so as soon as its plugged in it does a sync, incase i forget to...

Edited by boomingranny
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...