About My Batch Files
I used OS/2 to create most of the "old" MS-DOS batch files.
The NT batch files were created using Windows NT 4, 2000, XP and 7.
I try to make my batch files more or less OS version and language independent.
Keep in mind, though, that most of them have never been tested in MS-DOS 6.* or any earlier version.
It is, however, good practice to always test new batch files and programs thoroughly before you use them.
If you encounter any problem using one of my batch file examples, take the following points into consideration:
- Check the documentation (these pages, comment lines within the batch files themselves, or even DOS manuals, etcetera) to see if the batch file is intended to work in your operating system.
For example, if FOR /F is used, don't bother trying it in Windows 98 — it just won't work.
- If the batch file uses temporary (batch) files, make sure these temporary files can actually be created — in other words: check if you have write access in the current directory and/or TEMP directory.
If you cannot be sure about write access in the current directory, adapt the batch file to write all temporary files in the TEMP directory (or any other directory) and either make that TEMP directory your current directory or add it to your search PATH.
More information on this subject can be found in my notes on temporary files.
- Some of my batch file examples use network related commands.
These are tested for OS/2 Peer and/or LAN Server or Windows NT 4/2000 networks only, unless specifically stated otherwise.
- Check the last-modified date of the scripts you downloaded.
Don't expect batch files last modified in 2001 to run without a hitch in Windows Server 2003.
If they do, then you're in luck, if they don't, check if they contain any Windows version specific code (many Windows 9x batch files won't run in Windows 2000/XP/Server 2003).
- And last but not least: always use the downloadable code, do not copy and paste from the HTML pages.
The examples in HTML are for inspection only, but due to HTML restrictions I sometimes have to replace symbols by their closest HTML lookalike.
A good example is the pipe symbol, which is displayed in my HTML pages as
¦ by using
Though this worked perfectly in MS-DOS and OS/2, in Windows batch files the use of the "broken" pipe symbol
¦ instead of the "unbroken" one
| will result in error messages.
page last uploaded: 2018-12-20, 10:48