Search code examples
.netbatch-filedos

How to avoid writing a .bat file, by executing a .cs file as a script?


I'd like to write a simple batch file to copy a few files around.

However, I'm tired of batch files as they are so limiting, and I'd like to just write a simple .cs file which I can execute as a script, directly from the command line.

How can I run a ".cs" file from the command line, and have it run an a script?


Solution

  • See http://www.csscript.net/, if you install it you can run simple .cs files just like DOS batch files (i.e. no need to compile them into a project).