A good alternative to Windows scripting?

What are some good alternatives to Windows batch scripts? We have a lot of them, and they are very "awkward" for work. As our group is familiar with Java, is Groovy a good option?

Many of our scripts are used to prepare developer databases, so they include many cd mydir , hg fetch , sqlplus ... etc.

+8
scripting batch-file groovy
source share
5 answers

If you are interested in scripting for Windows than a technology designed specifically for Windows, such as PowerShell , this is a smart choice.

Although groovy will probably allow you to reach your goal, I don’t think there is a definite advantage that it can offer.

Speaking of this, you should take into account the coefficient of familiarity and the learning curve. You say developers have experience with Java and groovy, in which case ant tasks using groovy DSL might be easier than learning PowerShell.

Regardless, consider developing scenarios using the TDD approach. groovy offers many frameworks (for example, try Spock), while there are ways to achieve this for PowerShell .

+11
source share

It depends on what you want to do with your scripts. BASH in windows via cygwin may be useful to try.

+1
source share

Powershell, VBScript, Perl, Python. There is no shortage of good scripting languages ​​that have a Windows implementation.

+1
source share

You can also look at the good old Ant , it has goals for copying, executing shell commands, etc. Gradle could be even better, since it supports Groovy inline code, including simple loops and conditions that Ant lacks.

+1
source share

PowerShell 2.0 is a good choice. It will ship with Windows Server 2008 R2 or Windows 7. You do not need to install anything on top of this version of O / S.

+1
source share

All Articles