Rob van der Woude's Scripting Pages

Batch Files: Examples (C)

💾 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
📦 Calendar.bat 1.00 Display a printable calendar of the specified year NT 2009-08-25 Written by Justin.
💾 Capture.bat 1.00 Append a screen capture to a multi-page TIF file W2K 2008-06-27 Requires IrfanView.
📦 CD-Cat.bat 1.00 Catalog your CD/DVD-ROMs All 2009-08-25 Written by Jeff Montgomery.
💾 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".
💾 CDPlayer.bat 1.00 Play audio CD's or just some tracks NT 2001-08-04 Also available as OS/2 Rexx script.
💾 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.
💾 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".
💾 CheckCon.bat   Check if you are connected to the internet 95 98 1999-07-13  
💾 CheckDST.bat 1.00 Lists active computers that don't have automatic DST adjustment enabled. NT 2005-07-28  
💾 CheckPSP.bat 1.00 List all of the specified photographs that have been edited with Paint Shop Pro W2K 2010-11-10 Requires ExifTool
💾 CheckRegAccess.bat 1.00 Check if you have the required permissions on the specified registry key XP 2010-07-08 Requires WMIC
💾 CheckVarsVBS.bat 2.00 Check subroutines and variables usage in VBScript and HTA files W7 2017-05-07 Requires RxGrep.
Discontinued, use CheckVarsVBS.exe instead.
💾 ChkPath.bat 2.00 Verify if all PATH entries are valid directories W7 2015-05-11 Requires WMIC
💾 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.
💾 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).
💾 Chomp.bat 1.01 Remove trailing carriage return/line feed from strings NT 2001-10-12 Requires KiXtart.
Loosely based on Perl's CHOMP command.
💾 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.
💾 CkBkSchd.bat   Display status of all Scheduled Tasks with "backup" in their names W2K 2008-06-26 Requires JT (Resource Kit tool).
Will prompt you to download JT if not found.
💾 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.
💾 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.
💾 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
💾 CMOSBatt.bat 1.00 Check the CMOS battery status NT 2009-12-24 Requires DEBUG
💾 CMOSDST.bat 1.00 Check if Daylight Saving Time is enabled for the CMOS clock NT 2009-12-24 Requires DEBUG
💾 CnvrtUrl.bat   Convert IE Favourites to Netscape Bookmarks 95 NT 2001-04-29  
💾 CompareVersions.bat 2.01 Compare 2 version strings W10 2024-04-16  
💾 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.
💾 Cosine.bat   Calculate the cosine for the specified angle in radians NT 2010-07-15 Requires PHP
💾 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.
💾 CosineDeg.bat   Calculate the cosine for the specified angle in degrees NT 2010-07-15 Requires PHP
💾 Country.bat 4.00 Read the Country setting from NT's registry NT 2010-11-10 Requires REG.
Does not need temporary files.
💾 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.
💾 CPULoad.bat   Display the CPU load percentage XP 2010-06-23 Requires WMIC
💾 CurDrive.bat   Determine the current drive and place it in environment variable DOS6+ 2000-05-06  
💾 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*.
💾 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
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-10-09; loaded in 0.0127 seconds