ODBiC Discussion Board


RE: Check existing file with IF statment, Wayne, 09-08-2004

Use <!--EACHFILE --> instead

by Gordon Hsu, September 10, 2004 05:48

Wayne,

There is the existing command (<!--EACHFILE -->) in ODB Script already.

<!--SET My_Number = 0 --> <!--EACHFILE $PATH_TRANSLATED_DIR$/*.* --> <!--IF $FILE_NAME$ = $My_File_Name$ --> <!--SET My_Number = $My_Number$ + 1 --> <!--ENDIF --> <!--ENDFILE --> <!--IF $My_Number$ = 1 --> <A HREF=http://localhost/eco/$My_File_Name$>$REPL($My_File_Name$,".pdf"="")</A> <!--ELSE --> <A HREF=http://localhost/eco/default.html>$REPL($My_File_Name$,".pdf"="")</A> <!--ENDIF -->

Please note that $FILE_NAME$ is the default variable ODB Script use for "EACHFILE". Hope this will help.

Gordon


Replies:


Post Your Reply:

Name   
E-mail  optional
Topic  
Message:

HTTP Link: 
Link text: 


Copyright ©1997-2003, Roger Harris. All rights reserved.