View Single Post
  #7  
Old 07-12-2005, 08:26 PM
Nomad84 Nomad84 is offline
Senior Member
 
Join Date: Mar 2005
Posts: 194
Default Re: backing up my HHs

[ QUOTE ]
I back up several things to a different drive. I wrote a script using robocopy and I copied the music and PT part and pasted below (you will need robocopy to run this, from the resourse kit or d\l from MS). THe great thing about robocopy is that it only copies files that change. I backup about 150GB per night, but only a few mbs change so it only take 10 or 20 seconds.

:Music are all MP3s
echo started music at %date% %time% >> update.txt
robocopy D:\Music G:\Backup_Music /MIR /R:0 /W:0 /V /ETA
echo completed Music at %date% %time% >> update.txt

:PT is poker tracker db
echo started PT at %date% %time% >> update.txt
copy "C:\Program Files\Poker Tracker V2\ptrack.mdb" "C:\Program Files\Poker Tracker V2\db_copy"
copy "C:\Program Files\Poker Tracker V2\hhdb.mdb" "C:\Program Files\Poker Tracker V2\db_copy"
robocopy "C:\Program Files\Poker Tracker V2\db_copy" G:\Backup_PT /MIR /R:0 /W:0 /V /ETA
echo completed PT at %date% %time% >> update.txt

[/ QUOTE ]

I wrote (kinda...) a basic script for backing up files at work to my USB drive. It also only copies files that have changed. The only real difference is I used xcopy, which doesn't require any additional downloads. I got the information on the different options (switches? the "/" stuff...) from Windows help (search for xcopy). I've copied it below. Change the first directory to your PT directory (or just the processed hands directory) and the second to the destination and save it as a .vbs file. Change the options as needed. It currently only copies files that have changed since the last update (if any) and only if the archive attribute is set. It looks in subdirectories of the specified directory also. I don't even remember what the other options are.

I don't know a whole lot about how it works because a lot of it was copied from Windows help files and then modified to fit my needs. I was really bored that day...





Dim WshShell

'Create the object that is used to execute the command-line output.
Set WshShell = Wscript.CreateObject("Wscript.Shell")


Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run("%comspec% /c xcopy " & chr(34) & "V:\DWG Register" & chr(34) & " " & chr(34) & "E:\My Documents\DWG Register\" & chr(34) & " /s /a /w /d /y")
Reply With Quote