How to create a file using Nant script - nant

I want to create a file using nant script. Like mkdir any command is awailable in nant script for creating a text or doc file?

You can use <touch> task to create files (or update their timestamps). Using <echo> you can output plain text to a file. <xmlpoke> allows manipulating XML files.

Related

Powershell script to download either zip or csv

I use ssis to run a powershell script to download a file that used to be csv but recently became large enough to be zipped. I updated the powershell script to look for a zip file and added a task to the package to unzip the file so it can be loaded into a sql database. Well, then it came through as a csv again. I need a solution to choose either the zip file or the csv file. Not sure if this should be a task in ssis or updated powershell.
I would go with a PS task to download the files (either zip/csv) then SSIS foreach container to iterate over the files you just downloaded. Doing this you will assign the individual file to a user variable. Inside your container if the file is zip, (use a variable set via an expression to determine if it is zip or not) run a task that will run PS to unzip and then a expression task to update the variable that holds the file path to be the newly unzipped csv path. Then run your data flow task to import the csv.
If the file is a csv to begin with, then just run the DFT.
Either way the data flow task is the same, take csv and load it. I have found I like to keep my PS in SSIS packages very purpose driven. I have a tendency to build my logic in PS because it is easier, but then my package becomes harder to debug because an issue in my PS script will fail the SSIS package and SSIS tells me nothing usefull about what in the script failed. (unless you are handling redirecting of stdout and stderr from your PS, or doing some other logging)
Best to keep the powershell as simple as needed for each task you need to do.

How to change TypeLite Output Directory

Currently all of my TypeScript typings are located under Scripts/typings/Library. By default, TypeLite is just under Scripts. Is there a way to specify the output directory so it is under a custom Library name? ie Scripts/typings/MyCSharpProj?
TypeLite uses T4 templates for generating output files and I am afraid it isn't possible to change the output directory for the template. The output file is always generated alongside the template.
If you move Manager.ttinclude TypeLite.tt and TypeLite.Net4.tt to another directory and the output files will be generated there.

How to generate a .csv file from rythm

I currently have code to generate an xml file using a rythm template. I am wondering how i can use the same code to generate a .csv file? Is there a way to do it?
please advise.
Just use csv format to create the template file, and better give it a name xxx.csv.
Checkout the full demo at https://github.com/greenlaw110/Rythm/tree/master/samples/demo_fo_SO_150529
You can run it with mvn compile exec:java if you download the whole demo to you local disk

make an exe file from a gui that runs another exe file

I am trying to make an executable file from my GUI using deploytool.
I already did this work and all things was ok, but this time , in my GUI , I have a line similar to this: dos(['Runner ' fileName]); that Runner is an exe file.
I added all needed files and also Runner.exe to Shared Resources Files of deploytool.
now when I make an exe file from my GUI and run it , mentioned line of code does not run , that is Runner does not run.
Add the additional required file as an archive file.
Use the -a switch.
Compile the file from the command line.
So your command should look something like this:
mcc -m (yourfile.m) -a (the_additional_exe_file)
You can find more information here:
https://www.mathworks.com/help/mps/ml_code/mcc.html

Where are Doxygen output files put?

I have just run Doxygen from the command line and am unsure where it put it...
It doesn't show up in the directory I ran it from
Is there an easy way to find it?
From the Doxygen manual:
The default output directory is the directory in which doxygen is started. The root directory to which the output is written can be changed using the OUTPUT_DIRECTORY. The format specific directory within the output directory can be selected using the HTML_OUTPUT, RTF_OUTPUT, LATEX_OUTPUT, XML_OUTPUT, and MAN_OUTPUT tags of the configuration file. If the output directory does not exist, doxygen will try to create it for you (but it will not try to create a whole path recursively, like mkdir -p does).
If you are having some problems getting it to do what you want use doxywizard it makes writing the configuration file much easier.