Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 05-14-2011, 02:46 PM   #1
Dopedangel
Wizard
Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.
 
Dopedangel's Avatar
 
Posts: 1,129
Karma: 8671315
Join Date: Dec 2006
Location: Singapore
Device: Coolreader(Nexus 5)\Coolreader(Nook Touch)
calibre bat file windows 7 64bit

I am using bat files and dropbox to open my calibre library on different computers. earlier I was using a xp machine
just bought a new windows 7 64bit now when I try that batch file hundreds of dos box start appearing and calibre does not open. Any one has any Idea what I should change in the bat file to make it work
Dopedangel is offline   Reply With Quote
Old 05-14-2011, 03:04 PM   #2
banjomike
Addict
banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.
 
banjomike's Avatar
 
Posts: 302
Karma: 397404
Join Date: Aug 2009
Location: UK
Device: PRS-505 Red,DSlibris,nook Glow,nook Simple rooted,nook HD+,Moon+,Zinio
Quote:
Originally Posted by Dopedangel View Post
Any one has any Idea what I should change in the bat file to make it work
A good start would be to post your batchfile here so we can see what you have.
banjomike is offline   Reply With Quote
 
Advertisement
Old 05-14-2011, 03:39 PM   #3
Dopedangel
Wizard
Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.
 
Dopedangel's Avatar
 
Posts: 1,129
Karma: 8671315
Join Date: Dec 2006
Location: Singapore
Device: Coolreader(Nexus 5)\Coolreader(Nook Touch)
here is the original bat file I am using and was working fine on my windows machine

Code:
@echo OFF
REM			CalibreRun.bat
REM			~~~~~~~~~~~~~~
REM Batch File to start a Calibre configuration on Windows
REM giving explicit control of the location of:
REM  - Calibe Program Files
REM  - Calibre Library Files
REM  - Calibre Config Files
REM  - Calibre Metadata database
REM  - Calibre Source files
REM By setting the paths correctly it can be used to run:
REM  - A "portable calibre" off a USB stick.
REM  - A network installation with local metadata database
REM    (for performance) and books stored on a network share 
REM
REM If trying to run off a USB stick then the following 
REM folder structure is recommended:
REM  - Calibre2			Location of program files
REM  - CalibreConfig		Location of Configuration files
REM  - CalibreLibrary		Location of Books and metadata


REM -------------------------------------
REM Set up Calibre Config folder
REM -------------------------------------

If EXIST CalibreConfig SET CALIBRE_CONFIG_DIRECTORY=%cd%\CalibreConfig


REM --------------------------------------------------------------
REM Specify Location of ebooks
REM
REM Location where Book files are located
REM Either set explicit path, or if running from a USB stick
REM a relative path can be used to avoid need to know the
REM drive letter of the USB stick.

REM Comment out any of the following that are not to be used
REM --------------------------------------------------------------

SET CALIBRE_LIBRARY_DIRECTORY=%cd%\Library




REM --------------------------------------------------------------
REM Specify Location of metadata database  (optional)
REM
REM Location where the metadata.db file is located.  If not set
REM the same location as Books files will be assumed.  This.
REM options is used to get better performance when the Library is
REM on a (slow) network drive.  Putting the metadata.db file 
REM locally gives a big performance improvement.
REM --------------------------------------------------------------





REM --------------------------------------------------------------
REM Specify Location of calibre binaries (optinal)
REM
REM To avoid needing Calibre to be set in the search path, ensure
REM that Calibre Program Files is current directory when starting.
REM The following test falls back to using search path .
REM This folder can be populated by cpying the Calibre2 folder from
REM an existing isntallation or by isntalling direct to here.
REM --------------------------------------------------------------

C:
CD \Program Files\Calibre2



REM --------------------------------------------
REM Display settings that will be used
REM --------------------------------------------

echo PROGRAMS=%cd%
echo SOURCE=%CALIBRE_DEVELOP_FROM%
echo CONFIG=%CALIBRE_CONFIG_DIRECTORY%
echo LIBRARY=%CALIBRE_LIBRARY_DIRECTORY%
echo DATABASE=%CALIBRE_OVERRIDE_DATABASE_PATH%

REM  The following gives a chance to check the settings before
REM  starting Calibre.  It can be commented out if not wanted.



REM --------------------------------------------------------
REM Start up the calibre program.
REM
REM The use of 'belownormal' priority helps keep the system
REM responsive while Calibre is running.  Within Calibre itself
REM the backgound processes should be set to run with 'low' priority.

