There is a -webinf argument you can pass to the Compiler to compile pages outside of 
the CFMX_INSTALL\wwwroot directory.  I have attached the latest version of the 
cfcompile script that demonstrates how to use this argument.

Instructions:
1. Save the cfcompile.bat file attached below into the CFMX_INSTALL\bin directory
2. Run cfcompile from the command-line according to the usage

Usage: cfcompile [-f] -webroot webdir source [source ...]
  -f                    force compilation
  -webroot webdir       the doc root of the webserver
  source                file or directory containing CFM templates

Usage examples:
Compiling all changed files under the IIS doc root:
   c:\cfusionmx\bin\cfcompile.bat -webroot c:\Inetpub\wwwroot c:\Inetpub\wwwroot

Recompiling all files under two subdirectory of the IIS doc root:
   c:\cfusionmx\bin\cfcompile.bat -f -webroot c:\Inetpub\wwwroot 
c:\Inetpub\wwwroot\myapp c:\Inetpub\wwwroot\myapp2

--------------start cfcompile.bat--------------------
@echo off
@setlocal
if "%CFMX_INSTALL%"=="" set CFMX_INSTALL=..
if not exist "%CFMX_INSTALL%\lib\cfusion.jar" goto err_cfdir
if "%1"=="" goto usage
if "%1"=="/?" goto usage
goto compile

:compile
set PATH=%CFMX_INSTALL%\runtime\bin;%PATH%
java -classpath %CFMX_INSTALL%\lib\cfusion.jar coldfusion.tools.Compiler -webinf 
%CFMX_INSTALL%\wwwroot\WEB-INF  %*
goto end

:err_cfdir
echo Error: Could not locate %CFMX_INSTALL%\lib\cfusion.jar
echo   Please set CFMX_INSTALL path (ex: set CFMX_INSTALL=c:\CFusionMX)
goto end


:usage
echo usage: cfcompile [-f] -webroot webdir source [source ...]
echo   -f                       force compilation
echo   -webroot webdir          the doc root of the webserver
echo   source                   file or directory containing CFM templates
goto end

:end
@endlocal

-------------end cfcompile.bat---------------------

---
Spike Washburn
ColdFusion Development Team

-----Original Message-----
From: Critter [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, July 30, 2002 2:35 PM
To: CF-Talk
Subject: Re: precompiling templates


oi Brook!!

i believe that script only works in the cfmx root...


-- 
Critz
 Macromedia Certified Advanced ColdFusion Developer  <CFX_BotMaster Network="Efnet" 
Channel="ColdFusion">

______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to