View Single Post
Old 10-06-2010, 09:05 AM   #2
Tomte
Member
Tomte began at the beginning.
 
Tomte's Avatar
 
Posts: 10
Karma: 10
Join Date: Aug 2010
Device: iPad 2, iPod Touch (2G), Nokia N800
I had this exact question when I first got started with Calibre. In order to accomplish this I had to write a batch file which I have set to run daily using Windows Scheduled Tasks. Here is my batch file, which you can modify to suit your needs:

Thanks for pointing me in the right direction! I have my batch file for Windows XP Home written and working; it may not be the most elegant, but I post it here in case others are interested:

REM --------------------------------------------
REM Set a variable called TODAY with today's date
REM --------------------------------------------
REM
for /f "tokens=2-4 delims=/ " %%a in ('date /T') do set year=%%c
for /f "tokens=2-4 delims=/ " %%a in ('date /T') do set month=%%a
for /f "tokens=2-4 delims=/ " %%a in ('date /T') do set day=%%b
set TODAY=%year%-%month%-%day%
REM
REM --------------------------------------------
REM Change directories
REM --------------------------------------------
REM
cd "C:\Program Files\Calibre2\resources\recipes"
REM
REM --------------------------------------------
REM Grab all the recipes for today
REM --------------------------------------------
REM
start /wait ebook-convert usatoday.recipe "C:\Program Files\Calibre2\resources\mynews\usatoday\%today%.u satoday.mobi"
start /wait ebook-convert usatoday.recipe "C:\Program Files\Calibre2\resources\mynews\usatoday\%today%.u satoday.epub"
REM
REM --------------------------------------------
REM List the Database contents and add new files
REM --------------------------------------------
REM
start /wait calibredb list
start /wait calibredb add -1 -d "C:\Program Files\Calibre2\resources\mynews\usatoday"
REM
REM --------------------------------------------
REM Make a backup and clean working directory
REM --------------------------------------------
REM
copy "C:\Program Files\Calibre2\resources\mynews\usatoday\*.*" "E:\files\eBooks\originals\News\*.*"
del/q "C:\Program Files\Calibre2\resources\mynews\usatoday\*.*"
REM
REM --------------------------------------------
REM Exit Gracefully
REM --------------------------------------------
REM
exit
Tomte is offline   Reply With Quote