Title: Message
Thanks Richard,
 
Actually thanks for the suggestion.  I'll check with my install build call to see if I can specify the output log file.  If I can then yes it would be much easier....
 
Regards,
Tim.
-----Original Message-----
From: Foster, Richard - PAL [mailto:[EMAIL PROTECTED]
Sent: September 19, 2006 11:52 AM
To: Tim Mayert; nant-users@lists.sourceforge.net
Subject: RE: [NAnt-users] Simply find file task or function

Tim,
 
I may be off base here, but I think you can use a <foreach> task to iterate through items in a fileset - e.g.
 
<foreach item="File" property="filename">
    <in>
        <items>
            <include name="SomeFolder/**" />
        </items>
    </in>
    <do>
        <!-- whatever processing is needed if it is the right file -->        
    </do>
</foreach>

 One question though... For most of the tools I have worked with there is frequently a way you can specify the name of the output (via redirection, if nothing else). Are you sure you can't do the same thing? If that is possible in your case too it would probably make life *much* easier!
 
Regards,
Richard
 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tim Mayert
Sent: Tuesday, September 19, 2006 13:32
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Simply find file task or function

Hello,
 
This may be a very simple question, but I can not seem to find a function that can do this.  I am automating the build of our product install and during the creation of the install it will generate a .txt file that contains the build log.  I would like to open this log file up to check for errors, but I do not know the exact name of the file to open for read in.  The install will create the txt file in the following format:
    9-18-2006 10-49-59 AM.txt
 
I need to be able to get the exact name so I figured that if I did a file find in the folder that these files are created then I can get the list of files and work from that.  But I do not see any task that will give me the name of the files in a specified directory.
 
Since the file name contains the time it also makes it harder to find because I could generate the same name, but if the second's tick is just one ahead of mine then it will not find the file.
 
I just want something simple to get me the name of the file and then I can perform a copy of the file to a more generic name and then work with it from there.
 
So if there are any NAnt command/tasks that can get me this information I would appreciate knowing about it.  Or any other method that would be easy to call from the NAnt project to get me the same results that would be good as well.
 
Thanks,

SMART Technologies Inc.

Tim Mayert
Software Developer

Tel. 403.228.8552 Fax 403.228.2500
[EMAIL PROTECTED]
http://www.smarttech.com
Bringing people and ideas together.

 



* C O N F I D E N T I A L I T Y N O T I C E *
-----------------------------------------------------------
The content of this e-mail is intended solely for the use of the individual or entity to whom it is addressed. If you have received this communication in error, be aware that forwarding it, copying it, or in any way disclosing its content to any other person, is strictly prohibited. Peek Traffic Corporation is neither liable for the contents, nor for the proper, complete and timely transmission of (the information contained in) this communication. If you have received this communication in error, please notify the author by replying to this e-mail immediately and delete the material from any computer.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to