Site hosted by Angelfire.com: Build your free website today!
Batfiles: The DOS batch file programming handbook & tutorial © 1997-2003 by Laurence Soucy
Batfiles: The DOS batch file programming handbook & tutorial ©

Batfiles: The DOS batch file programming handbook & tutorial  © 1997-2003 by Laurence Soucy
Batfiles Home

Site Info


 
 



 
 
Batfiles: The DOS batch file programming handbook & tutorial  © 1997-2003 by Laurence Soucy
Browser notehtmlAbout the batch codeRequirements
Main goals of siteHow to use the batch filesSites currently on-line
Official reference siteCopyrightWfW 3.1x & 32BFAEmail the author
DisclaimerWho uses this site?

Browser note
All pages on this site were designed using Netscape in Windows on a PC (not a Mac or a Unix/Linux box). If you use Windows, you should use Netscape so you can view the pages as intended. If you use IE, pages may be rendered incorrectly. Entire sections of pages may be displaced or disappear altogether, image links may have blue lines around them where there should be borders, some text may be difficult to read, and some text may not appear.

HTML
Pages that display the "Valid HTML 4.01" gif are validated. Unfortunately, the web site host may append javascript code to pages so they do not validate, even though the pages are valid as uploaded. The erroroneously appended code should not, however, cause any problems.

About the batch code
ALL batch code on this site was tested in MS-DOS 6.22 in English. If batch code was tested with a different DOS version, this will be indicated where the individual code is presented. Most code probably ought to work in DOS 7.x, but some will not. This is the fault of DOS 7.x and not the batch files. One of the more notable problems are spaces in directory and file names. It is clear that batch file writing is discouraged in DOS 7.x.

Requirements
The following requirements must be met in order to run the batch programs on this site.

1. The %TEMP% variable must be set to a valid, writeable directory with sufficient space for batch created temp files as well as those generated by DOS itself. A minimum of 2Mb free space is recommended for working with batch files, but keep in mind that some programs, and especially printing jobs may require significantly more space. Vital: The %temp% directory must not have an extension; c:\temp.dir.

2. The environment must be large enough to contain all variables used by the batch files. It is strongly recommended to permanently increase the environment via a shell statement in your config.sys file, such as:  SHELL=C:\COMMAND.COM/E:1536 /F /P   Note that the /F switch is important. The number of bytes you require will vary according to how many variables are normally set on startup. Use envsize.bat and add 1142 to your result. This should give you the environment size needed.

3. All the external DOS commands used by the batch files must be present.

4. The PATH must be correctly set so all needed DOS commands, including command.com, are available.

Main goals of site
The primary goal of this site is to empower individuals with the ability to gain control over their own computer and programs, so this is a place of learning and hopefully of inspiration. Where ideas and methods take precedence over quick solutions, though some of the latter may also be found here. The secondary goal is a comprehensive presentation of DOS batch file solutions for practical computing problems.

How to use the batch files
The easiest way to use the batch files presented on these pages is to highlight, copy and paste the desired batch file, correcting any wrapped lines, and save it as the batch file in a directory which is in your path. Note that due to the HTML rendering, some characters may need to be added or changed afterwards.

Sites currently on-line (subject to change without notice!).

DK host:  http://users.telenor.dk/~dsl645578/batfiles.htm
US host:  https://www.angelfire.com/blues/batfiles/  (mirror - under renovation)

To add a bookmark to this site now, right click on http://purl.oclc.org/net/batfiles/batfiles.htm and choose: Add Bookmark. This is a Persistent Uniform Resource Locator, also known as a PURL, and will never change. By using the PURL, you will avoid a dead link (if you link to this site from your own page) and you will always have access, even if this site is moved to a different server.

Official reference site
This site has been designated as a reference text for the following computer courses.

"CMPS 205 Software II: Advanced Setup, Customization and Automation"
Northwest Indian College - 2522 Kwina Road,
Bellingham, Washington, U.S.A. 98226

"CSNT114: Beginning Computers"
Lake Washington Technical College - 1605 132nd Avenue,
Nebraska - Kirkland, Washington, U.S.A. 98034-8506

"Network & Systems Technologies: CGS 1560 Introduction to DOS"
Florida Community College at Jacksonville - 501 W. State Street,
Jacksonville Florida, U.S.A. 32202

