Batch Files: Examples (C)

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 Calendar.bat 1.00 Display a printable calendar of the specified year NT 2009-08-25 Written by Justin.
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 Capture.bat 1.00 Append a screen capture to a multi-page TIF file W2K 2008-06-27 Requires IrfanView.
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 CD-Cat.bat 1.00 Catalog your CD/DVD-ROMs All 2009-08-25 Written by Jeff Montgomery.
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 CDACTXP.bat 1.00 Show a list of all CD/DVD drives containing a disk XP 2005-11-26 Uses XP's DISKPART to determine the CD/DVD-ROM drive letters. May fail if any disk volume is labeled "CDFS".
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 CDPlayer.bat 1.00 Play audio CD's or just some tracks NT 2001-08-04 Also available as OS/2 Rexx script
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 CDROM.bat 3.00 Determine which drive letter is assigned to the CD-ROM drive 95 98 NT 2001-12-25 Also available as KiXtart, Rexx and VBScript scripts.
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 CDROMXP.bat 1.00 Determine which drive letter is assigned to the CD/DVD-ROM drive XP 2005-11-21 Uses XP's DISKPART to determine the (last) CD/DVD-ROM drive letter. May fail if any disk volume label ends with "-ROM".
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 CheckCon.bat   Check if you are connected to the internet 95 98 1999-07-13  
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 CheckDST.bat 1.00 Lists active computers that don't have automatic DST adjustment enabled. NT 2005-07-28  
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 CheckPSP.bat 1.00 List all of the specified photographs that have been edited with Paint Shop Pro W2K 2010-11-10 Requires ExifTool
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 CheckRegAccess.bat 1.00 Check if you have the required permissions on the specified registry key XP 2010-07-08 Requires WMIC
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 ChkPath.bat 1.00 Verify if all PATH entries are valid directories W2K 2008-07-17 This batch file may work in Windows NT4 too, but I didn't check
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 ChkSize.bat 1.00 Check if the actual file size matches a specified minimum size NT OS2 2000-09-23 Also available as Rexx script
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 CHMFixUNC.bat 1.00 Allow *.chm files to be opened from all currently mapped network drives W7 2010-09-27 Requires REG 3.0.
May or may not work in Windows XP and Vista (not tested)
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 Chomp.bat 1.01 Remove trailing carriage return/line feed from strings NT 2001-10-12 Loosely based on Perl's CHOMP command
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 Chr.bat 3.00 Display ASCII character(s) with the specified ASCII value(s) NT 2011-07-26 Requires either FORFILES or XP.
Based on research by "SmartGenius" and Rob Van Etta
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 CkBkSchd.bat 0.10 Display status of all Scheduled Tasks with "backup" in their names W2K 2008-06-26 Requires JT from the Resource Kit and will prompt you to download it if not found
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 CLLUN.bat 1.00 Clear Last Logon User Name: clears the last user name from the login dialog box once, or replaces it with a different name. 95 98 NT 2002-08-13 Use DDLU.bat instead if you never want the last logon user name displayed again
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 CloneDate.bat 1.11 Apply the first file's timestamp to the second file specified W2K 2005-07-28 Requires FileDate.rex and Regina REXX.
Also available in VBScript, as a single "self contained" script.
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 CloneUsr.bat 1.11 Create a new domain user account by cloning an existing account W2K 2005-08-18 Requires Windows Server 2003's DS Tools and TSCMD
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 CMOSBatt.bat 1.00 Check the CMOS battery status NT 2009-12-24 Requires DEBUG
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 CMOSDST.bat 1.00 Check if Daylight Saving Time is enabled for the CMOS clock NT 2009-12-24 Requires DEBUG
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 CnvrtUrl.bat   Convert IE Favourites to Netscape Bookmarks 95 NT 2001-04-29  
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 CompName.bat 1.01 Change the computer name 95 2003-10-12 Requires CompName.kix 1.01 and KiXtart.
This batch file is actually just a "wrapper" for the KiXtart script.
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 Cosine.bat   Calculate the cosine for the specified angle in radians NT 2010-07-15 Requires PHP
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 Cosine.bat   Calculate the cosine for the specified angle in radians NT 2010-07-16 This version uses native Windows command only.
It is, however, less accurate than the PHP version.
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 CosineDeg.bat   Calculate the cosine for the specified angle in degrees NT 2010-07-15 Requires PHP
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 Country.bat 4.00 Read the Country setting from NT's registry NT 2010-11-10 Requires REG.
Does not need temporary files.
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 Country3.bat 3.01 Read the Country setting from NT's registry NT 2009-02-08 Uses temporary files, but doesn't need the Resource Kit
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 CPULoad.bat   Display the CPU load percentage XP 2010-06-23 Requires WMIC
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 CurDrive.bat   Determine the current drive and place it in environment variable DOS6+ 2000-05-06  
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 CurDriv1.bat   Determine the current drive and place it in environment variable DOS6+ 2000-05-06 Uses Laurence Soucy's "CHOICE technique" first demonstrated in BootDrv*.
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 Cut.bat 1.00 A UNIX-like CUT utility W2K 2011-01-22  

 

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