scripting in Windows?

I want to create some scripts for running programs through various test cases. Essentially, the value of the script will be repeatability and ease of running many cases with many parameters.

I haven't really done much with Windows, so I'm not sure what I should study for this. I did some googling last night, and found something called PowerShell, but that looks like overkill for my needs.

Can someone suggest what I should use for this? Again, my needs are relatively modest (so far); it's more important that I can get it running quickly.

Thanks.
why not use batch scripts??
I think that's just what I was looking for. Is this a good list of the available command? I found it by googling:

http://www.techulator.com/resources/4015-How-create-batch-file-Windows.aspx

And, another question: is there a way to run programs asynchronously? I have a bunch of test cases and would like to run them simultaneously, to take advantage of my quad processor. I'm looking for something equivalent to the "&" operator in UNIX.
Last edited on
If you're using standard the command shell, don't use .bat files, use .cmd.

You'll want to take a look at PowerShell.
What is the significance of .bat vs. .cmd?

And, what does PowerShell do for me that Command Prompt won't?

Also, how does one run a program that exists in another directory? I don't want to *go to* that directory; I need to invoke it from the current directory. I tried:

../other/directory/program_name

but that gave me an error.

Thanks.
Last edited on
.bat files are a pain. They're maintained for backward compatibility with MS-DOS.
.cmd files are native to Windows NT and are a little nicer to work with.

Powershell is Microsoft's attempt to bring the power of a POSIX shell to Windows. Because it's from MS, it's probably worth learning if your needs go beyond what .cmd scripts can provide.
Can you elaborate on the differences? I'm just curious, because according to various sources (including Wiki) there doesn't seem to be much difference.

Here's what I'm trying to do:

- run a particular program 8 times (with different parameters)
- run a second program 22 times (using the output of program 1 as input, and with some variations on parameters)

I want to run the programs asynchronously (to take advantage of my quad core), and I need to run the programs from directories other than where they reside. I'll need to explicitly name the path to the programs, as there will be multiple versions of both around (so I can't rely on path to find it).

I just want the easiest way to accomplish this.
This is a good summary of .cmd instructions.
http://ss64.com/nt/

You start programs asynchronously with START.
Topic archived. No new replies allowed.