Copyright
Permission is hereby granted to make copies of this material for personal use only. This copyrighted material may not, in whole or in part, be redistributed or republished in any form, including electronically or as printed matter, without express written permission from the author.

Windows for Workgroups and 32-bit file access warning!
If you use WfW 3.1x, be aware that when 32-bit file access is enabled, the standard IF exist DIR\nul test is broken. Since this test is used extensively, results may be unpredictable (Also be aware that this test does not work on CD-ROM drives). In addition, the DIR and VOL commands do not output "Volume Serial Number". These breaks only exist when Windows is running and 32BFA is enabled.

Email the author
If you wish to use this material in your teaching, or if you have any comments or suggestions, please email the author, BatfilesHotPOP.com
Note: Due to the volume of requests and the increase of obligations, I am simply unable to continue answering batch questions via email as of 19 July 2001.

Disclaimer
Neither the author nor anyone connected to or affiliated with this site, may be held liable for loss or damage incurred by using code or following advice presented within these pages.

Who uses this site?
It is impossible to list all who use this site and this is but a small representation.

28th Bomb Wing at Ellsworth Airforce Base
3Com
@Home Network
 
Aarhus Technical College
Aarhus-Koebmandsskole
ABB
Abu Dhabi Company for Onshore Oil Operations IT Department
Access Communications
Access Indiana Information Network
AcTel Integrated Communications
Adams
ADP
AEI Music Network
Aether Software
Affiliated Computer
AG
AG-Chem Equipment
Agribuys
Agricultural Institute of Slovenia
Air Canada
Alaska Airlines
Alfa Laval
Alfred Berg Asset Management
Alltel
ALN Associates
AMD
American Agrisurance
American Digital Network
American Express
American General Financial Group
American Services/Information Technologies
American Society for Quality
American Telnet
Ameritech Advanced Data Services
AMF Bowling Worldwide
AMP
Andersen Consulting
Anheuser-Busch
AOL
Aon Jaucsh and Huebener Holdings
Apache
Apple
Applied Materials
ARINC
AT&T
AT&T Core Technologies Group
Atlantic Asset Management
Attachmate
Audi
Australian Network Information Center
Avantec Communication
 
Baird Kurtz and Dobson
Banc of America Securities
Banca Populare di Novara
Banco Nacional de Mexico
Bank of America
Bank of Scotland
Bank One
Bankers Trust
Barco
Baruch College
Bausch & Lomb
Bayer
BBN Planet
Beder Skole
Belgische Boerenbond
Bell Atlantic
Bell South
Bell-Northern Research
Bellahoej Skole
Berzsenyi College
Bethpage Mission
Bionetrix Systems
Birkeroed Gymnasium and HF
Blue Cross of California
Blue Star Communications
BMW
Boeing
BOGE
BOSCH
Bournemouth University
Bowman Gray School of Medicine
Brantford Hydro
Brazilian Research Network
British Broadcasting - Design and Equipment Department
British Telecommunications
British Telecommunications Digital Infrastructure
Broadcom
BT Fusion IT Services Platform
Bull
Burlington Northern Sante Fe Railway
Butler Manufacturing
 
C.U. Processing
Cable and Wireless
Cable and Wireless UK
Cadence Design Systems
CAIS Internet
California Department of Transportation
California Franchise Tax Board
California Institute of Technology
California State Polytechnic University
Canadian Standards Association
Canadian Wheat Board
Cantor Fitzgerald
Cap Gemini Innovation
Capella and McGrath
CapuNet LLC
Cargill
Carnegie Mellon
Carpenter Technology
Carr America
CDS Networks
Charles Schwab
Charles Stewart Mott Foundation
Charter Communications
Chase Manhattan
CheckFree
Chemical Abstracts Service
Chevron
Chicago Board of Trade
Choice One Communications
Chubb Group
Cigna
Cisco
CitiCorp
City of Ashland Oregon
City of Lund - Sweden
City of McAllen Texas
Clal Computers and Technology
Clark-Hurth Components
Clorox
CMGI Solutions
CNA Insurance
Coast International
Cogeco Cable solutions
College of West Angelica
Columbia Cablevision
Columbia Health Care
Columbia University
Comcast
Commerzbank
Commonwealth of Kentucky Department of Information Systems
Compaq
CompuCredit
CompUSA
Computer Associates
Computer Learning Center
Con Edison
Corecomm
Corel
Cork Regional Technical College
Cornell University
Corporate Executive
CoSine Communication
County of Allegheny
County of Sacremento
Cowi Consulting Engineers and Planners
CPFilms
Crain Communications
Credit Lyonnais Singapore
Credit Suisse
CTS
Cumberland Technologies
Cyberoptics
Cyberwave
Cycore
 
