Rob van der Woude's Scripting Pages

Batch Files: Examples (I)

💾 Click the floppy disk or package (for third party scripts) 📦 icons to download the ZIPped sources

Click the question mark icons to view the MD5 and SHA1 checksums for the ZIPped sources



All 0..9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z


Batch file examples
💾 Name Version Description OS (1) Last modified Remarks
💾 IEFavSrt.bat 1.00 Make Internet Explorer automatically sort its favorites W2K 2005-02-17  
💾 IEVer.bat 3.00 Log Internet Explorer version NT 2010-11-09 Requires REG
💾 InvShare.bat 1.00 Show Event Log entries concerning invalid share names NT 2000-06-05 Requires DUMPEL
💾 IP2User.bat 1.10 Display remote computer and user info NT 2003-10-25 For English Windows versions.
Needs to be modified if used with other languages.
💾 is6432os.bat 1.00 Check if a Windows is 32-bit or 64-bit XP 2010-08-01 Requires WMIC.
Also available in VBScript and C#.
💾 IsDate.bat 1.02 Checks the validity of the specified date W2K 2011-05-05  
💾 IsDev   Check if specified name is a valid device name All 1999-12-06 Both DOS and OS/2 batch files supplied. Both will work in NT.
💾 IsDST.bat 1.03 Check if the current or specified date/time is in Daylight saving Time XP 2011-04-12 Requires WMIC.
Requires permission to change the system date (will do so up to 65 times).
Do not use on computers that are member of a domain.
Use entirely at your own risk.
VBScript and C# versions are safer to use.
💾 IsDuplexPrinter.bat 1.00 Check if a printer is capable of duplex (two-sided) printing XP 2018-02-19 Requires WMIC
💾 IsFAT.bat 1.00 Check if specified drive is FAT formated or not NT 2001-02-15 This batch file has become obsolete; use FileSys.bat instead.
💾 IsNumber.bat 1.00 Check if specified value is numeric or not NT 2008-01-11 No screen output if a valid number was specified. Returns different errorlevels for different types of numbers. Errorlevel 0=NAN, 1=batch file error, 2=binary, 8=octal, 10=positive decimal integer, 11=negative integer, 16=hexadecimal. To check for a number in general use IF ERRORLEVEL 2, for specific types use IF %ERRORLEVEL% EQU 10 (10 for positive decimal integer).
💾 IsRTCSet.bat 1.00 Check if the CMOS Real Time Clock is set, and return an errorlevel greater than 0 if not NT 2009-01-24 Requires DEBUG
💾 IsUnicode.bat 1.00 Check if the the specified text file is Unicode or ANSI NT 2017-07-25 Based on sample code by "jaclaz" on MSFN.ORG


All 0..9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z


Notes: (1) Operating System version these batch files were written 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
NT Windows NT 4 and later
NT4 Windows NT 4 (Windows NT 4 Terminal Server Edition too)
W2K Windows 2000 and later
XP Windows XP
W2K3 Windows Server 2003
W2K8 Windows Server 2008
W10 Windows 10
WV Windows Vista
W2K8R2 Windows Server 2008 Release 2
W7 Windows 7
OS2 OS/2 Warp
TS Windows NT 4 Terminal Server Edition, or Windows Server 200* with Terminal Services

page last modified: 2024-06-07; loaded in 0.0130 seconds