原文发布时间:2010-04-13
作者:Peri
FME有自定义的批处理功能,在File—Batch Deploy中可以配置,但是这个批处理有个缺陷,当数据源有错误或者其它原因导致模板运行失败时,整个批处理过程就会终止,不能再继续执行。
我在进行批处理时,自己定义了一段批处理脚本,自定义执行的FME模板、数据源路经、目标数据路径、以及日志等信息,代码如下:
@ECHO OFF
:: The following line is necessary for ERRORLEVEL capture.
SetLocal EnableDelayedExpansion
SET OUTPUT=.\output
SET LOG=.\logs
SET FAILED=.\failed
SET SOURCE=.\dxt
SET REPORT=report2.txt
:: If the directories don't exist, later commands run into problems
MD %OUTPUT%
MD %LOG%
MD %FAILED%
:: It is probably a good idea to delete the existing log files
:: If you don't, the report might not be accurate.
DEL /Q %LOG%\*.*
:: The following command creates the report file
:: showing date, time, and FME build.