View Single Post
Old 01-21-2009, 12:38 PM   #14
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by ilovejedd View Post
Okay, so just read up on environment variables since I had no idea what they were. How do I create a DOS/Windows batch file that automatically changes the config path relative to the location of Calibre?

Say I have the following directory structure:


Will the following batch file work (portablecalibre.bat):
Code:
@echo off
cd config
setlocal
set CALIBRE_CONFIG_DIRECTORY = %cd%
cd..
cd calibre
calibre.exe --with-library  ..\calibre-db
endlocal
Another question, if Calibre is already installed on the PC, am I correct in assuming the above batch file would only change settings for "portable calibre" and the version installed on the computer would be unaffected by the path change?

Thanks!
Also add the portable calibre directory to the beginning of your PATH. I'm not bat file expert, so I'll defer answering that to someone who is
kovidgoyal is online now   Reply With Quote