Thread: corrupted dbase
View Single Post
Old 05-16-2010, 05:31 PM   #40
Debby
Connoisseur
Debby will become famous soon enoughDebby will become famous soon enoughDebby will become famous soon enoughDebby will become famous soon enoughDebby will become famous soon enoughDebby will become famous soon enough
 
Debby's Avatar
 
Posts: 75
Karma: 600
Join Date: Jul 2008
Location: Depends Upon the Season.....
Device: Cybook, Sony & ipad
You could have put the code into the same batch file. Either have robocopy copy off the multiple metadata.db backups when it runs, or you can just change the locations of the metadata.db.N source and destination files to c:\some\place\else\metadata.db.N.

I'm glad it works for you, and thanks for posting your final setup - it may help others.[/QUOTE]

I think it would make more sense if it was in one file. So, should it look like this?

@echo off

REM metafile copy documents
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

move metadata.db.* "Z:\Debby\My Documents\Calibre Saved Libraries\Metafile BU

robocopy "Z:\Debby\My Documents\Calibrelibrary\Debs" "Z:\Debby\My Documents\Calibre Saved Libraries\BatchFile BU" /s /purge /xo /r:1 /w:1




Sorry - I don't understand the syntax

c:\some\place\else\metadata.db.N.
Debby is offline   Reply With Quote