Jeffrey Palermo (.com)

Sponsors

The Lounge

Wicked Cool Jobs

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Palermo .Net Scripter utility replaces CSScripter by offering full support for C#, VB.Net and JScript.Net command-line scripting - level 200

Earlier, I posted my C# Scripter command-line utility.  I only have a need to script C#, so that's all the capability I added initially, but there was some interest in scripting VB.Net, so I refactored and enhanced my scripter, and I've renamed it "netscripter.exe".  No need to install it.  Just drop it in your tools directory and use it against any file with .Net code in it.  It now supports C#, VB.Net, and JScript.Net.  It's switches on the file extension, so name your script files .cs, .vb, and .js respectively.  The script file must be compilable into a console app to be compatible, and that's very simple to do.  With the download, I've included a sample script file for each of the languages. You can use those as references.  I'm not sure what features can be added to this simple tool beyond what is there, but I'm open for suggestions.  Just in the last few days, this tool has saved my team a _ton_ of time with mechanical task that are just a little to complicated for shell files, but simple to do with .Net.

You can download the new NetScripter here.

Don't forget to leave me feedback.


Posted Wed, Oct 12 2005 11:06 AM by Jeffrey Palermo

[Advertisement]

Comments

David Neal wrote re: Palermo .Net Scripter utility replaces CSScripter by offering full support for C#, VB.Net and JScript.Net command-line scripting - level 200
on Wed, Oct 12 2005 1:07 PM
Very, very cool. I can already think of several things I could use this for. I can also imagine using this scripting capability in some of my own apps. Here's my vote for you giving us the source code :)
Jon Galloway wrote re: Palermo .Net Scripter utility replaces CSScripter by offering full support for C#, VB.Net and JScript.Net command-line scripting - level 200
on Wed, Oct 12 2005 3:53 PM
Installed! ;-)

I added the folder to my path and added the following batch file, which I titled ns.bat:
TITLE NetScripter %1
pushd %~dp0
netscripter %1 %2 %3 %4 %5 %6 %7 %8 %9
popd

Now I can throw all my scripts in c:\utils\NetScripter\, and execute any of them from Start / Run by typing: ns jeffery.cs param1 param2
Jeffrey Palermo wrote re: Palermo .Net Scripter utility replaces CSScripter by offering full support for C#, VB.Net and JScript.Net command-line scripting - level 200
on Wed, Oct 12 2005 5:28 PM
Very cool indeed. Less to type. I'd be interested to know what type of things you are using it for. I'm using it for information filters. I have many C# scripts that do a Regex looking for a pattern. Upon find it, it does a little something. I'm doing this on a folder structure with 1000s of files. A real time-saver and a whole lot easier than do this with shell scripting.
Jeff Atwood wrote re: Palermo .Net Scripter utility replaces CSScripter by offering full support for C#, VB.Net and JScript.Net command-line scripting - level 200
on Wed, Oct 12 2005 8:07 PM
Why do you guys hate Monad so much?

I'm just saying!
Jeffrey Palermo wrote re: Palermo .Net Scripter utility replaces CSScripter by offering full support for C#, VB.Net and JScript.Net command-line scripting - level 200
on Wed, Oct 12 2005 11:02 PM
I listened to a webcast about Monad, and it sounds very promising, and I look forward to using it when it is available, but it's not right now.

I'm not sure what you mean by "Why do you guys hate Monad so much?". Reading the text above, I don't see where Monad was every mentioned, and I'm not sure who you are referring to (the hater).

Please elaborate.
Chris Martin wrote re: Palermo .Net Scripter utility replaces CSScripter by offering full support for C#, VB.Net and JScript.Net command-line scripting - level 200
on Thu, Oct 13 2005 1:04 AM
This is pretty cool. Kudos. But it really begs the question: Why not just use the great Alintex? http://www.alintex.com/
Jeffrey Palermo wrote C# Scripter: How to execute C# as batch files with my new utility - level 200
on Thu, Oct 13 2005 9:08 AM
UPDATE:  This utility has been upgraded to support more .Net languages.  See here for the newer...
Andy wrote re: Palermo .Net Scripter utility replaces CSScripter by offering full support for C#, VB.Net and JScript.Net command-line scripting - level 200
on Sat, Oct 22 2005 11:26 PM
Well, you can download Monad Beta 2 right now for free (more at http://www.leeholmes.com/blog/PermaLink,guid,8b26fea1-723d-4bd6-93c1-19d681af9276.aspx). I've been using it for a while now, and I haven't had any problems with it or anything.

From what I've done with it, I would say that Monad is more than just a .NET scripting language. Not only does it pass objects through the pipeline instead of text, but you can also extend existing types with new properties, methods, etc. It's definitely worth it to try it out and play around with it for a while.
Jeffrey Palermo wrote re: Palermo .Net Scripter utility replaces CSScripter by offering full support for C#, VB.Net and JScript.Net command-line scripting - level 200
on Sat, Oct 22 2005 11:39 PM
I appreciate the information, Andy, and I look forward to using it when Microsoft releases and supports it. I'm not able to use any non-supported products except in VPCs right now. It sounds very promising, however, as the replacement for the current DOS shell.
Rick.Stavanja.com wrote Link-O-Rama
on Mon, Oct 24 2005 1:53 AM
.Net Adventures wrote Palermo .Net Scripter
on Sat, Nov 5 2005 5:06 PM

Run .Net console class as batch files from the command line with this
utility that will compile...
.Net Adventures wrote Palermo .Net Scripter
on Sat, Nov 5 2005 5:08 PM

Run .Net console class as batch files from the command line with this
utility that will compile...
.Net Adventures wrote Palermo .Net Scripter
on Sat, Nov 5 2005 5:30 PM

Run .Net console class as batch files from the command line with this
utility that will compile...
Rick.Stavanja.com wrote Link-O-Rama (October 2005)
on Thu, Sep 14 2006 1:57 AM

Several of you seemed to enjoy my Links of the Week post a couple weeks ago. Since it's a fairly

Devlicio.us