I've moved away from batch files over recent years, mostly to take advantage of the wider selection of tools available in Windows scripting - mostly using the Windows Script Host (WSH) and VBScript. I have collected a number of scripts, but have not had much time to maintain this site, so I have been content to post in the appropriate users groups, instead. However, I recently posted an unindexed file in my web space to make it available to a reader without clogging the user group's bandwidth. Having put it into my web space, I have decided to provide a link on this web site as well. However, I do not have time to explain the script. I have added several more already and will try to add some others as time permits, but am not currently planning on spending time explaining them beyond any comments you may find in the code. Therefore, use at your own risk.
My WSH Script Index
These applications, written exclusively with standard batch language commands and utilities and without resorting to third party programs, might not be particularly instructive to the uninitiated. They use a lot of counter-intuitive approaches and are generally fairly complex. The collection is not intended as a tutorial for the neophyte, but is offered rather to stimulate the hard-core command line addict (with a few Windows specific applications). Newbies might want to go straight to my Bookmarks to find links to a FAQ or a DOS command syntax reference.
Several of the methods described here have been published elsewhere, usually over my name. Nearly all of them are my original ideas, though I am quite sure others have discovered many of the same ideas on their own.
A special caveat for those seeking solutions for Windows NT/2000/XP:FEW of this site's application are guaranteed to work in Windows NT/2000/XP. Many of them are KNOWN to fail. Plus, it is likely that there is an NT specific extension to the FOR or SET statements that does the job better/easier/faster than any approach published here. Almost the entire content of this site was created many years ago for use with MS-DOS 6.2. Some routines were extended into Windows 3.1 and 95/98, but I see little reason to extend them into the NT/2000/XP realm. The Windows Script Host (WSH) does a much better job. You are welcome to visit, but don't blame me if something fails - and please don't ask me to fix it. I'm not interested in trying and doubt that I can.
The subjects in the table of contents provided below are not exhaustive of the contents in these pages, but rather they are portals to the broader subject. Be assured that each item leads immediately to working examples of the topic named. They may also lead to other examples that go deeper, become more and more complex or maybe just more ridiculous as you go. Bail out when you feel the need or follow the trail to its utter extremity.
Before you go below, you will probably want to visit my notes page to check out some general information about the very unorthodox language usages contained herein. It just might help you understand my batch file examples (maybe).
If you feel so inclined, have a question or find a bug, drop me a line at my current Email address.