DaimlerChrysler
DanaData
Danaher Tool Group
Daniel Webster College State of Virginia Department
Danish Computing Centre for Research and Education
Dansk Data Eletronik
Dartmouth-Hitchcock
Data Conversion Laboratory
Data-Huset
David Taylor Research Center
Dayton Hudson
Defense Security Service
DELL
Delta Air Lines
Department of Energy Nevada Operations Office
Department of Veterans Affairs
Deutsche Financial Services
DHL
Digital Fusion
Dijon
Dixon Stores Group
Dow Jones
DSV Samson Transport
Duet Technologies
Duke University
 
East Coast Mapping
Eaton
Echosat Communications Group
Edict Systems
Edinburg Information Network
Edmonton Telephones
EDS Computer Consultants
Education Logistics
El Paso Energy
Elder Beerman Stores
Electricité de France
Eli Lilly and Company
Elisa Communications
Elsevier Science Publishers
EMC
Environment Canada
EPA
Ericsson
Ericsson Austria
Ernst & Young
Esse Health
Estee Lauder
EU Environment Agency
EUC Education Centre
Eurochem
Exodus Communications
Expeditors International
 
Fachhochschule für Technik und Wirtschaft Berlin
Fairfax County Public Schools Department of Management Information Services
Farm Bureau Financial Services
Farmacias Ahumada
FDB Data
Federal Express
Fiber Network Solutions Epoch Internet
Fibertel
Fidelity Investments
Finnish State Computer Centre
First Merit Trust
First National Bank
First Union National Bank
Fisher Scientific
Ford
Forsikringsselskabernes Data Central
Fraunhofer-Gesellschaft
Fuji Xerox Asia Pacific
Fujitsu Systems
 
Gabriel Communications
Gabriel Wireless
Gateway 2000
GE
GE Transportation Systems
General American
General Dynamics
Georgia Institute of Technology
Giddings & Lewis Machine Tools
Glasgow University
Globix
GM
Goldman Sachs
Goodyear
Google
Goverment of British Columbia
Goverment of the City of San Diego
Goverment of the State of Delaware
Goverment of the State of Idaho
Goverment of the State of Iowa Communications Network
Goverment of the State of Michigan Department of Transportation
Goverment of the State of Minnesota
Great American Insurance
Grey Communications
Griffith University
GTE
GTE Intelligent Network Services
Guardian Life Insurance
GVA Grimley
 
Hadco
Handelsgymnasiet Mariager Fjord
Harnischfeger Industries
Harris Corporation
Harris Publishing
Harris Semiconductor
Harvard University
Health Network of The Chester County Hospital
Healthcare Management Solutions
Hewlett-Packard
Hitachi
Hoehere Technische Lehranstalt
Home Shopping Network
Hongkong Telecom
Howard Computers
HTE
HUD
Hyatt Technical Center
HydraForce
 
IANA
IBM
IBM Canada
IBM Global Services
Illinois State Board of Education
Imaging Sensing Technology Mercedes Benz
Imperial Bank
Infacad Computing and Design
INFO Louisiana
Infomosaic
Information Resource Network
Information Technology Group
Ingram Micro
Innovative Software Design
Intek
Intel
Intel Design Tecnology
Intellispace
International Semiconductor
Intuit
Invision Tech
Israeli Aircraft Industries
ITT Aerospace/Communications Division
 
J. P. Morgan
Japan Network Information Center
John Hancock
John Hopkins University Applied Physics Laboratory
John Wiley & Sons
Johnson & Johnson
Jyske Bank
 
Kaiser Permanente Medical Care Program
Kansas State University
Keithley Instruments
Kimberly-Clark
Kirkeberg Skole
Kmart
Kommunedata
Kommunernes gensidige Forsikringsselskab
Korea Network Information Center
 
