473,796 Members | 2,728 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

delete dir in Nant - error

Sam
This is probably the wrong group to post this in, but I'm not sure
where it should go. If you have suggestions as to another group to
post it let me know.

In our Nant build file for our application. I want to first delete 2
folders if they exist. These folders then later get created. If the
folders exist, I do not get errors, but if they do not, the build
fails.

<delete dir="${build.ro ot}" />
<delete dir="${build.re lease}" />
>From a Nant website it said that you wouldn't get an error if the
directory didn't exists, but that does seem to be the case for us.

Is there syntax to say: If exist...delete? I'm new to Nant and just
trying to maintain something someone else wrote and has now left the
company.

Thanks....

Sep 28 '07 #1
1 2846
"Sam" <st********@hot mail.comwrote in message
news:11******** **************@ d55g2000hsg.goo glegroups.com.. .
This is probably the wrong group to post this in, but I'm not sure
where it should go. If you have suggestions as to another group to
post it let me know.

In our Nant build file for our application. I want to first delete 2
folders if they exist. These folders then later get created. If the
folders exist, I do not get errors, but if they do not, the build
fails.

<delete dir="${build.ro ot}" />
<delete dir="${build.re lease}" />
>>From a Nant website it said that you wouldn't get an error if the
directory didn't exists, but that does seem to be the case for us.

Is there syntax to say: If exist...delete? I'm new to Nant and just
trying to maintain something someone else wrote and has now left the
company.

Thanks....
<delete if="${directory ::exists(build. root)}" dir="${build.ro ot}" />

and for files...

<delete if="${file::exi sts(filename)}" file="${filenam e}"/>

Tigger
Sep 29 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4771
by: muesliflakes | last post by:
I am trying to run nunit2 from nant and get the following error: NUnit 2.0 Error: Request for the permission of type System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed. The doco for Nunit see: http://nant.sourceforge.net/help/tasks/nunit2.html, suggests that I
1
1885
by: Mikkel Faarup | last post by:
Hi All I have run into a problem using NANT. When building with NANT and local characters like æ ø å are used in file- and method-names NANT reports an XMLParser error? VS.Net builds fine so I guess it is something with NANT parsing the project-files etc.
2
2499
by: Ireneus Broncel | last post by:
Maybe I am wrong here, but I have a problem with nant that I don't unterstand, I'm trying to compile an example ConsoleApp Project with net-1.1, and get the errror: log4net:ERROR LogLog: Exception while reading ConfigurationSettings. Check your .config file is well formed XML. System.Configuration.ConfigurationException: Unknown configuration section appSettings (c:\Development\NET\Tools\nant-0.85-rc3\bin\nant.exe.config line 8) at
3
4266
by: prabhupr | last post by:
Hi Folks Not sure if this is the right group, if not please re-direct me to the right one. Here is my question =============== When I compile my ASP.NET WEB project from VS 2005 (.NET Framework 2.0) IDE, it works fine, but if I use NANT (Build Automation) it gives me an error as follows:
4
5686
by: emferrari | last post by:
Hi all I have a cs project that contains a reference to the MSI.DLL. If I open the project manually into the VS.NET it compiles fine, but when it runs against nant it fails. The error is regarding missing namespaces that are into the MSI.DLL. Here is my nant command: <?xml version="1.0"?>
1
4129
by: prempel | last post by:
Hi, I couldn't find a nant user group here, so thought i'd try this. I run an external program from nant (robocopy) and unfortunately, it returns 1 on success. Nant interprets this as a failure. I want it to continue when it gets a 1 back (and possibly certain other codes), but fail otherwise. I know I could use failonerror=false but then it would still continue even during a real error. Is there a way to capture the return code...
2
3018
by: Brett Romero | last post by:
I am compiling a winform app using nant. I first compile via VS.NET, which generates *.resource files in obj\debug. Then I use the <resources> tag in the Nant script to complete a build via Nant. I did try the Nant build by accessing the *.resx file instead. The app throws this error when I start it: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure...
0
1578
by: harley | last post by:
I have an NAnt script that gets launched by CruiseControl whenever someone checks a file from the project into our CVS repository. The first step after the checkout is to clean the project's bin directory and delete the compiled DLLs. However when the delete task is run I get this error.. clean: Deleting 45 files. BUILD FAILED
1
2073
by: Crash | last post by:
Hi all, Is there a newsgroup for NANT? Or is there some place I can post NANT questions? In case this newsgroup is Ok for NANT questions, here is my issue: Windows XP VS 2003
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10244
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10201
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10021
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9061
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6802
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5454
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4130
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2931
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.