The following is a batch file (.CMD) that will archive my files from my laptop to my "T:" drive, then back up that collection, complete to my "G:" drive. It also tries to process the Picasa Album databases, but I'm not sure this is working ideally yet. When running this batch file ensure Picasa is not running, and relax.
@echo offCLSSET backupDest1=T:\Archive of My PicturesSET backupDest2=G:\Backup of My PicturesTITLE Backup Up Picasa Album Settings...FOR /F "tokens=1,2,3,4,5 delims=/ " %%a in ('date /T') do SET backupDate=%%c%%b%%aPUSHD "%USERPROFILE%\Local Settings\Application Data\Google\Picasa2Albums\"IF NOT EXIST "%backupDest1%" MKDIR "%backupDest1%"IF NOT EXIST "%backupDest1%\_AlbumInfo" MKDIR "%backupDest1%\_AlbumInfo"IF NOT EXIST "%backupDest1%\_AlbumInfo\%backupDate%" MKDIR "%backupDest1%\_AlbumInfo\%backupDate%"robocopy backup "%backupDest1%\_AlbumInfo\backup" *.* /XO /S /E /ETA /V /R:3 /W:3robocopy . "%backupDest1%\_AlbumInfo\%backupDate%" *.* /XO /XD backup /S /E /ETA /V /R:3 /W:3TITLE Updating Album File Locations...FOR /F "tokens=1,2,3,4,5 delims=:" %%a in ('echo %backupDest1%') do SET myPicsUpdate=[%%a]%%bFOR /F %%a in ('dir /b /a:d-h "%backupDest1%\_AlbumInfo\%backupDate%\"') do call :cmpAInfo "%backupDest1%\_AlbumInfo\%backupDate%\%%a"TITLE Clearing My Pictures...robocopy "%USERPROFILE%\My Documents\My Pictures" "%backupDest1%" /S /E /ETA /MOVE /R:3 /W:3TITLE Backing up %backupDest1% to %backupDest2%...robocopy "%backupDest1%" "%backupDest2%" /XO /S /E /ETA /V /R:3 /W:3TITLE Update Active Albums...robocopy "%backupDest1%\_AlbumInfo\%backupDate%" . *.* /XO /XD backup /S /E /ETA /V /R:3 /W:3if NOT EXIST "%USERPROFILE%\My Documents\My Pictures" MKDIR "%USERPROFILE%\My Documents\My Pictures"popdgoto :eofpauseTITLE Command Promptgoto :eof:cmpAInfoecho Processing %~1...REM FOR /F %%a in ('dir /b "%~1"') do echo "%~1\%%a"FOR /F %%a in ('dir /b /a:-d "%~1"') do gsar -i -o -s"$My Pictures" -r"%myPicsUpdate%" "%~1\%%a"goto :eof
Now... you'll need to verify your date format at the command prompt, mine is DD/MM/YYYY the line that sets the backupDate may need to be tweaked. Of course the two destination variables need to be set appropriately for your own needs. Have fun... but play it safe test this for yourself first.
gsar.exe - Global Search and Replace
robocopy - Microsoft's Robocopy