A few months ago, I received an email message from a reader saying that he has the desire and time to learn scripting but doesn't know where to start. That message prompted me to contact several scripting experts and compile a list of resources that this reader and others could use to learn scripting in the Windows environment.
To begin, it helps to know the basic concepts behind scripting. The article "An Introduction to Scripting Technologies and Object Models" (May 2000, InstantDoc ID 8599) provides an easy-to-understand overview of scripting. Before I go any further, however, let me mention two important notes:
I reference Windows Scripting Solutions, Windows IT Pro, Microsoft, and third-party resources. All the Windows Scripting Solutions and Windows IT Pro article references include an InstantDoc ID. To access these articles, simply go to http://www.windowsitpro.com, enter the specified number in the InstantDoc ID box at the top of the page, and click Go. As a Windows Scripting Solutions subscriber, you can access all Windows Scripting Solutions articles. For the benefit of readers who aren't also Windows IT Pro subscribers, I'm making all the Windows IT Pro articles I mention available for public viewing until October 2.
Some of the articles and books I mention aren't recent, but they're still good references for learning scripting. To borrow an old cliche, they're "oldies but goodies."
One point that "An Introduction to Scripting Technologies and Object Models" brings up is that there are different scripting languages. Because many scripting languages exist, I decided to narrow the list. I cover the languages of Windows shell scripting, VBScript, JScript, Perl, and T-SQL. For those of you who aren't new to scripting but who haven't had a chance to start working with Windows PowerShell (formerly code-named Monad), I also include some resources for learning this new command-line shell's scripting language, which is called Powerscript.
Which languages you should you learn depends on the systems you work with. If you work with Windows, I suggest you start by learning shell scripting and VBScript. If you work with Microsoft SQL Server, you should probably start with shell scripting and T-SQL. Note that I specified two languages in each case. As with chocolate and potato chips, getting just a taste of learning makes you hungry for more.
Shell Scripting
The scripting language that the Windows command processor (cmd.exe) uses is often referred to as Windows shell scripting. The 10-part series "Shell Scripting 101" is an excellent tutorial for people who want to learn to write .bat and .cmd scripts. (If you're wondering about the difference between .bat and .cmd scripts, read Lesson 2.) This series walks you through the basics and even includes practical exercises you can try on your own. The articles in this Web-exclusive series are
"Shell Scripting 101, Lesson 1," January 2001, InstantDoc ID 16355
"Shell Scripting 101, Lesson 2," February 2001, InstantDoc ID 19840
"Shell Scripting 101, Lesson 3," March 2001, InstantDoc ID 20142
"Shell Scripting 101, Lesson 4," April 2001, InstantDoc ID 20530
"Shell Scripting 101, Lesson 5," May 2001, InstantDoc ID 20781
"Shell Scripting 101, Lesson 6," June 2001, InstantDoc ID 21310
"Shell Scripting 101, Lesson 7," July 2001, InstantDoc ID 21630
"Shell Scripting 101, Lesson 8," August 2001, InstantDoc ID 21984
"Shell Scripting 101, Lesson 9," September 2001, InstantDoc ID 22289
"Shell Scripting 101, Lesson 10," October 2001, InstantDoc ID 22582
After you go through that series, I suggest checking out the following articles:
"Getting Started in NT Shell Scripting, Part 1," March 2000, InstantDoc ID 8182
"Getting Started in NT Shell Scripting, Part 2," April 2000, InstantDoc ID 8384
"The FAQs About Setting Up Your Shell Scripting Environment," May 2006, InstantDoc ID 49676
One book that several scripting experts recommend is Tim Hill's Windows NT Shell Scripting (Macmillan Technical Publishing, 1998).