Thread: corrupted dbase
View Single Post
Old 05-15-2010, 04:02 PM   #37
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by Debby View Post
Here is the batch file I created last night and tested. Although it worked, is my syntax correct? I am using a mapped network drive.

xcopy "Z:\Debby\My Documents\Calibrelibrary\Debs" "Z:\Debby\My Documents\Calibre Saved Libraries\BatchFile BU" /D /S /Y
It looks good to me, assuming your directory paths are correct. It relies on the date on the computer being correct, but it normally would be. You can precede it with:
Code:
z:
cd \Debby\My Documents\Calibrelibrary\Debs
if exist metadata.db.6 del metadata.db.6
if exist metadata.db.5 ren metadata.db.5 metadata.db.6
if exist metadata.db.4 ren metadata.db.4 metadata.db.5
if exist metadata.db.3 ren metadata.db.3 metadata.db.4
if exist metadata.db.2 ren metadata.db.2 metadata.db.3
if exist metadata.db.1 ren metadata.db.1 metadata.db.2
if exist metadata.db copy metadata.db metadata.db.1
and it will always keep the last 6 copies of your metadata.db.

Quote:
I like the idea of using kovidgoyal code ....
calibredb export --all --to-dir backup_path
That's a different type of backup, as discussed here. It doesn't keep the metadata.db, recipes, book conversion settings, etc. found in that file. It also will export all books each time it runs. ccayer had some valid comments on XCOPY, and they would apply to doing this type of export. Old files would not be removed. That would make it harder to import later.

IMHO, RichCopy or another sync program would be a better option.
Starson17 is offline   Reply With Quote