REM Using the START command starts up Calibre in a separate process.
REM If used without /WAIT opotion launches Calibre and contines batch file.
REM Use with /WAIT to wait until Calibre completes to run a task on exit
REM --------------------------------------------------------

echo "Starting up Calibre"
START /belownormal Calibre --with-library "%CALIBRE_LIBRARY_DIRECTORY%"
Dopedangel is offline   Reply With Quote
Old 05-14-2011, 03:52 PM   #4
CRussel
Wizard
CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.CRussel ought to be getting tired of karma fortunes by now.
 
CRussel's Avatar
 
Posts: 4,828
Karma: 30841942
Join Date: Jul 2010
Location: Sunshine Coast, BC
Device: Kindle Voyage,Kindle PW, Fire HDX 8.9, Fire HD8.9
Without digging at all deeply into your script, I spotted one problem right away:
Quote:
C:
CD \Program Files\Calibre2
Won't work. Calibre is a 32-bit program, so will be in %ProgramFiles(x86)%.
CRussel is offline   Reply With Quote
Old 05-14-2011, 05:35 PM   #5
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,102
Karma: 780247
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
There should be a more recent (and improved) version of that Batch file in the resources sub-folder in the Calibre install folder.

You would need to check through it that the paths are correct for your setup.

Note that as long as Calibre is on the system search path it will be found regardless of the current folder at the time you run the batch file. If it is not on the system search path then you want to make sure that the batch file sets the correct location.

However I am not sure why you should ever get the symptom you mentioned of lots of DOS boxes opening up when it does not work!
itimpi is offline   Reply With Quote
Old 05-14-2011, 05:54 PM   #6
banjomike
Addict
banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.banjomike ought to be getting tired of karma fortunes by now.
 
banjomike's Avatar
 
Posts: 302
Karma: 397404
Join Date: Aug 2009
Location: UK
Device: PRS-505 Red,DSlibris,nook Glow,nook Simple rooted,nook HD+,Moon+,Zinio
Quote:
Originally Posted by itimpi View Post
However I am not sure why you should ever get the symptom you mentioned of lots of DOS boxes opening up when it does not work!
I think you would get that if the batchfile was called Calibre and was in the current folder when "START /belownormal Calibre" was reached. If the batchfile cannot change to the Calibre folder (maybe because of CRussel's suggestion) then it would rerun itself again and again probably in a separate ntvdm (or whatever the 64bit version is called). I'm not certain you would get hundreds, I would expect Windows to explode before it got to that number.
banjomike is offline   Reply With Quote
Old 05-15-2011, 02:30 PM   #7
Dopedangel
Wizard
Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.
 
Dopedangel's Avatar
 
Posts: 1,129
Karma: 8671315
Join Date: Dec 2006
Location: Singapore
Device: Coolreader(Nexus 5)\Coolreader(Nook Touch)
Well I was not able to make it work without hard coding the exact directories for the config and library. And reinstalling calibre in C:\caibre2
Currently I am running the bat file from the calibre directory what should I write if I want to place the bat file somewhere else.
Dopedangel is offline   Reply With Quote
Old 05-15-2011, 02:59 PM   #8
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,102
Karma: 780247
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
As long as all the paths in the batch file are set correctly for your system, then the location of the batch file should be irelevant.

The batch file is aimed it making it easy to run from a USB stick, but if you are not doing that and are therefore not using the recommended folder structure (so that relative paths can be used) then simply set the paths to be absolute ones.
itimpi is offline   Reply With Quote
Old 05-16-2011, 04:38 AM   #9
Dopedangel
Wizard
Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.
 
Dopedangel's Avatar
 
Posts: 1,129
Karma: 8671315
Join Date: Dec 2006
Location: Singapore
Device: Coolreader(Nexus 5)\Coolreader(Nook Touch)
Ok I got it working by installing calibre in C:\Calibre2 on both computers
and removing the If statement for the Binary locations and just using

CD C:\Calibre2
ECHO PROGRAM FILES: %cd%
Dopedangel is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Old Thread] Calibre Command line and .bat file stratman Calibre 15 01-10-2012 06:38 PM
Multiple conversion of files in .bat with calibre? kombinerka Conversion 22 01-28-2011 05:25 AM
Calibre under Win7 64bit noxx Calibre 4 12-29-2010 03:31 PM
Migrate Library to Windows 7 64bit tulsa Calibre 4 05-10-2010 03:01 PM
64bit Windows support? corflame Sony Reader 5 09-09-2007 10:14 PM


All times are GMT -4. The time now is 12:01 PM.


MobileRead.com is a privately owned, operated and funded community.