In our incremental build process, the entire deployment directory structure
is created, even if there are no files to be copied to a particular
directory.

I have just tried removing the explicit <mkdir> stmts for the entire
deployment directory structure in our incremental build process, and
instead, let each <copy> stmt create whatever directories it needs.  Doing
it this way now guarantees that if a given directory structure exists at
the conclusion of the build process, there WILL be files in it.

I then modified <available> as per your suggestion, and it worked the first
time!

Thanks for the suggestion.




                                                                                       
       
                    Diane Holt                                                         
       
                    <holtdl@yahoo        To:     [EMAIL PROTECTED]           
       
                    .com>                cc:                                           
       
                                         Subject:     Re: using Available for presence 
of ANY 
                    09/10/01             files                                         
       
                    02:35 PM                                                           
       
                    Please                                                             
       
                    respond to                                                         
       
                    ant-user                                                           
       
                                                                                       
       
                                                                                       
       




Would the directory exist if there aren't any files in it? If not, you can
ask <available> to check for the directory itself existing, rather than
checking for any files in it. (If it would, I'll need to think about :)

Diane

--- [EMAIL PROTECTED] wrote:
> I am looking to use <available/> to determine the presence/absence of
> ANY
> files (i.e., one or more files) in a directory, as a condition of
> whether
> to run a subsequent FTP target that would tranfer the files to a remote
> server.  I tried using wildcards in the 'file' attribute:
>
> <target name="myPropertiesPresent">
>      <available property="myProperties.present"
> file="c:\properties\*.*">
>
> </target>
>
> <target name="ftpToServer" depends="myPropertiesPresent" if
> ="myProperties.present">
> <ftp...</ftp>
> </target>
>
>
> But the log says:
>
> myPropertiesPresent:
> [available] Unable to find file c:\properties\*.* to set property
> myProperties.present
>
>
> Does anyone know a way of using <available/> to accomplish this? If not,
> what other Ant task might accomplish the equivalent?
>
> ---------------------------------------
> Ronald Signorino
> [EMAIL PROTECTED]
> Technical Analyst - Chubb Corporation
> ---------------------------------------
>
>


=====
([EMAIL PROTECTED])



__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com




Reply via email to