L3 Internet Information Exchange (LINIX)
L3C Communications
Lancaster Health Alliance
Lands' End
Lanes Computer Solutions
Lanier Worldwide
Lawrence Technological University of Florida
LEC
Leeds Polytechnic Institute
Lehman Brothers
Level3 Communications
Levi Strauss
Lexington Clinic
Lexmark
Liane Technical University
Liberty Mutual Insurance Group
Lockheed Martin
Lockheed Martin Airport Group
Logicon
Loma Linda University Medical Center
London Life
LSI Logic
Lucent
Lutron
 
Mackenzie Financial
Maersk Data
Malmo City Goverment
Manitoba Hydro
Mannesmann Telecommunications
Manpower International
Manualife Financial
Marconi Communications Group
Marconi Medical Systems
Marine Corps Central Design and Programming Activity
Marriott
Martin Agency
Matrox
Maxtor
Mayo Clinic
McCormick & Company
McGraw-Hill
MCI
Merck
Merkantildata
Merril Lynch
Mesirow Financial
Metalindustriens Fagskole
MetLife
Michael Coughlin CPA
Michigan Internet Cooperative Association
Micron
Microsoft
Midland Bank
Mikrotec
MindShare
Minute Maid
Mirage Resorts
MIT
Monsanto
Motorola
Mount Aloysius College
Mount Sinai School of Medicine
MTA Solutions
MTI Technologies
Municipality of Hvidovre Denmark
Mutual of Omaha RF Micro Devices
Muzak
 
Napier University
NASA
NASA Johnson Space Center
National Exchange Carrier Association
National Instruments
National Oceanic and Atmosphereic Administration
National Research Council of Canada
Natwest Bank
Naval Aviation Depot
Naval Surface Warfare Center Crane Division
NCR
NetAccess of Virginia
NetCare Computing
Netcom Canada
Netherlands Organization for Applied Scientific Research
Netmaster
Netvision
Network for the Educational and Research Community in Britain (JANET)
Network for the Ministery of Education in Denmark
Network Solutions
New Holland
New Mexico State University
New York Life Insurance Worldwide
New York State Department of Taxation and Finance
New York State Office of General Services Information Technology Group
New York University
New Zealand Ministry of Agriculture
Newspaper Agency Corporation
Nike
Nokia
Nordstrom
Nortel Networks
Northeastern University
Novell
NVidia
NYC Cowen & Company
Nykredit Data
 
Oester-Ulslev Handelscenter
Ohio State University
Oklahoma State University
Omneon Video Networks
Ontario Good Roads Association
Ontario Lottery
Ontario Northland Telecommunication
Open Text
Openheimer and Company
Oracle
Outsource Solutions
Owens Online
 
Pace Micro Technology
Pacific Internet
Parametric Technology
PCI Imaging
Pennslyvania Medical Society
Pennslyvania Power and Light
PeopleSoft
Peregrine Systems
Performance Systems International
Pfizer
Pharmacia and Upjohn
Philips Automation
Pirma Kommercbanka
Pittsburg Supercomputing Center
Polaroid
Pollack Mihaly Technical College
Price Waterhouse Coopers
Prima Publishing
Princeton University
Principal Financial Group
Proctor & Gamble
Proffice
Proinfo
Providence Saint Peters Hospital
Province of Nova Scotia
Puma Technologies
Purdue University
 
Radian International
Randolph Air Force Base
Raytheon
RBS Trust Bank
Reliance Personal Insurance
Reliance Trust
Rensselaer Polytechnic Institute
Research Analysis Maintenance
Research Machines
RIPE Network Coordination Center
Rochester Institute of Technology
Rockwell
Rogaland University Center
Royal Bank Invoice Finance
Royal Sun Alliance Investments
Russel
Rutgers University
 
