Eventually, you can do this : nAnt -filename:C:\log.txt mainTarget nant mailTarget
where mainTarget performs all your operations except sending a mail and mailTarget only sends the c:\log.txt. |---------+--------------------------------------> | | [EMAIL PROTECTED]| | | nce.co.uk | | | Sent by: | | | [EMAIL PROTECTED]| | | ceforge.net | | | | | | | | | 06/01/04 17:41 | | | | |---------+--------------------------------------> >------------------------------------------------------------------------------------------------------------------------------| | | | To: [EMAIL PROTECTED], [EMAIL PROTECTED] | | cc: | | Subject: RE: [Nant-users] Mailing build results | >------------------------------------------------------------------------------------------------------------------------------| Thanks Damir, The build script in the example you pointed me to is very similar to mine but my script still gives me the error message mentioned below. How can my script send me an attachment of a log file that is still being written to? Even if it can, won't the end of the log file be missing? (Everything after the mail task) The log file I am referring to is the one I specify in the command line when calling nAnt (-filename:C:\log.txt). Do you know of a better way to set this logfile so that I can include my build version in the filename? Thanks for your help Mark -----Original Message----- From: Damir Simunic [mailto:[EMAIL PROTECTED] Sent: 06 January 2004 16:23 To: 'Mark Dowell'; [EMAIL PROTECTED] Subject: RE: [Nant-users] Mailing build results Mark, take a look at http://sourceforge.net/mailarchive/message.php?msg_id=6764362 Cheers, Damir From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Dowell Sent: Tuesday, January 06, 2004 4:43 PM To: '[EMAIL PROTECTED]' Subject: [Nant-users] Mailing build results The last step of my build script tries to mail the build log to a distribution list. Unfortunately, this does not work and returns the message "File 'C: \log.txt' NOT attached to message. File does not exist or cannot be accessed." I am guessing this is because nAnt is still writing to the log file when I try to mail it (Fair enough). So how do I get round it?? This seems like an obvious requirement from a build process. Thanks in advance Mark ********************************************************************** DISCLAIMER Any opinions expressed in this email are those of the individual and not necessarily of Mondial Assistance (UK) Ltd. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited. If you have received this email in error please notify the IT support desk by telephone on +44 (0)208 2393984 or via email to [EMAIL PROTECTED], including a copy of this message. Please then delete this email and destroy any copies of it. Thank you. Please note that we reserve the right to monitor and read any emails sent and received by the Company under the Telecommunications (Lawful Business Practice) (Interception of Communications) Regulations 2000 Mondial Assistance (UK) Ltd Mondial House 102 George Street Croydon CR9 1AJ Mondial Assistance (UK) Ltd Registered in England No.1710361 Registered office as above ********************************************************************** ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs SkyScan service. For more information on a proactive anti-virus service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________ ****************************************************************** The sender's email address has changed to firstname.lastname@ sgcib.com. You may want to update your personal address book. Please see http://www.sgcib.com for more information. ** This message and any attachments (the "message") are confidential and intended solely for the addressee(s). Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. *************** L'adresse mail de votre correspondant a change en prenom.nom@ sgcib.com. Il est recommande de mettre a jour votre carnet d'addresse personnel.Pour plus d'informations, aller sur http://www.sgcib.com ** Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, modifie ou falsifie. ****************************************************************** ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users