Batch Files: Examples (P)

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 PadDemo.bat   Demo batch file for LeftPad and RightPad subroutines, both written to format strings to be displayed in colums on screen NT 2007-03-09 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 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
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 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.
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 PDFPageCount.bat 1.01 Display the page count for the specified PDF file(s). NT 2011-10-11 Requires FINDSTR
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 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.
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 Pict_NT.bat 1.03 Display all GIF, JPG and PNG files in your default web browser NT 2010-09-19 This NT version is one single batch file
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 PMChoice.bat 2.00 Replacement for the CHOICE command NT 2003-10-09 Requires PMChoice.kix and KiXtart
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 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.
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 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.
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 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.
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 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
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 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.
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 PrintHTM.bat 1.11 Print HTML files from batch files (with printer dialog) NT 2002-03-31 More details on my Print Files page.
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 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.
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 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.
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 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.
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 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
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 PrnPDF8.bat 1.00 Print a PDF file to any printer XP 2008-06-14 Requires Foxit Reader 2 or Adobe Reader 8. 
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 PrnPDF9.bat 1.00 Print a PDF file to any printer XP 2009-08-12 Requires Foxit Reader 3 or Adobe Reader 9
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 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.
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 ProgressMeter.bat 1.00 Display a progress bar in the current CMD.EXE's title bar NT 2007-01-10 Written by Roy Holt.
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 PwdNoExp.bat 1.00 Set "password never expires" for a local account XP 2008-03-12 Requires WMIC.
Also available in VBScript.

 

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