Batch files - Examples (B*)

Download the ZIPped sources Click the floppy disk icons to download the ZIPped sources

 

Batch file examples
Download the ZIPped sources Name Description OS (1) Last modified
(DD/MM/YYYY)
Remarks
Download the ZIPped sources BattRun.bat Display a warning message if a program is launched while the computer is running on battery power XP 23/08/2007 Uses WMIC, which is not available in Windows XP Home Edition.
Download the ZIPped sources BattStat.bat Display battery status XP 04/10/2006 Uses WMIC, which is not available in Windows XP Home Edition.
Download the ZIPped sources Bin2Dec.bat Convert binary numbers to decimal NT 20/10/2007 Requires FINDSTR from the Resource Kit for Windows NT 4.
Download the ZIPped sources BIOSDate.bat (DOS)
BIOSDate.cmd (NT)
Display BIOS date All 09/03/2003 Original idea by ComputerHope.
Uses DEBUG.EXE to read from BIOS.
Available as Perl and Rexx scripts too
Download the ZIPped sources BkAllDrv Backup all device drivers W2K 10/01/2004 Also available as KiXtart, Perl and Rexx scripts.
These scripts all require Microsoft's DEVCON utility.
Download the ZIPped sources BootDisk Determine the boot disk, partition and drive letter XP 26/10/2006 Uses WMIC, which is not available in Windows XP Home Edition.
Download the ZIPped sources BootDriv Determine which drive DOS booted from All 26/10/2006 Also available as OS/2 Rexx, Regina Rexx and VBScript scripts
Download the ZIPped sources BootIni.bat Change boot menu timeout value in BOOT.INI to 5 seconds NT 06/03/2001 Incorrect changes to BOOT.INI may result in a system that won't boot anymore.
Use entirely at your own risk!
BootIni2.bat Add /NoSerialMice switch to [Operating Systems] keys in BOOT.INI 05/04/2001
BootIniGUI.bat Edit BOOT.INI's values in GUI mode 12/05/2001

 

 

Notes: (1) Operating System version these batch files were meant for
All No version specific commands are used, though it is (obviously) not tested with every DOS version available
95 Windows 95 (and probably Windows 98 as well)
98 Windows 98
DOS3 MS-DOS 3 and 4
DOS6+ MS-DOS 6 and later
Kix Windows (most functions also in plain DOS) with KiXtart
NT4 Windows NT 4 (Windows NT 4 Terminal Server Edition too)
NT Windows NT (Windows 2000 and Windows NT 4 Terminal Server Edition too)
NT+RK Windows NT with Resource Kit (Windows NT 4 Terminal Server Edition with Resource Kit too)
W2K Windows 2000, and probably XP and Server 2003 as well
W2K+RK Windows 2000 with (Server) Resource Kit, and (probably) XP and Server 2003 as well
W2K3 Windows Server 2003
XP Windows XP
OS2 OS/2 Warp
TS Windows NT 4 Terminal Server Edition, or Windows 2000 Server or Windows Server 2003 with Terminal Services