Click the floppy disk icons to download the ZIPped sources
| Batch file examples | |||||
|---|---|---|---|---|---|
| Name | Description | OS (1) | Last modified (DD/MM/YYYY) |
Remarks | |
| Scheduld.bat | List all scheduled task and their main properties | W2K | 19/11/2003 | Requires SysInternals.com' STRINGS.EXE | |
| SCList.bat | List the properties of all shortcuts on an NT machine | NT+RK | 01/10/1999 | Use Shortcut.bat if you do not own a copy of the NT Resource Kit or if you need both UNC path and fully qualified path | |
| Screen.bat | Demo: different ways to display text | NT | 03/11/1999 | Also available as OS/2 Rexx script | |
| ScrnRes.bat | Change remote PC's screen resolution | NT | 25/08/2004 | Requires PSEXEC from SysInternals' PSTools and 12noon's Resolution Changer | |
| ScrnSavr.bat | Install a Windows screensaver and open Control Panel's screensaver settings page | 95 98 NT | 23/10/1999 | ||
| ScrSzDOS.bat | Save current screen size (lines and columns) in environment variables | DOS | 17/03/2002 | ||
| ScrSzNT.bat | NT | 17/03/2002 | |||
| SCSI.bat | Enumerate disk drives (IDE and SCSI) | W2K | 11/09/2006 | Version 1 used
EGREP,
as of version 2.01 Windows 2000's internal
FOR command is used instead. Also available in KiXtart and Rexx. |
|
| Servers.bat | Display size, free space and used space (both in MB and as a percentage of disk size) for every partition on every server. | NT+RK | 24/05/2001 | Also available in Rexx and VBScript as FreeSpace.* | |
| SetOwn.bat | Restore ownership and permissions for roaming (TS) profile directories. | W2K3 | 02/07/2005 | Requires several (third party) tools, you will be prompted for downloads if these tools are not available. | |
| SetWallp.bat | Make the specified file Windows' wallpaper | W2K | 30/01/2007 | Use Wallpapr.bat to use a random bitmap as wallpaper. | |
| SFN.bat | Display the Short File Name | NT4 | 10/11/2003 | Inspired by a tip from Denis Rouleau. Based on the assumption that time is displayed in 24 hour format; increase "tokens" by 1 on systems with AM/PM time format. This batch file is obsolete by now; in Windows 2000 SP4 and later use %%~sA or
%~s1
instead. |
|
| ShareMig.bat 1.00 ShareMg2.bat 2.00 ShareMg2.vbs 2.00 |
Migrate all non-printer shares from one server to another. | W2K | 02/11/2005 | Version 1.00 needs to be run on the server, and fails on share names
containing spaces, but it is "universal" for both Windows 2000 and
Windows Server 2003. Version 2.00 requires both the batch and the VBScript file, and needs 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, use Microsoft's PrintMig; for Scheduled Tasks migration, copy the scheduled tasks -- %windir%\Tasks\*.job -- to the new server, and use JT.EXE to re-set the "Run as:" property for each migrated task. |
|
| ShDsktop.bat | Restore the Show Desktop shortcut in the Quick Launch tray | W2K | 10/06/2003 | ||
| Shortcut.bat | List the (UNC and fully qualified) path that shortcuts point to | NT | 11/07/2005 | Use SCList.bat if you need all properties, not just the path (requires the NT Resource Kit) | |
| ShortExt.bat | Display or modify "extension truncation" registry setting | NT | 02/03/2002 | Based on a tip from the Windows Registry Guide | |
| ShowPRN.bat | Display all physical printers | W2K | 17/01/2004 | Also available as
VBScript
script. This batch file requires Microsoft's DEVCON utility. |
|
| ShowPRNT.bat | Display all physical printers in tab delimited format | W2K | 17/01/2004 | Also available as
VBScript
script. This batch file requires Microsoft's DEVCON utility. |
|
| SNDisk.bat | Display harddisk characteristics gathered by IBM's E-Gatherer tool | W2K | 05/03/2005 | May work in XP and Server 2003 too, tested only in 2000. May generate an error message on non-IBM systems, but will still show the desired results. More info on EGatherer's undocumented switches is available here. This batch file depends on E-gatherer's backwards compatibility with older versions, which is entirely up to IBM. |
|
| SortDate.bat SortTime.bat |
Store sorted date and time in variables, independent of Control Panel's "Regional Settings" | All | 04/10/2006 | Take a look at DateTime for a
"real DOS" version. Much simpler in Kix, Perl, Rexx or VBScript. |
|
| Spider.bat | Display the validity of hyperlinks in a group of locally stored HTML files | NT | 12/11/2005 | Quick-and-dirty alpha version. Requires WGET.EXE and CUT.EXE. | |
| SrvSpace.bat | Display free space for every partition on every server. TAB delimited screen output for easy export of output. | NT | 05/06/2000 | For Windows XP use DiskSpc.bat instead. | |
| StarDate.bat | Convert current date and time to stardate | NT | 26/01/2003 | Based on an algorithm found on
The
StarTrek Gallery. Also available as KiXtart, Perl, Rexx and VBScript scripts |
|
| SysBkup.bat | Run a SystemState Backup | W2K | 10/02/2007 | See Microsoft's NTBackup page for available command line switches | |
| Notes: | (1) | Operating System version these batch files were meant 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 | ||
| Kix | Windows (most functions also in plain DOS) with KiXtart | ||
| NT4 | Windows NT 4 (Windows NT 4 Terminal Server Edition too) | ||
| NT | Windows NT (Windows 2000 and Windows NT 4 Terminal Server Edition too) | ||
| NT+RK | Windows NT with Resource Kit (Windows NT 4 Terminal Server Edition with Resource Kit too) | ||
| W2K | Windows 2000, and probably XP and Server 2003 as well | ||
| W2K+RK | Windows 2000 with (Server) Resource Kit, and (probably) XP and Server 2003 as well | ||
| W2K3 | Windows Server 2003 | ||
| XP | Windows XP | ||
| OS2 | OS/2 Warp | ||
| TS | Windows NT 4 Terminal Server Edition, or Windows 2000 Server or Windows Server 2003 with Terminal Services | ||