Hi Marc,
I'd use a pre-translation TCL/Python script to test for the files. 
The fragment of TCL code I would use to test for file existence is...

if {![file exists $inputFilename]} {
        error "File does not exist"
}

...the error command will both write to the log file (I think) and
cause the FME translation to be terminated (I know).

To use this code within a mapping file (which you seem to be using)
add the line...

FME_BEGIN_TCL <tcl script>

...where <tcl script> is the path+name of a TCL script.

In FME2007 you can embed the script into the mapping file - but it's
not simple (unless you use Workbench)...

FME_BEGIN_TCL FME_Decode
<lf>if<space><opencurly>!<openbracket>file<space>exists<space><dollar>inputFilename<closebracket><closecurly><space><opencurly><lf><tab>error<space><quote>File<space>does<space>not<space>exist<quote><lf><tab><closecurly>


Anyway, this fmepedia page will give you more information...
http://www.fmepedia.com/index.php/Category:TCL_Pre_Post_Processing_FAQ

Hope this helps,
Regards,

Mark

Mark Ireland, Senior Product Specialist
Safe Software Inc. Surrey, BC, CANADA
[EMAIL PROTECTED] http://www.safe.com
Solutions for Spatial Data Translation, Distribution and Access

--- In [email protected], "m_lem3" <[EMAIL PROTECTED]> wrote:
>
> Hello to all,
> 
> Is there a way to avoid a GUI prompt when an CSV input file is missing?
> 
> Example:
> GUI IGNORE 
> SourceDataset_CSV_1,_SKIP_LINES_CSV_1,_STRIP_QUOTES_CSV_1,_DUPLICATE_DEL
> IMS_CSV_1
> DEFAULT_MACRO Liste_fichiers_MNAQuebec 
> X:\Travail\IMR\PRO\Inventaire_MNE\list.txt
> INCLUDE [ if {{$(Liste_fichiers_MNAQuebec)} == {}} { puts_real 
> {Parameter Liste_fichiers_MNAQuebec must be given a value on the 
> commandline.}; exit 1; }; ]
> 
> What would be nice is the possibility to replace : puts_real {Para... 
> by logging an error in the log file and then terminating the 
> application.
> 
> Marc
>




For insights into what's up at Safe Software and what's on the development 
horizon, visit Safe's blog at spatial-etl.blogspot.com.

Safe Software has also made slides available that outline enhancements planned 
for FME 2007. The slides are from the "Road Ahead" presentation given on Day 2 
of the FME Worldwide Users Conference. To view these slides, visit 
www.safe.com/2006uc.

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/fme/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/fme/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to