Rob van der Woude's Scripting Pages

Batch Files: Examples (All)

💾 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
💾 4AllCtxSrv.bat 1.12 Executes a command once for each member of a Citrix farm, substituting the "#" character by the server name W2K 2005-02-14 Requires Citrix client software. 
💾 4AllMembers.bat 1.10 Executes a command once for each member of a global group, optionaly substituting the "#" character by the user ID NT4 2002-02-20  
💾 4AllMembers.bat 2.11 Executes a command once for each member of a global group, optionaly substituting the "#" character by the user ID W2K 2002-09-11 Handles local, domain local and global groups.
💾 4AllMembers.cmd 1.00 Executes a command once for each member of a global group, optionaly substituting the "#" character by the user ID OS2 2000-06-04  
📦 A2U.bat 1.10 Convert ASCII text files to valid Unicode W2K 2011-05-10 Written by Carlos M.
💾 ActUsr.bat 1.00 Display computers on the network and their logged on users NT 2002-09-30  
📦 Add.cmd 1.02 Add really big numbers (beyond Windows' 32-bit integer limits) NT 2012-07-20 Written by Brian Williams.
💾 AddIPPrn.bat 1.01 Add a local TCP/IP printer on any W2K/XP computer in the network W2K 2006-01-31 Requires PRNADMIN.DLL
📦 AddMySQLPort.bat 1.00 Open port 3306 for MySQL in XP's Firewall XP 2006-07-29 Requires NETSH.
Written by Willi Huber.
💾 AddPrint.bat 1.01 Add a network printer on any W2K/XP computer in the network W2K 2005-06-11  
📦 AdminGrp.bat 3.00 Remotely update Local Administrator groups on all PCs in a domain (except PCs listed in an exclusion file) NT 2000-11-29 Requires USR2GRP.
Written by Kenneth C. Mazie, Kaiser Permanente National Server Operations - Walnut Creek, CA.
💾 AdOnGone.bat 1.00 Restore disappeared Firefox add-ons after a Firefox update W2K 2008-03-28  
💾 ADSHelp.bat 2.11 Create a (HTML) help file for "all" Directory Service Command Line Tools in Windows Server 2003 W2K3 2015-08-14 Requires Windows Server 2003's DS Tools.
Will only display help for the OS in which the HTML file was created -- in the language of that OS version, as is demonstrated here.
💾 AirRegNCmd.cmd 1.00 Search downloaded FAA registry database files for an aircraft registration number ("N-number") XP 2020-02-13  
💾 AllHelp.bat 1.40 Create a (HTML) help file for "all" NT4/2000/XP commands NT 2006-10-26 More details and samples of generated HTML pages on my AllHelp page.
💾 APIPA.bat 1.00 Display or modify Windows 2000 IP Autoconfiguration (APIPA) settings W2K 2002-03-03 Also available in VBScript.
💾 AppCompat.bat 1.01 Add an Application Compatibility Layer for the specified program W7 2011-10-18  
💾 AppendSilence.bat 1.02 Use FFMPEG to append silence to an existing mp3 file NT 2023-10-18 Requires FFMPEG
💾 Asc.bat 1.00 Return the ASCII value for the specified character, more or less like many scripting languages' Asc( ) function NT 2007-12-15 Requires DEBUG.
Creates a temporary utility that performs the conversion.
💾 ASCII2Uc.bat 2.01 Convert ASCII text files to valid Unicode W2K 2011-02-28 Requires DEBUG.
This batch file was based on research by Jacques Bensimon.
Creates a temporary utility to write the Unicode file header.
Embedded ASM code by JustBurn.
64-bit Windows uses either an "external" header file (ASCII2Uc.header) or ECHO instead of DEBUG; ECHO will insert an extra line break.
Also available in VBScript.
This batch file has become obsolete by Carlos M.'s A2U.bat, which overcomes this batch file's Unicode header problems.
💾 AtFuture.bat 1.20 Schedule a command a few minutes from now in the near future NT 2008-04-22 This batch file was a coproduction with Rob Fuller.
💾 BackupScheduledTasks.bat 1.02 Backup and restore scheduled tasks from Task Scheduler's root folder W7 2015-04-09 Requires SCHTASKS
💾 BattRun.bat 1.00 Display a warning message if a program is launched while the computer is running on battery power XP 2007-08-23 Requires WMIC
💾 BattStat.bat 1.00 Display battery status XP 2006-10-04 Requires WMIC
💾 Bin2Dec.bat   Convert binary numbers to decimal NT 2007-10-20 Requires FINDSTR from the Resource Kit for Windows NT4.
💾 Bin2Dec.bat 1.00 Convert binary numbers to decimal NT 2010-07-15 Requires PHP 5.2
💾 Bin2Hex.bat   Convert binary numbers to hexadecimal NT 2010-07-15 Requires PHP
💾 BinToDec.bat 1.00 Convert a 31-bit binary number to decimal NT 2022-03-13 This batch file uses CMD.EXE's internal commands only.
💾 BIOSDate.bat 1.00 Display BIOS date DOS 2003-03-09 Requires DEBUG.
Original idea by ComputerHope.
Available as Perl and Rexx scripts too.
💾 BIOSDate.cmd 1.00 Display BIOS date NT 2003-03-09 Requires DEBUG.
Original idea by ComputerHope.
Available as Perl and Rexx scripts too.
💾 BirdName.bat   Get the scientific name and several translations for a specified Dutch bird name NT 2011-12-01 Requires FINDSTR and WGetTxt.vbs
💾 BkAllDrv.bat 1.06 Backup all device drivers W2K 2004-01-10 Also available as KiXtart, Perl and Rexx scripts.
These scripts all require Microsoft's DEVCON utility.
💾 BootDisk.bat 1.01 Determine the boot disk, partition and drive letter XP 2012-01-07 Requires WMIC
💾 BootDriv.bat   Determine which drive DOS booted from All 2006-10-26 Also available as OS/2 Rexx, Regina Rexx and VBScript scripts.
💾 BootIni.bat 1.00 Change boot menu timeout value in BOOT.INI to 5 seconds NT 2001-03-06 Incorrect changes to BOOT.INI may result in a system that won't boot anymore.
Use entirely at your own risk!.
💾 BootIni2.bat 2.01 Add /NoSerialMice switch to [Operating Systems] keys in BOOT.INI NT 2001-04-05 Incorrect changes to BOOT.INI may result in a system that won't boot anymore.
Use entirely at your own risk!.
💾 BootIniGUI.bat   Edit BOOT.INI's values in GUI mode NT 2001-05-12 Incorrect changes to BOOT.INI may result in a system that won't boot anymore.
Use entirely at your own risk!.
💾 BootState.bat 1.04 Show Windows' boot state, e.g. Normal, Safe mode, Windows PE XP 2017-11-08 Requires WMIC
📦 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  
💾 DateAdd.bat 2.02 Add/subtract a specified number of days to/from a specified date XP 2018-08-22 Requires WMIC.
For Windows XP and later.
Based on Fliegel-Van Flandern Julian date conversion algorithms from the Astronomical Almanac, provided by Doctor Fenton on the Math Forum and converted to batch code by Ron Bakowski.
💾 DateAddNT4.bat 1.10 Add/subtract a specified number of days to/from a specified date NT 2007-02-12 Requires REGEDIT.
For Windows NT4 and 2000.
Based on Fliegel-Van Flandern Julian date conversion algorithms from the Astronomical Almanac, provided by Doctor Fenton on the Math Forum and converted to batch code by Ron Bakowski.
💾 DateDiff.bat 1.11 Calculate the difference in days between two dates XP 2018-12-10 Based on Fliegel-Van Flandern Julian date conversion algorithms from the Astronomical Almanac, provided by Doctor Fenton on the Math Forum and converted to batch code by Ron Bakowski.
💾 DateFmt.bat   Show the current date in the specified format NT 2008-08-07 Inspired by Simon Sheppard's GetDate.bat.
💾 DatePart.bat 1.00 Return the specified numerical part of the current date or time NT 2008-11-15 Batch "wrapper" for VBScript's DatePart( ) function.
💾 DatePart.cmd 3.20 Return the specified numerical part of the current date or time XP 2013-02-26 Requires WMIC
💾 DateTime   Store week day, current date and current time in environment variables All Take a look at SortDate and SortTime for an NT version with language independent sorting, or at DateErrT for a version that uses ErrTime by Phil Money to remain virtually OS independent.
📦 DateTime.cmd   Return the current date as errorlevel in YYYYMMDD format XP 2009-04-27 Written by Justin.
Works only in Windows XP.
Requires modifications to work on non-US systems.
💾 DDLU.bat 1.00 Don't Display Last Username: clears the last user name from the login dialog box permanently. NT 2001-12-20 Use CLLUN.bat instead to remove the last logon user name just this once.
See the Related Stuff section for a note on "Don't Display Last Username" in Vista and Windows 7.
💾 DeadProf.bat 1.00 Delete inactive corrupted profiles for current user NT 2000-09-15  
💾 Dec2Bin.bat   Convert decimal numbers to binary NT 2010-07-15 Requires PHP
💾 Dec2Hex.bat 3.00 Convert a decimal number to "7.5" digit hexadecimal NT 2022-02-22 This batch file uses a "poorly documented" feature of the PING command to convert a decimal number to hexadecimal.
Also available in KiXtart, Perl, Rexx and VBScript.
💾 Dec2Hex.bat   Convert decimal numbers to hexadecimal NT 2010-07-15 Requires PHP
💾 DecToBin.bat 1.00 Convert a decimal number to 31-bit binary NT 2022-03-13 This batch file uses CMD.EXE's internal commands only.
💾 DecToHex.bat 2.01 Convert a decimal number to "7.5" digit hexadecimal NT 2022-02-23 This batch file uses CMD.EXE's internal commands only.
Also available in KiXtart, Perl, Rexx and VBScript.
📦 DecToHex3P.bat 1.00 Convert a decimal number to hexadecimal NT 2006-08-24 Written by Richard K. Bussey.
💾 DecToOct.bat 1.01 Convert a decimal number to "10.5" digit octal NT 2022-02-23 This batch file uses CMD.EXE's internal commands only.
💾 DefaultQuickEditMode.bat 1.00 Get or set the default Quick-Edit mode for console windows NT 2022-03-19  
💾 DefOpen.bat 3.00 Create a default file association to Notepad and add "Open with Notepad", "Print with Notepad" and "Command Prompt Here" options to popup menus 95 98 NT 2000 XP 2007-11-21 Based on a tip by Regedit.com.
More details on my REGEDIT page.
💾 DefPRN.bat   Display default printer name NT 1999-11-07 Also available as OS/2 Rexx, Windows Rexx, JScript, KiXtart, Perl and VBScript scripts.
💾 DefPRN2K.bat 1.00 Display default printer name W2K 2002-02-13 Also available as OS/2 Rexx, Windows Rexx, JScript, KiXtart, Perl and VBScript scripts.
💾 DelFlash.bat 2.01 Delete "Local Shared Objects", a.k.a. "Flash Cookies", from the current user's profile NT 2015-10-20 Use entirely at your own risk!.
💾 DelOutlX.bat   Uninstall Outlook Express (BETA!) W2K 2003-12-20 Tested on 1 Windows 2000 computer only.
Use entirely at your own risk!.
💾 DelProf.bat   Delete specified profile (BETA!) NT 2003-12-17 Still in beta! That is why the most destructive command of the batch file is echoed only.
💾 Desktop.bat 2.00 Save all desktop shortcuts as a batch file that can recreate those shortcuts again (Desktop backup) NT 2001-08-05 Requires SHORTCUT
📦 DHCPScopes.bat 6.8.18 List all authorized DHCP servers on the domain and log all active scopes XP 2006-08-17 Requires NETSH.
Written by Josh Murray.
💾 DirComp.bat 3.30 Compare the total number of files, total file size, timestamps and contents of 2 directories NT 2014-10-01 Requires FCIV.
Uses FC to compare FCIV listings of the 2 directories, so the lines preceeding and following the detected differences will also be displayed on screen.
💾 Disabled.bat 1.00 Lists all disabled user accounts NT 2000-09-21  
💾 DisableCompatTelRunner.bat 1.00 Disable scheduled Application Experience tasks to speed up Windows startup W7 2017-05-09  
💾   DiskFree   Check amount of free disk space, the hard way All Use FreeSpace.vbs if you need a more reliable tool.
💾 DiskSpc.bat 3.10 Display harddisk summary for any WMI enabled computer or for a list of computers XP 2006-10-02 Requires WMIC
💾 DiskUse4.bat 4.20 List the disk usage for every subdirectory NT4 2014-10-01 Returns negative numbers if total file sizes exceed 2GB.
Also available as Rexx script.
💾 DiskUse.bat 5.10 List the disk usage for every subdirectory W2K 2014-10-01 Fixed negative numbers bug for Windows 2000/XP.
Also available as Rexx script.
💾 DispEDID.bat 1.01 Display your monitor's EDID asset information XP 2007-02-20 Also available in VBScript.
💾 Dll_Menu.bat 1.01 Add "Register" and "Unregister" to Explorer's context menu for DLLs and OCXs W2K 2014-10-01  
💾 dNFxVer.bat 1.01 List the installed .NET Framework versions W2K 2010-08-26 Requires GetUnins.vbs.
Windows 2000 and XP only.
💾 DNSServers.bat 1.00 List the configured DNS servers for each network adapter XP 2011-11-17 Requires WMIC
💾 DotNetFxVer.bat 1.01 List installed .NET Framework versions for any computer W2K 2017-06-16 Unlike similar batch files that query the registry, this one checks mscorlib.dll's file version.
💾 DriveRdy.bat   Check if (removable) drive is ready DOS6+ OS2 1999-07-18 Also available as OS/2 Rexx script.
💾 Drives.bat 2.01 List drive letters and types XP 2012-04-20 Requires WMIC
💾 DrivesXPHome.bat 1.01 List local drive letters and types W2K 2003-12-17 This version is for Windows 2000 and XP Home only.
💾 DrivUsed.bat 1.00 List used and available drive letters XP 2007-12-30  
💾 DxSound.bat 1.00 List selected DirectX properties for all sound devices XP 2011-09-23 Requires DxDiag.exe (native) and XML Starlet
💾 DxVideo.bat 1.01 List selected DirectX properties for all video cards/monitors XP 2011-09-23 Requires DxDiag.exe (native) and XML Starlet
💾 Easter.bat 3.01 Calculate dates for Easter Day, Ascension Day and Pentecost for any year XP 2024-04-20 Easter Day calculation based on the instructions found at Simon Kershaw's "KEEPING THE FEAST, A companion to the Holy Days of the Calendar 2000".
Julian date math based on Fliegel-Van Flandern algorithm from the Astronomical Almanac, provided by Doctor Fenton on the Math Forum, and converted to batch code by Ron Bakowski.
Also available as KiXtart, Perl, Rexx or VBScript script.
💾 EasterPHP.bat 1.01 Calculate Easter date for the current or specified year NT 2011-12-29 Requires PHP
💾 Edit.bat 1.11 Open the specified file in the editor registered for its file type XP 2021-11-14  
💾 E-mail   Send batch file generated e-mail messages NT 2000-01-15  
💾 ErrLevel.bat   Show errorlevel of previous command All 1999-07-18  
💾 ErrorMsg.bat 2.00 List all error messages known by the NET HELPMSG command NT 2014-08-22  
💾 EXIFInfo.bat   Return the requested EXIF value for the specified file(s) W2K 2012-09-30  
💾 Expires.bat 1.00 Lists all user accounts that have "Password expires" set to "Never" NT 2000-09-21  
💾 ExpPrnDr.bat 1.01 Export Printer Drivers W2K 2009-12-20 Requires DEVCON
💾 FaR.bat 1.00 Find And Replace substrings in a string All 2001-07-15 Requires FaR.kix and KiXtart.
Also available in Perl and Rexx.
💾 FeazBkup.bat   Backup Fileaze jobs NT 2006-12-22  
💾 FfxCAC.bat 1.10 Delete all files from all Firefox caches in all profiles XP 2010-09-23  
💾 FfxCache.bat 1.10 Delete all files from the Firefox cache in your profile XP 2010-09-20  
💾 FileSys.bat 4.00 Check file system type of specified drive NT 2002-01-08 NTFS test inspired by a post from Mark Stang on alt.msdos.batch.nt
Also available as OS/2 Rexx script.
💾 FileVer.bat 1.00 Display the specified program file's version number NT 2003-05-26 Requires STRINGS
💾 FlopDOS.bat 1.00 Display the installed floppy drives DOS 2009-01-22 Requires DEBUG
💾 Floppy.bat 1.01 Display the installed floppy drives NT 2009-01-20 Requires DEBUG
💾 FlushBin.bat 1.00 Flush IE cache, temp files, ChkDsk files and Recycle Bin XP 2008-06-29 Uses CLEANMGR.EXE.
Highly experimental, use at your own risk.
💾 FlushFxC.bat 1.00 Flush Firefox's cache in the current user's Windows profile NT 2008-03-28 Careful: if you use this batch file without closing Firefox, you may need to manually purge Firefox's cache to reenable display of pictures in web pages: Tools menu, Options, Privacy tab, Clear Now button, deselect everything but Cache, OK button.
💾 ForceCAD.bat   Force the use of Ctrl+Alt+Del to login. XP 2009-08-18 See the Related Stuff section for a note on "Force Ctrl+Alt+DEL" in Vista and Windows 7.
💾 ForShare   This example of FOR's /D parameter restores or removes the shares on all home directories on an NT server. NT 2000-10-17  
💾 Foto2Web.bat 1.10 Create all files necessary to publish your photographs on the web NT 2007-10-26 Requires IrfanView.
Use the diskette icon at the left to download the ZIPped archive that includes the navigation buttons (GIFs).
💾 FPMath.bat   Command line floating point calculator NT 2010-07-16 Requires PHP
📦 FreeDriveLetter.bat 3.00 List free drive letters W2K 2008-12-10 Requires MOUNTVOL.
Written by Jacopo Lazzari.
💾 FtpDir 1.01 Show directory of remote FTP site NT 2001-11-23  
📦 GetAllUserDetails.bat 1.00 List details of all user account W2K 2006-09-13 Requires GetUserDetails.bat.
Written by Florian Dörr.
💾 GetCDROMDrives.bat 1.00 List all CDROM drives for the local computer W7 2010-09-06 Requires REG 6.1. 
💾 GetCDROMDrivesXP.bat 1.10 List all CDROM drives for the local computer XP 2010-09-06 Requires REG 3.0. 
💾 GetDefaultBrowser.bat 1.03 Demo script to try and detect the default browser W10 2023-03-13 Registy value locations provided by Joe Caverly and Steve Robertson.
💾 GetDevDJ.bat 1.00 Check if a HP DeskJet printer driver is installed NT 2002-03-30 Requires DEVCON.
Tip by Eric Krause.
💾 GetDeviceClassGUID.bat 2.00 List Device Interface GUID(s) for the specified Device Class W10 2024-02-27 Requires DEVCON
💾 GetDevLT.bat 1.00 Check if a Logitech mouse driver is installed NT 2002-03-30 Requires DEVCON.
Tip by Eric Krause.
💾 GetDevSB.bat 1.00 Check if a Creative Sound Blaster driver is installed NT 2002-03-30 Requires DEVCON.
Tip by Eric Krause.
💾 GetFlashDrives.bat 1.00 List all removable "flash" drives for the local computer W7 2010-09-06 Requires REG 6.1. 
💾 GetFlashDrivesXP.bat 1.00 List all removable "flash" drives for the local computer XP 2010-09-15 Requires REG 3.0. 
💾 GetID.bat 1.02 Search and display login and full names based on part of a user's full name (fails on migrated NT4 user accounts) W2K3 2004-08-06 Requires Windows Server 2003's DS Tools
💾 GetIP.cmd 3.00 Show PC's IP address (both Windows NT/2000/XP and OS/2 Warp/eCS) NT OS2 2002-02-09  
💾 GetIP98.bat 1.00 Show PC's IP address (Windows 98) 98 2001-02-16  
💾 GetLastDrive.bat 1.00 Return the last ("highest") drive letter used on the local computer W7 2010-09-06 Requires REG 6.1. 
💾 GetLastDriveXP.bat 1.00 Return the last ("highest") drive letter used on the local computer XP 2010-09-16 Requires REG 3.0. 
💾 GetLocation.bat 1.00 Open OpenStreetMap on the GPS coordinates of the specified photograph W10 2024-08-24 Requires Phil Harvey's ExifTool
💾 GetMacXP.bat 1.00 Show MAC address of any computer in the workgroup or domain NT 2006-09-06  
💾 GetPorts.bat 2.12 Show I/O addresses for serial and parallel ports All 1999-10-16 Also available as Perl script.
💾 GetPrn.bat 1.01 Display default printer for current user and list all printers for local system. NT 2001-03-08 Requires REG 1.0 or 2.0.
Works on NetBIOS/LAN Manager networks.
💾 GetPrn2.bat 1.00 Display default printer for current user and list all printers for local system. NT 2001-03-08 Requires REG 1.0 or 2.0.
Works on "real" NT networks.
💾 GetRAM.bat 1.10 Show the amount of RAM in MB NT 2001-07-17 Use Memory.bat if more speed is required.
💾 GetRAM.bat 2.00 Show the amount of RAM in MB W2K 2002-05-05 Use Memory.bat if more speed is required.
💾 GetRes.bat 1.00 Show display resolution and refresh rate NT 2001-09-09 Requires REG 1.0 or 2.0.
Also available as OS/2 Rexx script.
💾 GetRes.bat 2.00 Show display resolution and refresh rate NT4 2001-09-09 Also available as OS/2 Rexx script.
💾 GetRes.bat 3.00 Show display resolution and refresh rate NT 2002-11-04 Also available as OS/2 Rexx script.
💾 GetRes.bat 4.00 Show display resolution and refresh rate XP 2007-05-22 Also available as OS/2 Rexx script.
💾 GetUninstall.bat 2.10 Find the uninstall command(s) for the specified program WV 2015-11-21 Also available as VBScript script.
📦 GetUserDetails.bat 1.00 List details of the specified user account W2K 2006-09-13 Written by Florian Dörr.
💾 GetVideo.bat 1.01 Display the video card(s) model(s) and memory size(s) W7 2018-03-11 Works in "regular" Windows as well as WinPE environments.
Thanks to James Hudgins for correcting a bug in the first version.
💾 GifList.bat   Display all GIF files in your web browser All 1999-03-21 Consists of 3 interdependent batch files.
💾 GrMember.bat   Displays the members of the specified group(s). W2K 2005-04-03 Requires Windows Server 2003's DS Tools
📦 Groundhog.bat 1.00 Temporarily changes the date and then runs the specified command NT 2004-09-29 Written by Bruno Mota.
💾 GUIEnvironment.bat   Edit NT's environment values in GUI mode NT4 2001-05-12 Incorrect changes to NT's environment may cause serious system software malfunctions. Use entirely at your own risk!.
💾 HardDisk.bat 1.00 List harddisks, their interfaces and revision numbers for any computer on the network NT 2005-01-15 Requires DEVCON.
The script will prompt you to download DEVCON if it isn't found.
💾 Hardware.bat 1.00 Uses BATCHMAN to display a basic hardware summary DOS3 2002-12-02 Requires BATCHMAN.
More advanced versions available as XP batch file, HTA, KiXtart and VBScript scripts for Windows.
💾 Hardware.bat 3.10 Uses WMIC to display a basic hardware summary XP 2006-10-03 Requires WMIC.
Also available as MS-DOS batch file, HTA, KiXtart and VBScript scripts for Windows.
💾 HasMouse.bat 1.01 Check the actual number of mice available at this very moment W7 2024-03-11 Requires WMIC.
Requires elevated privileges
💾 Hex2Bin.bat   Convert hexadecimal numbers to binary NT 2010-07-15 Requires PHP
💾 Hex2Dec.bat   Convert hexadecimal numbers to decimal NT 2010-07-15 Requires PHP
💾 History.bat 1.00 Create or delete "Internet History" folder on your desktop 95 98 NT (IE 4/5) 2001-06-26 Based on an article by Nick Francesco.
💾 HostName.bat 1.00 Display host name for specified IP address NT OS2 2000-06-04 Version 1.00 shows the host name for a specified IP address.
Available as Rexx script for OS/2 as well.
💾 HostName.bat 2.00 Display host name for specified IP address NT4 2001-04-21 Version 2.00 not only shows the host name for a specified IP address, but the Mac address, NetBIOS name and domain or workgroup too.
💾 HostName.cmd 3.01 Display host name and IPv4, IPv6 and MAC addresses for the specified computer W7 2023-03-13 Version 3 accepts host names as well as IP addresses for input.
💾 Hotfixes.bat 2.00 Display a list of hotfixes installed locally NT 2002-11-24 Also available as KiXtart and VBScript scripts.
💾 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
💾 JPGs2PDF.bat 1.00 Use GhostScript to convert/merge JPG image(s) into a single PDF file W10 2024-08-28 Requires GhostScript
💾 JTHelp.bat 1.01 Create a HTML help file for Microsoft's JT command NT 2005-03-05 This batch file generates an HTML file and several associated text files. Start this batch file in an empty directory to keep track of all files.
JT.EXE is part of the Microsoft Windows 2000 Resource Kit and can be downloaded here.
💾 KeyLocks.bat 1.20 Return the status of the CapsLock, NumLock and ScrollLock keys NT 2007-12-17 Requires DEBUG.
Also available in Perl as KeyLocks.pl and in VBScript as CapsLock.vbs (CapsLock status only, and uses MS Word or WordPerfect instead of DEBUG).
💾 KillDisc.bat 2.10 Logoff disconnected Windows NT 4 Terminal Server ICA clients TS 2001-02-17  
💾 KillNtPr.bat 2.11 Kill an NT process, specified by its program name and extension (no path) NT 2001-03-14 Requires TLIST and KILL (NT4), PSLIST and PSKILL (NT4/W2K) or TASKLIST and TASKKILL (XP).
Also available as OS/2 Rexx script.
💾 KixAssoc.bat 2.00 Associates the .KIX extension with the KIX32 executable.
After executing this batch file once, you can call any *.KIX directly, without the need to "prefix" it with KIX32.EXE.
NT 2000-09-19 With SET PATHEXT=.KIX;%PATHEXT% (better yet: set it as a global variable in Control Panel, System applet) you won't need to type the .KIX extension to run .KIX scripts.
Adapt the (hard coded) path for KIX32.EXE to your own situation.
💾 KixMacro.kix 2.00 This KiXtart script makes the KiXtart macro commands available for batch files. Usage:

  KIX32 KIXMACRO.KIX $KIXMACRO=@macro [$VarName=env_var]
  CALL %TEMP%.\_KIXMACRO.BAT


Where @macro can be any valid KiXtart macro. The result is stored in the environment variable env_var
All 2001-06-23 Requires KiXtart
💾 LastBoot.bat 1.01 Display the last boot time of any WMI enabled computer XP 2010-02-10 Requires WMIC
💾 LastFile.bat 1.00 Reopen most recently used file from the Documents folder NT 2001-10-20  
💾 LastWUpd.bat 1.00 Return date and time of the last successful Windows Update XP 2009-09-11  
💾 LDIF2vCard.bat   Very basic LDIF to vCard converter XP 2013-11-28 Fails on unescaped ampersands.
May require some manual editing after conversion: e-mail addresses and phone numbers should always be preceded with either WORK: or HOME: or PREF: and sometimes these prefixes are swapped or left out.
💾 LeapYear.bat 2.00 Check if the current year is a leap year or not DOS 2002-12-16 Requires BATCHMAN.
Also available as JScript, KiXtart, Perl, PowerShell, Rexx and VBScript scripts.
💾 LeapYear.bat 1.01 Check if the specified year is a leap year or not NT 2002-10-05 Uses code to extract current year by Simon Sheppard.
Also available as JScript, KiXtart, Perl, PowerShell, Rexx and VBScript scripts.
💾 lens.bat 1.00 Use PHP to read the lens type from an image's EXIF data W10 2024-05-27 Requires PHP
💾 ListADComputers.bat 1.00 List computer objects in Active Directory XP 2013-10-20 Requires DSQUERY
💾 ListDHCP.bat 1.00 List the DHCP server for every network adapter XP 2010-07-25 Uses NETSH.
💾 ListHDDs.bat 1.11 List all physical harddisk models on a remote PC W2K 2009-12-02 Requires WMIC or DEVCON.
If neither WMIC nor DEVCON is available, you will be prompted to open the DEVCON download page.
💾 ListFilesBetween.bat 1.02 List matching files with timestamps between 2 specified dates NT 2011-11-12  
💾 ListICA.bat 1.00 List all IP addresses associated with Citrix' ICA round robin alias in DNS NT 2004-10-25  
💾 ListPRN.cmd 2.01 List specified (NT) or all (NT and OS/2) network printers' UNC path NT OS2 2000-06-05 Bonus C# source and compiled EXE included with ZIPped sources.
💾 ListProgs.bat 1.11 List all programs registered in Windows' Uninstall keys NT 2015-01-15 Also available as ListProgs.exe (much faster).
💾 ListSDKs.bat 1.00 List installed Microsoft SDKs, or display the version number for a specified SDK XP 2008-05-30 Requires REG 3.0. 
💾 ListVerbs.bat 1.00 List all verbs for the specified file extension W7 2022-02-17  
💾 ListWMIClasses.bat 1.01 List (a tiny fraction of the) available WMI classes in the "root\CIMV2" namespace XP 2010-09-29 Requires WMIC.
Also available in VBScript.
💾 LoCase.bat 3.00 Convert filenames to all lowercase NT OS2 2001-11-20 New LoCase.bat uses a trick by Niels Stout; it is much faster, but can be used in the current directory only; the old version is still available in case you need to rename files in other directories.
Also available as KiXtart and OS/2 Rexx scripts.
💾 LockProg   How to lock single user programs when in use on a network All 1999-07-13  
💾 LogBatch.bat 1.00 Log every individual command line of a batch file W2K 2007-11-07  
💾 LogHist.bat 1.11 Read URLs from IE history and write them to a file named %UserName%.hst NT 2003-10-20  
💾 LstOffVw.bat 1.00 List all Office Viewers and their version numbers W2K 2008-05-17 Also available in VBScript.
This batch file uses FILEVER.EXE and is about 10 times as fast as the WMI/VBScript version.
💾 MacAddress   Find the MacAddress of your network adapter 95 98 NT OS2 2002-12-07  
💾 MakeTemp.bat 2.10 Create a temporary file with a more or less random unique name NT 2011-11-17  
💾 Manage.bat 1.00 Open a remote Computer Management Console W2K 2005-09-26  
💾 Max.bat 1.00 Returns the highest from a list of values on the command line NT 2011-04-10  
💾 MD5.bat   Calculate the MD5 checksum for the specified string NT 2010-07-15 Requires PHP
💾 MdmCmds.bat 1.00 Display the available configuration commands for your modem(s) XP 2006-10-12 Requires WMIC
💾 MemberOf.bat 2.01 (Recursively) list all groups of which the specified user is a member. W2K 2011-07-19 Requires Windows Server 2003's DS Tools
💾 Memory.bat 1.01 Show the amount of RAM in MB NT 2001-04-29 Requires PSTAT.
Use GetRAM.bat instead if you do not have the NT Resource Kit available.
💾 MergePDFs.bat 3.01 Merge multiple PDF files into a single new one NT 2024-09-01 Requires GhostScript
💾 MidiTitl.bat 1.01 Display titles of specified MIDI files NT 2004-01-20 Requires STRINGS.
Also available as Perl script.
💾 MimeType.bat 1.00 Find the registered mime type for a specified file extension or vice versa W10 2024-08-10  
💾 Min.bat 1.00 Returns the lowest from a list of values on the command line NT 2011-04-10  
💾 Modems.bat 1.01 List all modems installed on the computer W2K 2003-12-23 Requires DEVCON
💾 Modified   Check if a file was created or modified today All 1999-09-30 Separate version for NT and OS/2 (*.CMD instead of *.BAT).
📦 MovePictures.bat 1.00 Move photographs from a camera to a folder with the date in its name NT 2005-01-30 Written by Gordon Schumacher.
💾 MSIInfo.bat 1.00 Find and run the latest installed version of MsiInfo.exe NT 2010-10-11 Requires the Windows SDK
💾 MTUTest.bat 1.00 Check if the current MTU setting is optimal W7 2014-08-01 Based on a tutorial by Harrison Fleetwood.
📦 Multiply.cmd 1.2 Multiply really big numbers (beyond Windows' 32-bit integer limits) NT 2011-05-14 Written by Brian Williams.
📦 MVol-E.bat 2.1 Remount any PHYSICAL volume from the letter E: to the first available letter R:, T:, V: or X: XP 2006-01-01 Requires MOUNTVOL.
Written by Jos van der Esch.
💾 MyAccess.bat 1.10 Check the current user's permissions for the specified resource W2K 2004-01-18 Requires MYTOKEN
💾 MyPRN.bat 1.00 List all printers and printer drivers installed on the local PC NT 2002-01-12 Bonus C# source and compiled EXE included with ZIPped sources.
💾 MyPRN2K.bat 1.00 List all printers and their properties, and save the results in a tab delimited file W2K 2003-12-16  
💾 NETFxVer.bat 3.00 List the installed .NET Framework versions W2K 2010-08-27  
💾 NetSetFR.bat   Store the Computer name, User name and Workgroup in environment variables 98 2000-11-01 For French Windows 9x versions.
💾 NetSetNL.bat   Store the Computer name, User name and Workgroup in environment variables 98 2000-11-01 For Dutch Windows 9x versions.
💾 NetSetUS.bat   Store the Computer name, User name and Workgroup in environment variables 98 2000-11-01 For English Windows 9x versions.
💾 NETSHHelp.bat 1.00 Display help for NETSH and all its subcontexts W7 2014-01-24 For English Windows 7 versions.
📦 NetStatLive.bat 1.00 Netstat Live alternative NT 2004-01-01 Written by Shannon Zielinski.
💾 NetWho.bat 2.10 NET WHO (as in OS/2) "ported" to NT: show every requester plus who is logged on NT 2002-06-20 NetWho.bat assumes requester names are in PC1234 format (to ignore servers).
💾 NetWho2.bat 2.10 NET WHO (as in OS/2) "ported" to NT: show every requester plus who is logged on NT 2002-06-20 NetWho2.bat may also show servers.
💾 NICSpeed.bat 1.00 Display all active Ethernet network adapters' link speed XP 2010-09-16 Requires WMIC.
Also available in KiXtart and VBScript.
💾 NoAutoRun.bat 1.00 Completely disable Windows' AutoRun feature XP 2007-11-11 Based on an article by Scott Dunn.
💾 NoBrowse.bat 1.00 Prevent the local workstation from becoming a master browser NT 2002-03-14  
💾 NoNagXP.bat 1.00 Disable nag screens for .NET Passport and Windows XP Pro Tour XP 2005-06-28 Idea: Greg Schultz's xpnagdisabler VBScripts on techrepublic.com.com.
💾 NoStartSkype.bat 1.01 Disable Skype auto start, even after a Skype update W7 2016-04-04  
💾 NoTrkIco.bat 1.00 Disable "smart shortcut tracking" on the local PC W2K 2002-04-16 Based on a tip by Sander Jousma.
💾 Now.bat 1.00 Display the current time in HHmmss format with any delimiter you want NT 2009-01-19 Requires DEBUG
💾 NoWinUpd.bat 1.00 Disable Windows' Update feature 95 NT 2002-04-10 Also available as KiXtart script.
💾 NTRole.bat 1.10 Displays the role (server or workstation) of the PC where this batch file is run NT 2001-11-18  
💾 Num2Bin.bat 1.00 Convert the specified number to binary NT 2011-03-01  
💾 Num2Hex.bat 1.00 Convert the specified number to binary NT 2011-03-13  
💾 Num2Oct.bat 1.01 Convert the specified number to octal NT 2011-03-13  
💾 NumLock.bat 1.00 Display or change default NumLock status for current user NT 2003-03-27  
💾 Obscure.bat 1.01 Obscure URLs by converting host names to hexadecimal IP addresses and by adding a fake host name as logon name NT 2024-04-09 Also available as Perl and Rexx scripts.
Batch version is limited to IP addresses 0.0.0.0 through 127.255.255.255; for higher IP addresses the batch file will prompt you to manually add 2 decimal numbers.
💾 OpenAs.bat 1.02 Open Windows' "Open As" dialog for a specified file NT 2024-01-02  
💾 OUMember.bat 1.03 Displays the members of the specified OU(s). W2K 2004-11-03 Requires Windows Server 2003's DS Tools
💾 Own.bat   Recursively take ownership of specified directory tree W2K 2014-10-01 Requires TAKEOWN.
The previous incarnation of this script was published 2002-09-30. I would not recommend using scripts that old anymore. However, a security vulnerability disclosure on http://www.thesecurityfactory.be/command-injection-windows.html used this script as an example of vulnerable code, so I updated the code, leaving the vulnerable code in comments for learning purposes.
💾 Owner.bat 1.00 Display the owner of specified file(s) W2K 2002-02-03  
💾 PadDemo.bat   Demo batch file for LeftPad and RightPad subroutines, both written to format strings to be displayed in columns on screen NT 2007-03-09 Also available in VBScript.
💾 Pages2Txt.bat 1.00 Use OCR to extract text from a *.pages document. W10 2024-06-07 Requires 7-zip and Tesseract OCR
💾 PausePrinting.bat 1.00 Pause printing on the specified printer XP 2010-07-11 Requires WMIC.
Use ResumePrinting.bat to resume printing again.
Also available in VBScript.
💾 PCName.bat 1.00 Store computer name in environment variable. 95 2002-03-06 This batch file stores the computer name without leading backslashes, as opposed to the NETSETxx.BAT batch files.
💾 PDF2JPG.bat 1.00 Use GhostScript to convert a PDF file to JPG images. W10 2024-08-22 Requires GhostScript
💾 PDF2JPG2PDF.bat 1.00 Use GhostScript to convert a "text-based" PDF file to "image-based" PDF. W10 2024-08-21 Requires GhostScript
💾 PDF2Txt.bat 1.00 Use GhostScript to extract text from a PDF file. W10 2024-08-12 Requires GhostScript
💾 PDFPageCount.bat 1.01 Display the page count for the specified PDF file(s). NT 2011-10-11 Requires FINDSTR
💾 Pictures.bat 1.00 Display all GIF and JPG files in your web browser All 1999-03-21 Requires Picture2.bat 1.00 and Picture3.bat 1.00.
Set of 3 interdependent batch files for MS-DOS.
💾 Pict_NT.bat 2.00 Display all GIF, JPG and PNG files in your default web browser NT 2016-05-13 This NT version is one single batch file.
💾 PMChoice.bat 2.00 Replacement for the CHOICE command NT 2003-10-09 Requires PMChoice.kix and KiXtart
💾 PMSleep.bat 3.00 Wait for a specified number of seconds NT 2013-03-21 A "clone" of the NT4 Server Resource Kit's SLEEP command using NT's native PING command only.
💾 PMSlpW9x.bat 2.10 Wait for a specified number of seconds 95 2004-07-23 A "clone" of the NT4 Server Resource Kit's SLEEP command using NT's native PING command only.
💾 PMSoon.bat 1.01 Schedule at relative times instead of absolute times NT 2001-02-17 A "clone" of the NT4 Server Resource Kit's SOON command using NT's native NET TIME and AT commands only.
💾 PrintAny.bat 2.01 Print any known file type from batch files W7 2014-04-02 More details on my Print Files page.
Also available as Print.vbs and PrintAny.exe.
💾 PrintDoc.bat 1.00 Use Word to print Word documents from the command line W2K 2008-11-29 Requires CMCDDE and Microsoft Word.
More details on my Print Files page.
💾 PrintHTM.bat 1.11 Print HTML files from batch files (with printer dialog) NT 2002-03-31 More details on my Print Files page.
💾 PrintHTM.bat 2.00 Print HTML files from batch files (without user interaction, to any printer) NT 2002-02-09 Requires KiXtart.
More details on my Print Files page.
💾 Printing.bat 2.20 List printer status and number of printjobs, pause or resume printing, or flush all printjobs on the selected printer(s) XP 2010-09-14 Requires WMIC.
Also available in C# and VBScript.
💾 PrintPDF.bat 3.11 Print PDF files from batch files NT 2007-10-19 More details on my Print Files page.
Also available as KiXtart, Perl, Rexx and VBScript scripts.
💾 PrintPPT.bat 1.00 Open a print dialog for a specified PowerPoint file NT 2008-06-11 Requires PowerPoint 2003 or 2007 or PowerPoint Viewer
💾 PrnPDF8.bat 1.00 Print a PDF file to any printer XP 2008-06-14 Requires Foxit Reader 2 or Adobe Reader 8. 
💾 PrnPDF9.bat 1.00 Print a PDF file to any printer XP 2009-08-12 Requires Foxit Reader 3 or Adobe Reader 9
💾 ProdID.bat 1.00 Display Windows' Product ID and store it in an environment variable "ProductID" NT 2002-03-31 Also available as KiXtart and VBScript scripts.
📦 ProgressMeter.bat 1.00 Display a progress bar in the current CMD.EXE's title bar NT 2007-01-10 Written by Roy Holt.
💾 PwdNoExp.bat 1.00 Set "password never expires" for a local account XP 2008-03-12 Requires WMIC.
Also available in VBScript.
💾 Random.bat 1.00 Generate random numbers DOS 2000-07-07 Works only with comma as decimal delimiter; fixed in 2.00.
In OS/2 Rexx or KiXtart only one single line is needed to generate random numbers, Perl needs 2 lines.
💾 Random.bat 2.00 Generate random numbers DOS 2000-07-07 In OS/2 Rexx or KiXtart only one single line is needed to generate random numbers, Perl needs 2 lines.
💾 Random.bat 1.00 Generate random numbers NT 2003-08-08 Depends on US language settings.
In OS/2 Rexx or KiXtart only one single line is needed to generate random numbers, Perl needs 2 lines.
💾 Random.bat 2.00 Generate random numbers NT 2003-08-08 Language independent.
In OS/2 Rexx or KiXtart only one single line is needed to generate random numbers, Perl needs 2 lines.
💾 RC.bat 2.11 Display the errorlevel returned by the specified command and the time it took NT 2012-07-02  
💾 ReadINI.bat 1.30 Read a value from an INI file NT 2007-07-31 May fail on "special" characters like & | < > and parentheses.
In version 1.20 the speed of processing has been improved by Jeroen Verschuuren.
Version 1.30 contains several improvements by Van Woods, US Army Corps of Engineers, Seattle District.
READINI is also available as KiXtart, Perl, Rexx and and VBScript scripts.
💾 ReadLine.bat 1.00 Read the specified line(s) from standard input and store it in an environment variable W2K 2011-01-19 Skips empty lines.
💾 ReadReg.bat 2.10 Read a value from the registry NT 2004-10-25 Requires EGREP or FINDSTR.
May fail on "special" characters like & | < > and parentheses.
Uses FINDSTR if available, or EGREP otherwise.
Also available as KiXtart, Perl, Rexx and VBScript scripts.
💾 ReadXML.bat 1.10 Read a value from an XML file NT 2011-02-06 Requires XML Starlet
💾 Recycled.bat 1.00 Create or delete a shortcut to the "Recycle Bin" in your Start Menu NT 2001-09-22 The shortcut does not give you the same functionality as the original Recycle Bin, but it can be used to quickly check the properties of deleted files.
Tested in NT 4 only.
💾 RegDLL.bat 1.01 Add Explorer menu entries to register/unregister DLLs W2K 2004-01-05 Based on an article on The Code Project website.
💾 RemMacro 1.00 Use McAfee VirusScan to remove all macro's from MS-Office documents 95 NT 2002-03-15  
💾 RemoteSID.bat 2.11 Shows who is logged on to a remote computer, displaying both user ID and Security ID (SID). NT 2001-11-15 Requires GETSID and PSLOGGEDON
📦 Removables.bat 5.0c Display mounted removable devices W2K 2008-07-27 Written by Carlito S.
Does not require administrator privileges.
💾 RenewUSB 1.01 Remove all USB devices and then rescan for new ones W2K 2017-01-16 Requires DEVCON.
Use ResetDevices.bat instead on Windows 7 and later.
💾 RepeatEvery 1.02 Repeat a command forever, with a specified interval, until a key is pressed W7 2016-07-05  
💾 ResetDevices 1.01 Remove disconnected devices W7 2017-01-16 Requires DEVCON.
You will be prompted for download if DEVCON isn't found.
💾 Restart_Ethernet.cmd 1.01 Restart Ethernet network adapter W7 2020-09-02 Requires elevated privileges.
💾 RestartMouse.bat 1.00 Restart a mouse that suddenly hangs, when plugging in a new mouse doesn't help W7 2022-12-04 Requires DEVCON
💾 RestHome   Use NT's FOR /D parameter to restore a server's home directory shares and access rights NT 2000-10-17 Also available as Rexx scripts for OS/2 LAN Server; or use ForD as a FOR /D replacement in OS/2 batch files.
💾 ResumePrinting.bat 1.00 Resume printing on the specified printer XP 2010-07-11 Requires WMIC.
Use PausePrinting.bat to pause printing.
Also available in VBScript.
💾 Reverse.bat 2.00 Return a string in reverse order NT 2001-08-05 See Tom Lavedas' User-to-User article for a DOS version using CHOICE.
Rexx has a built-in REVERSE() function.
💾 RipCD.bat 1.01 Save audio CD tracks as MP3s W7 2016-10-06 Requires VLC Media Player.
Based on a batch file by elrobis, to which I added automatic detection of VLC path and CDROM drive letter.
💾 RmHidDev.bat 1.00 Remove all hidden (inactive) Plug&Play devices W2K 2006-11-10 Requires DEVCON.
Written to remove "ghost devices" from Ghost images.
You will be prompted for download if DEVCON isn't found.
Warning: May cripple your OS, use entirely at your own risk, and only after making a full backup.
💾 RmUserID.bat   Delete a user account and the associated data and share W2K 2004-10-23 Requires Windows Server 2003's DS Tools, RMTSHARE, TAKEOWN, TSCMD and OWN.BAT
💾 RoboMove.bat   Moves files in target folder to match source folder as closely as possible, to make following ROBOCOPY process more efficient W2K 2014-10-09 Best used together with ROBOCOPY.
Warning: beta version, not tested rigorously yet.
💾 RunBackupWithoutSleep.bat 1.20 Run a backup, defrag or any other long task without the computer going to sleep W7 2012-10-15  
💾 RxAssoc.bat 2.00 Associates the REX extension with Regina Rexx executable. After executing this batch file once, you can call any *.REX directly, without the need to precede it with REXX.EXE. NT 2000-02-11 With SET PATHEXT=.REX;%PATHEXT% (better yet: set it as a global variable in Control Panel, System) you won't need to type the .REX extension to run .REX scripts.
Adapt the (hard coded) path for REXX.EXE to your own situation.
Better still, use REGINA.EXE instead of REXX.EXE.
💾 RXDir.bat   Use Regular eXpressions in the DIR command NT 2004-10-16 Requires EGREP
💾 Scheduld.bat 1.00 List all scheduled task and their main properties W2K 2003-11-19 Requires STRINGS
💾 SCList.bat   List the properties of all shortcuts on an NT machine NT 1999-10-01 Requires SHORTCUT
💾 Screen.bat   Demo: different ways to display text NT 1999-11-03 Also available as OS/2 Rexx script.
💾 ScrnRes.bat 1.02 Change remote PC's screen resolution NT 2004-08-25 Requires PSEXEC and Resolution Changer
💾 ScrnSavr.bat   Install a Windows screensaver and open Control Panel's screensaver settings page 95 98 NT 1999-10-23  
💾 ScrSzDOS.bat 1.00 Save current screen size (lines and columns) in environment variables DOS 2002-03-17  
💾 ScrSzNT.bat 1.00 Save current screen size (lines and columns) in environment variables NT 2002-03-17  
💾 SCSI.bat 1.10 Enumerate disk drives (IDE and SCSI) NT 2006-09-11 Requires EGREP.
Also available in KiXtart and Rexx.
💾 SCSI.bat 2.10 Enumerate disk drives (IDE and SCSI) W2K 2006-09-11 Also available in KiXtart and Rexx.
💾 SecondChoice.bat 1.00 Present a list of choices, and wait for the user to either pick a choice by number or to press Enter for the default choice. XP 2016-03-03  
💾 SecLogin.bat 1.00 Make Windows XP's logon more secure by using the "classic" login dialog instead of the welcome screen, disabling the display of the last user name at logon, and requiring Ctrl+Alt+Del to logon. XP 2009-08-19 See the Related Stuff section for a note on "Force Ctrl+Alt+DEL" and "Don't display last user name" in Vista and Windows 7.
💾 SecStat.bat 2.20 Display a SecurityCenter status overview XP 2010-01-18 Requires Windows XP Professional SP2 or SP3.
Use WBEMTEST.EXE to find all properties for a specific AntiVirus or Firewall product.
Also available in KiXtart and VBScript.
💾 Servers.bat 2.02 Display size, free space and used space (both in MB and as a percentage of disk size) for every partition on every server. NT 2001-05-24 Requires SRVINFO.
Also available in Rexx and VBScript as FreeSpace.*.
💾 SetOwn.bat 1.00 Restore ownership and permissions for roaming (TS) profile directories. W2K3 2005-07-02 Requires CHOWN, TSCMD, XCACLS and NLTEST.
You will be prompted for download if any of the required (third party) tools is not available.
💾 SetWallp.bat 1.00 Make the specified file Windows' wallpaper W2K 2007-01-30 Use Wallpapr.bat to use a random bitmap as wallpaper.
💾 SHA1.bat   Calculate the SHA1 checksum for the specified string NT 2010-07-15 Requires PHP
💾 ShareMig.bat 1.00 Migrate all non-printer shares from one server to another. W2K 2005-11-02 Must be run on the server, fails on share names containing spaces, but is "universal" for both Windows 2000 and Windows Server 2003.
For printer migration, read the Printing section of my Unattended Installations page, for Scheduled Tasks migration, read the Scheduled Tasks section.
💾 ShareMg2.bat 2.00 Migrate all non-printer shares from one server to another. W2K 2005-11-02 Requires ShareMg2.vbs 2.00.
Requires manual modifications for Windows 2000, but it can be run from any computer in the domain and it won't fail on share names containing spaces.
For printer migration, read the Printing section of my Unattended Installations page, for Scheduled Tasks migration, read the Scheduled Tasks section.
💾 ShDsktop.bat 1.00 Restore the Show Desktop shortcut in the Quick Launch tray W2K 2003-06-10  
💾 Shortcut.bat 2.10 List the (UNC and fully qualified) path that shortcuts point to NT 2005-07-11 Use SCList.bat if you need all properties, not just the path (requires the NT Resource Kit).
💾 ShortExt.bat 1.00 Display or modify "extension truncation" registry setting NT 2002-03-02 Based on a tip from the Windows Registry Guide.
💾 ShowPRN.bat 1.00 Display all physical printers W2K 2004-01-17 Requires DEVCON.
Also available as VBScript script.
💾 ShowPRNT.bat 1.00 Display all physical printers in tab delimited format W2K 2004-01-17 Requires DEVCON.
Also available as VBScript script.
📦 Shuffle.bat 1.00 Shuffle the order of the lines in a text file NT 2011-03-14 Written by Jiri Hofreiter.
💾 SID2User.bat 1.00 Return the SID for the specified user ID XP 2010-07-26 Requires WMIC.
Also available in VBScript.
💾 SimpleSitemap.bat 1.10 Create a basic sitemap.org compliant sitemap W2K 2010-09-03 Much faster than Sitemap.bat, but limited to (all) PHP and HTM(L) files in a single folder.
💾 Sine.bat   Calculate the sine for the specified angle in radians NT 2010-07-15 Requires PHP
💾 SineDeg.bat   Calculate the sine for the specified angle in degrees NT 2010-07-15 Requires PHP
💾 Sitemap.bat 1.00 Create a basic sitemap.org compliant sitemap W2K 2009-02-17 Slower than SimpleSitemap.bat, but supports exclude list and multiple folders and filespecs.
📦 Snake.bat 1.00 ANSI demo for Windows 10 W10 2018-06-04 Written by Robert Van Etta
💾 SNDisk4.bat 1.00 Save a full computer inventory in XML format NT 2010-12-27 Requires IBM's EGatherer2 2.51
💾 SortDate.bat 5.01 Store "sorted" date (YYYYMMDD) in a variable, independent of Control Panel's "Regional Settings" All 2010-07-10 Take a look at DateTime for a "real DOS" version.
Much simpler in KiXtart, Perl, Rexx or VBScript.
💾 SortTime.bat 3.40 Store "sorted" time (HHmm) in a variable, independent of Control Panel's "Regional Settings" All 2010-07-10 Take a look at DateTime for a "real DOS" version.
Much simpler in KiXtart, Perl, Rexx or VBScript.
💾 Spider.bat   Display the validity of hyperlinks in a group of locally stored HTML files NT 2005-11-12 Requires WGET and CUT
💾 SrvSpace.bat 1.12 Display free space for every partition on every server. TAB delimited screen output for easy export of output. NT 2000-06-05 For Windows XP use DiskSpc.bat instead.
💾 StarDate.bat 1.00 Convert current date and time to stardate NT 2003-01-26 Based on an algorithm found on The Star Trek Gallery.
Also available as KiXtart, Perl, Rexx and VBScript scripts.
💾 StarDateXP.bat 2.00 Convert current date and time to stardate XP 2011-06-21 Requires WMIC.
Based on an algorithm found on The Star Trek Gallery.
Also available as KiXtart, Perl, Rexx and VBScript scripts.
💾 StartHow.bat 1.00 Display the actual command issued when a file is opened with the START command NT 2010-07-06 Some programs (e.g. UltraEdit) may override the shown file association.
💾 SwitchRes.bat 1.00 Toggle a Netbook's screen resolution from 1024x600 to 1024x768 vv. W7 2012-11-12 Requires SetRes and WMIC
💾 SysBkup.bat   Run a SystemState Backup W2K 2007-02-10 Requires NTBackup
💾 Tangent.bat   Calculate the tangent for the specified angle in radians NT 2010-07-15 Requires PHP
💾 TangentDeg.bat   Calculate the tangent for the specified angle in degrees NT 2010-07-15 Requires PHP
💾 TaskMgr.bat 1.00 Disable or reenable task manager NT 2002-03-15  
💾 Tee 2.11 Display standard input on screen and simultaneously redirect it to a file NT 2009-04-17 Explained (a little) on my TEE page.
Also available as Perl and Rexx scripts.
💾 TempNWD.bat 1.00 Temporarily map a network drive or use an existing mapping, and remove it afterwards (unless an existing mapping was used). NT 2001-04-29  
💾 TimeMark.bat   Set environment variables with the time the batch file was run, hours, minutes, seconds and hundredths of seconds NT 2009-11-15 The values refer to the time the batch file was run, they will not be updated to the current time.
💾 TimeShift.bat 1.01 Convert date/time from any timezone to local date/time NT 2011-04-11 Requires PHP
💾 Today.bat 1.10 Display the current date in DDMMYYYY or YYYYMMDD format, with any delimiter you want W2K 2009-01-20 Requires DEBUG
💾 TodayNow.bat 1.10 Display the current date and time in YYYYMMDDHHmmss format without any delimiters NT 2009-01-20 Requires DEBUG
💾 TrueName.bat 3.00 Display the true path of SUBSTed or mapped network drives or NTFS directory junctions NT 2017-04-13 This script is for CMD.EXE; TRUENAME is a native, internal command in COMMAND.COM.
Also available as OS/2 Rexx script.
📦 Twirly.bat 1.00 Display "rotating" characters XP W2K3 2009-05-28 Written by Brian Williams.
💾 UnBlock.bat 1.00 Modify downloaded files' Zone Identifier to mark them as safe XP 2007-06-17 Based on an article in Windows Scripting Solutions by Bill Stewart.
More info on Zone Identifiers in MS Knowledge Base articles 883260, 889815 and 105763.

Disclaimer: By manually marking a file safe you effectively disable the zone checking security mechanism for that file.
This is absolutely NOT recommended!!!
Use this batch file entirely at your own risk.

More detailed information can be found on my Alternate File Streams page.
💾 UniqueID.bat 2.00 Remove Intel LANDesk agent's ID and force creation of a new unique ID 95 NT 2001-07-13  
💾 UpCase.bat 2.00 Convert filenames to all uppercase NT OS2 2001-11-20 Also available as KiXtart and OS/2 Rexx scripts.
💾 UpTime.bat 1.00 Display the amount of time a system has been up and running. NT 2006-04-22 Requires SRVINFO.
Also available in VBScript.
More or less equivalent to my OS/2 Rexx script LastBoot.cmd which is available in VBScript too.
💾 User2SID.bat 1.00 Return DOMAIN\UserID for the specified SID XP 2010-07-26 Requires WMIC.
Also available in VBScript.
💾 UsrInput   Ask for user input and store it in an environment variable All 2001-04-25  
💾 VBSAssoc.bat 1.10 (Temporarily) change the .VBS file type association to CSCRIPT.EXE NT 2012-09-27 The batch file creates another batch file which can restore the original file type association.
Code optimized by David Keller.
💾 VideoROM.bat 1.00 Displays manufacturer information from video adapter ROM DOS 2003-03-02 Requires DEBUG.
Original idea by ComputerHope.
Also available in KiXtart, Perl, Rexx and VBScript.
💾 VideoROM.bat 2.00 Displays manufacturer information from video adapter ROM NT 2003-03-02 Requires DEBUG.
Much simpler than versions 3 and 4.
Also available in KiXtart, Perl, Rexx and VBScript.
💾 VideoROM.bat 3.00 Displays manufacturer information from video adapter ROM NT 2003-03-02 Requires DEBUG.
Works without temporary files.
Also available in KiXtart, Perl, Rexx and VBScript.
💾 VideoROM.bat 4.00 Displays manufacturer information from video adapter ROM NT 2003-03-02 Requires DEBUG.
The most complex version, but it gives the "cleanest" output.
Also available in KiXtart, Perl, Rexx and VBScript.
💾 Wait   Wait for a specified number of seconds All 2000-06-04 Requires SLEEP (NT) or RexxUtil's SysSleep function (OS/2). 
💾 Wallpapr.bat 1.00 Randomly change bitmaps for background screen W2K 2004-08-21 Read the comments in the script before using it.
Also available as OS/2 Rexx, Windows Rexx and VBScript scripts.
Use SetWallp.bat or Wallpaper.vbs if you want to specify the bitmap yourself.
💾 WANIP.bat 4.01 Display your WAN connection's IP address and host name NT 2018-12-13 Requires WGET.
Idea: Gregg Dotoli.
Also available in VBScript.
💾 WANIP.bat 1.00 Display your WAN connection's IP address NT 2010-09-28 Requires PHP.
Idea: Stan Littlefield.
💾 Week.bat   Display week number. DOS 2001-10-07 Requires WEEKOFYR.
Also available as KiXtart, Rexx, Perl or VBScript script.
💾 WeekNT.bat 1.01 Display week number. NT 2015-02-26 Also available as KiXtart, Rexx, Perl or VBScript script.
💾 WeekPHP.bat 1.01 Display the ISO week number. NT 2011-03-01 Requires PHP.
The most accurate version so far.
Also available as KiXtart, Rexx, Perl or VBScript script.
💾 WeekXP.bat 1.02 Display the ISO week number. XP 2011-02-14 Requires WMIC.
More accurate than the NT version, but still not flawless.
Also available as KiXtart, Rexx, Perl or VBScript script.
💾 Which.bat 1.00 A Unix-like WHICH utility DOS 1999-05-30 Available for NT and OS/2 (Rexx) and as KiXtart and Perl scripts.
💾 Which.bat 5.20 A Unix-like WHICH utility NT 2012-06-11 Co-author: Yakov Azulay
Available for DOS and OS/2 (Rexx) and as KiXtart and Perl scripts.
💾 Which.bat 6.11 A Unix-like WHICH utility XP 2014-10-01 Co-author: David Riemens
Available for DOS and OS/2 (Rexx) and as KiXtart and Perl scripts.
💾 WhoAmI.bat   Show info on workstation and current user NT 2000-06-12 Also available for OS/2 as WhoAmI.cmd.
💾 WhoHasIt.bat 1.00 Show info on remote workstation and current user W2K 2004-10-21 Requires Windows Server 2003's DS Tools
💾 WhoIs.bat 2.00 Display WHOIS database entry for the specified domain. All 2002-10-12 Also available as VBScript script.
💾 WhoIsIt.bat 1.00 Show specified domain user's display name W2K 2004-10-21 Requires Windows Server 2003's DS Tools
💾   WhoLocked.bat 1.00 Check which program keeps a file or folder locked and optionaly unlock it W10 2024-10-09 Requires Mark Russinovich's HANDLE
💾 WhoRU.bat 3.11 Remote WhoAmI (Who Are You) NT 2000-10-15 Requires GETMAC, GETSID, SRVINFO and WINSDMP
💾 Win3264.bat 1.00 Check if Windows is a 32 or 64-bits version NT 2009-12-27  
💾 WinSAT.bat 1.00 Return Windows System Assessment Tools's (WinSAT) scores for the specified computer XP 2013-11-20 Requires WMIC
💾 WinUpd.bat 1.00 Reenable Windows' Update feature 95 NT 2002-04-10 Also available as KiXtart script.
📦 WinVer.bat 1.00 Display Windows version NT 2009-10-12 Written by Denis St-Pierre.
💾 WinVer2.bat 1.00 Display Windows version and optionally check if it meets the specified minimum required NT 2011-01-05  
💾 WinVerCL.bat 1.00 Console version of Windows' native WINVER command NT 2022-04-21  
💾 WMIAlias.bat 1.01 Return the WMI class name for the specified WMIC alias, or list them all XP 2023-11-17 Requires WMIC
💾 WUTest.bat   Checks time of last Windows Update install against time of last download, and reports a failure if the last download was later XP 2009-09-14  
💾 XML2XPath.bat 1.00 Display the contents of an XML file as a list of XPath expressions W2K 2010-10-05 Requires Saxon XSLT processor and XML2XPath.xsl.
Based on an article by Paul Gallagher.
💾 XPath.bat 1.00 Use PHP to display the results of an XPath expression against an XML file NT 2022-11-04 Requires PHP
💾 Yesterday.bat 3.12 Display yesterday's, today's and tomorrow's dates in two formats NT 2024-04-09 Julian date math based on Fliegel-Van Flandern algorithm from the Astronomical Almanac, provided by Doctor Fenton on the Math Forum, and converted to batch code by Ron Bakowski.
Also available in JScript, KiXtart, Perl, Rexx and VBScript.
💾 Youless.bat 1.00 Read data from a Youless LS120 energy monitor device NT 2023-03-25 Requires wget
💾 YoulessBar.bat 1.00 Read data from a Youless LS120 and show result in a progress bar NT 2023-03-30 Requires wget and ProgressBar

 

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.1171 seconds