Batch Files: Examples (I)

Download the ZIPed sources Click the floppy disk or Download the ZIPed sources icons to download the ZIPed sources

Checksums for the ZIPed sources Click the question mark icons to view the MD5 and SHA1 checksums for the ZIPed 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
Click the floppy disk icons to dowload the ZIPed sources Click the question mark icons to view the MD5 and SHA1 checksums for the ZIPed sources Name Version Description OS (1) Last modified Remarks
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source IEFavSrt.bat 1.00 Make Internet Explorer automatically sort its favorites W2K 2005-02-17  
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source IEVer.bat 3.00 Log Internet Explorer version NT 2010-11-09 Requires REG
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source InvShare.bat 1.00 Show Event Log entries concerning invalid share names NT 2000-06-05 Requires DUMPEL
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source 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.
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source 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#.
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source IsDate.bat 1.02 Checks the validity of the specified date W2K 2011-05-05  
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source 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.
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source 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.
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source 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
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source 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)
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source 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

 

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
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 uploaded: 18 November 2012, 19:31