S & G Interactive
Saint Mary's University
Salem Five Cents Savings Bank
SAP
Sarah Lawrence College
SAS Airline Denmark
Scana
Schlumberger Information Network
Scholastic
Science Applications International
Scott H. Croft CPA
Scottsdale Securities
Seagate
Sentara Healthcare
ServiceCo LLC-Roadrunner
Setec Communications
Shaw Fiberlink
Siemens
Simpson Thatcher and Bartlet
Singapore Telecommunications
SITA
Skibet Skole
Social Security Administration
Sofiendalskolen
Softbank Service Group
Software Technology Park - Bangalore
Software Technology Parks of India
Software Testing Labs
Sonic Foundry
Sony
Sophus Berendsen
Southeastern Ohio Regional Medical Center
Southwestern Bell
Sprint
Sprint Goverment Systems Division
Sprint International
Sprint United Telephone of Florida
Standard Life
Stanley Consultants
Starbucks
State of Ohio Network
Steris
Stewart Enterprises
Stofa
Stony Brook State University of New York
Storage Tek
Sudbury Hydro-Electric Commission
Sunquest Informations Systems
Supervalu
Supreme Court of the State of Florida
Surrey Memorial Hospital
Swedish National Labor Market Board
Swedish Telecom
Swisscom
Switching Test Solutions
Sybase
System Forum
 
Taiwan Network Information Center
Tameside College
Technical University/Slovak Academy of Science
Technology Park of Western Australia
Tektronix
Tele2
Telecheck
Telecommunication of Jamaica
Telia
Temple University
Tennesse Board of Regents
Teradyne
Testra
Tetra Pak
Texaco
Texas AM University
Texas State Department of Highways and Transportation
The Aerospace Corporation
The Connecticut Hospital and Affiliates
The Karolinska Hospital
The Mony Group
The Rosetta Stone Language Library
The Royal Bank of Scotland
The Saint Paul Companies
The Stanley Works
The Todd Organization
The University of Mississippi Medical Center
The University of Texas at Austin
The Vanguard Group
Thompson Insurance Enterprises
Thomson Consumer Electronic
Thomson Financial
Tietgen Business College
TMP Worldwide
Toronto District School Board
Toronto Star Newspapers
Toshiba America Information Systems
Transpac
TRW Space and Defense Sector Communications Services
TWA
Tyco Electronics
 
U. S. Bancorp Piper Jaffray
U.P.S.
U.S. Treasury
UBS Warburg
UCLA Communications Technology
UNI-C
Unibank
Unicor
Union Bank of Switzerland
Union Switch and Signal
United European Bank
United States Olympic Committee
Universiity of Copenhagen Department of Computer Science
Universite du Quebec a Montreal
University of Adelaide
University of Akron
University of Bremen
University of British Columbia
University of California at Santa Barbara
University of California at Santa Cruz
University of California in Irvine
University of Central Oklahoma
University of Chicago Hospitals and Health System
University of Connecticut
University of Dortmund Informatik
University of Dublin Trinity College
University of Hannover
University of Illinois
University of Maryland
University of Minnesota
University of Nevada
University of North Carolina at Charlotte Computing Services
University of Pittsburg
University of Queensland
University of Rochester
University of Southampton
University of Southern California Information Sciences Institute
University of Toledo
University of Victoria
University of Virginia
University of Wisconsin
University of Zurich
UPS
Urban Bank
US Courts/Federa Public
US Department of Energy
US Department of Labor
US Navy
US West Communications
USA Group
USAF
USMC
USPS
Utah Educational Network
UUNET Technologies
 
Vanion
Vejle Tekniske Skole
Verdix
Verio
Vermont Heritage Financial Group
Vidius Israel
Virgin Express
Visa International Association
Visual Soft Information Solutions
VMWare
Voith Hydro
Volkswagen
Volvo
 
Walt Disney
Washington School Information Processing Cooperative
Washington State Department of Social and health Services
Washington State University Computing Services Center
Wasserman Camden and Casselman
Wells Fargo
Westminister School
WhiteHorse Communications
World Online Denmark
World Savings and Loan
World Travel Partners
WorldCom
Worldlinx Telecommunications
Worldspan
 
Xerox
Yale University
Yipes Communications
Yoshida
Youngstown State University
Zhone Technologies

Batfiles: The DOS batch file programming handbook & tutorial  © 1997-2003 by Laurence Soucy


Batfiles Home  Top of page


http://purl.oclc.org/net/Batfiles/
© 1997-2003 by Laurence Soucy. All rights reserved.
 
Valid HTML 4.01!