Batch Files: Examples (S)

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 SAVVer.bat 1.00 Display any computer's Symantec AntiVirus program and virus definitions versions W2K 2008-12-23 Requires FILEVER
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 Scheduld.bat 1.00 List all scheduled task and their main properties W2K 2003-11-19 Requires STRINGS
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 SCList.bat   List the properties of all shortcuts on an NT machine NT 1999-10-01 Requires SHORTCUT
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 Screen.bat   Demo: different ways to display text NT 1999-11-03 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 ScrnRes.bat 1.02 Change remote PC's screen resolution NT 2004-08-25 Requires PSEXEC and Resolution Changer
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 ScrnSavr.bat   Install a Windows screensaver and open Control Panel's screensaver settings page 95 98 NT 1999-10-23  
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 ScrSzDOS.bat 1.00 Save current screen size (lines and columns) in environment variables DOS 2002-03-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 ScrSzNT.bat 1.00 Save current screen size (lines and columns) in environment variables NT 2002-03-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 SCSI.bat 1.10 Enumerate disk drives (IDE and SCSI) NT 2006-09-11 Requires EGREP.
Also available in KiXtart and Rexx.
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 SCSI.bat 2.10 Enumerate disk drives (IDE and SCSI) W2K 2006-09-11 Also available in KiXtart and Rexx.
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 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.
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 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.
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 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.*
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 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.
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 SetWallp.bat 1.00 Make the specified file Windows' wallpaper W2K 2007-01-30 Use Wallpapr.bat to use a random bitmap as wallpaper.
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 SHA1.bat   Calculate the SHA1 checksum for the specified string 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 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.
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 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.
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 ShDsktop.bat 1.00 Restore the Show Desktop shortcut in the Quick Launch tray W2K 2003-06-10  
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 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)
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 ShortExt.bat 1.00 Display or modify "extension truncation" registry setting NT 2002-03-02 Based on a tip from the Windows Registry Guide
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 ShowPRN.bat 1.00 Display all physical printers W2K 2004-01-17 Requires DEVCON.
Also available as VBScript 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 ShowPRNT.bat 1.00 Display all physical printers in tab delimited format W2K 2004-01-17 Requires DEVCON.
Also available as VBScript 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 Shuffle.bat 1.00 Shuffle the order of the lines in a text file NT 2011-03-14 Written by Jiri Hofreiter.
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 SID2User.bat 1.00 Return the SID for the specified user ID XP 2010-07-26 Requires WMIC.
Also available in VBScript.
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 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.
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 Sine.bat   Calculate the sine 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 SineDeg.bat   Calculate the sine 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 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.
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 SNDisk4.bat 1.00 Save a full computer inventory in XML format NT 2010-12-27 Requires IBM's EGatherer2 2.51
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 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.
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 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.
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 Spider.bat 0.22 Display the validity of hyperlinks in a group of locally stored HTML files NT 2005-11-12 Requires WGET and CUT
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 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.
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 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.
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 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.
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 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
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 SwitchRes.bat 1.00 Toggle a Netbook's screen resolution from 1024x600 to 1024x768 vv. W7 2012-11-12 Requires SetRes and 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 SysBkup.bat   Run a SystemState Backup W2K 2007-02-10 Requires NTBackup

 

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