View Single Post
Old 01-22-2011, 01:05 PM   #15
paulfiera
Addict
paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.
 
paulfiera's Avatar
 
Posts: 387
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: Kobo Aura ONE, Kobo Libra H20
Quote:
Originally Posted by dwanthny View Post
...I use this bat file to run calibre.

Spoiler:
Code:
cd c:\
rmdir /s /q c:\Calibre_temp

REM Create new temp directory for this session.

cd c:\
mkdir Calibre_temp

REM Specify the location of the Calibre temp files
REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SET CALIBRE_TEMP_DIR=C:\Calibre_temp

REM        CalibreRun.bat
REM        ~~~~~~~~~~~~~~
REM
REM Batch File to start a Calibre configuration on Windows
REM giving explicit control of the location of:

REM  - Calibre Config Files

REM Specify the location of the Calibre Config files
REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SET CALIBRE_CONFIG_DIRECTORY=C:\My Dropbox\CalibreConfig

REM Location of calibre program files
REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

C:
CD \Program Files\Calibre2

REM Display settings that will be used
REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo CONFIG=%CALIBRE_CONFIG_DIRECTORY%

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

echo "Press CTRL-C if you do not want to continue"
pause

REM Start up the calibre program.
REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REM

start calibre.exe --start-in-tray
dwanthny, even when you set the environment variable CALIBRE_TEMP_DIR, calibre will still create files and folders in your system's tmp enviroment variable.

Folders fontconfig and gen_py and several calxx.tmp files. Also, if you have "open in ePub Editor" in your context menu, a folder "Sigil" - if Sigil is your ePub editor - will be created in this folder.

The only way right now to make caliber put all its temp files in a given directory is to use both the TEMP and TMP system variables.

My calibre batch file starts like this:

Code:
if not exist "d:\calibre" md "d:\calibre" || goto error
SET TEMP=d:\calibre
SET TMP=d:\calibre
Kovid: maybe we could improve CALIBRE_TEMP_DIR to place all the temp files in the directory defined by this env variable?

Last edited by paulfiera; 01-22-2011 at 01:16 PM.
paulfiera is offline   Reply With Quote