Sie sind auf Seite 1von 10

12/22/2016

BatchfileWikipedia

Batchfile
FromWikipedia,thefreeencyclopedia

AbatchfileisakindofscriptfileinDOS,OS/2andMicrosoft
Windows.Itconsistsofaseriesofcommandstobeexecutedby
thecommandlineinterpreter,storedinaplaintextfile.Abatch
filemaycontainanycommandtheinterpreteraccepts
interactivelyanduseconstructsthatenableconditional
branchingandloopingwithinthebatchfile,suchas"if","for",
"goto"andlabels.Theterm"batch"isfrombatchprocessing,
meaning"noninteractiveexecution",thoughabatchfilemay
notprocessabatchofmultipledata.

Batchfile

Filename
extension

.bat,.cmd,.btm

Internet
mediatype

application/bat,application/xbat,
application/xmsdosprogram,
text/plain

SimilartoJobControlLanguage(JCL)andothersystemson
mainframeandminicomputersystems,batchfileswereaddedto Typeof
Scripting
easetheworkrequiredforcertainregulartasksbyallowingthe
format
usertosetupascripttoautomatethem.Whenabatchfileisrun, Containerfor Scripts
theshellprogram(usuallyCOMMAND.COMorcmd.exe)reads
thefileandexecutesitscommands,normallylinebyline.[1]
Unixlikeoperatingsystems,suchasLinux,haveasimilar,butmoreflexible,typeoffilecalledashellscript.

Thefilenameextension.batisusedinDOSandWindows.WindowsNTandOS/2alsoadded.cmd.Batchfiles
forotherenvironmentsmayhavedifferentextensions,e.g.,.btmin4DOS,4OS2and4NTrelatedshells.
Thedetailedhandlingofbatchfileshaschanged.Someofthedetailinthisarticleappliestoallbatchfiles,while
otherdetailsapplyonlytocertainversions.

Contents
1 Variants
1.1 DOS
1.2 EarlyWindows
1.3 OS/2
1.4 WindowsNT
2 Filenameextensions
3 Batchfileparameters
4 Examples
4.1 Explanation
5 Limitationsandexceptions
5.1 Nullvaluesinvariables
5.2 Quotationmarksandspacesinpassedstrings
5.3 Escapedcharactersinstrings
5.4 Sleeporscripteddelay
5.5 TextoutputwithstrippedCR/LF
5.6 SettingaUNCworkingdirectoryfromashortcut
5.7 Characterset
6 Batchvirusesandmalware
7 OtherWindowsscriptinglanguages
8 Seealso
9 References
10 Externallinks
https://en.wikipedia.org/wiki/Batch_file

1/10

12/22/2016

BatchfileWikipedia

10 Externallinks

Variants
DOS
InDOS,abatchfilecanbestartedfromthecommandlineinterfacebytypingitsname,followedbyanyrequired
parametersandpressingthe"Enter"key.WhenDOSloads,thefileAUTOEXEC.BAT,whenpresent,is
automaticallyexecuted,soanycommandsthatneedtoberuntosetuptheDOSenvironmentmaybeplacedinthis
file.ComputeruserswouldhavetheAUTOEXEC.BATfilesetupthesystemdateandtime,initializetheDOS
environment,loadanyresidentprogramsordevicedrivers,orinitializenetworkconnectionsandassignments.
A".bat"filenameextensionidentifiesafilecontainingcommandsthatareexecutedbythecommandinterpreter
COMMAND.COMlinebyline,asifitwerealistofcommandsenteredmanually,withsomeextrabatchfile
specificcommandsforbasicprogrammingfunctionality,includingaGOTOcommandforchangingflowofline
execution.

EarlyWindows
MicrosoftWindowswasintroducedin1985asagraphicaluserinterfacebased(GUI)overlayontextbased
operatingsystemsandwasdesignedtorunonDOS.Inordertostartit,theWINcommandwasused,whichcouldbe
addedtotheendoftheAUTOEXEC.BATfiletoallowautomaticloadingofWindows.Intheearlierversions,one
couldruna.battypefilefromWindowsintheMSDOSPrompt.Windows3.1xandearlier,aswellasWindows9x
invokedCOMMAND.COMtorunbatchfiles.

OS/2
TheIBMOS/2operatingsystemsupportedDOSstylebatchfiles.ItalsoincludedaversionofREXX,amore
advancedbatchfilescriptinglanguage.IBMandMicrosoftstarteddevelopingthissystem,butduringthe
constructionofitbrokeupafteradisputeasaresultofthis,IBMreferredtotheirDOSlikeconsoleshellwithout
mentionofMicrosoft,namingitjustDOS,althoughthisseeminglymadenodifferencewithregardtotheway
batchfilesworkedfromCOMMAND.COM.
OS/2'sbatchfileinterpreteralsosupportsanEXTPROCcommand.Thispassesthebatchfiletotheprogram
namedontheEXTPROCfileasadatafile.Thenamedprogramcanbeascriptfilethisissimilartothe#!
mechanism.

WindowsNT
UnlikeWindows98andearlier,theWindowsNTfamilyofoperatingsystemsdoesnotdependonMSDOS.
WindowsNTintroducedanenhanced32bitcommandinterpreter(cmd.exe)thatcouldexecutescriptswitheither
the.CMDor.BATextension.Cmd.exeaddedadditionalcommands,andimplementedexistingonesinaslightly
differentway,sothatthesamebatchfile(withdifferentextension)mightworkdifferentlywithcmd.exeand
COMMAND.COM.Inmostcases,operationisidenticalifthefewunsupportedcommandsarenotused.
Cmd.exe'sextensionstoCOMMAND.COMcanbedisabledforcompatibility.
Microsoftreleasedaversionofcmd.exeforWindows9xandMEcalledWIN95CMDtoallowusersofolder
versionsofWindowstousecertaincmd.exestylebatchfiles.

https://en.wikipedia.org/wiki/Batch_file

2/10

12/22/2016

BatchfileWikipedia

AsofWindows8,cmd.exeisthenormalcommandinterpreterforbatchfilestheolderCOMMAND.COMcanbe
runaswellin32bitversionsofWindowsabletorun16bitprograms.[2]

Filenameextensions
.bat:ThefirstfilenameextensionusedbyMicrosoftforbatchfiles.ThisextensionrunswithDOSandall
versionsofWindows,underCOMMAND.COMorcmd.exe,despitethedifferentwaysthetwocommand
interpretersexecutebatchfiles.
.cmd:UsedforbatchfilesinWindowsMEfamilyandsenttobat.exeforinterpretation.COMMAND.COM
doesnotrecognizethisfilenameextension,socmd.exescriptsarenotexecutedinthewrongWindows
environmentbymistake.Inaddition,"set","path","assoc"and"prompt"commands,whenexecutedfroma
.batfile,alterthevalueofthe"errorlevel"variableonlyuponanerror,whereasfromwithina.cmdfile,they
wouldaffecterrorlevelevenwhenreturningwithoutanerror.[3]ItisalsousedbyIBM'sOS/2forbatchfiles.
.btm:Theextensionusedby4DOS,4OS2,4NTandTakeCommand.Thesescriptsarefaster,especially
withlongerones,asthescriptisloadedentirelyreadyforexecution,ratherthanlinebyline.[4]

Batchfileparameters
COMMAND.COMandcmd.exesupportanumberofspecialvariables(%0,%1through%9)inordertorefertothe
pathandnameofthebatchjobandthefirstninecallingparametersfromwithinthebatchjob,seealsoSHIFT.Non
existentparametersarereplacedbyazerolengthstring.Theycanbeusedsimilartoenvironmentvariables,butare
notstoredintheenvironment.MicrosoftandIBMrefertothesevariablesasreplacementparametersor
replaceableparameters,whereasDigitalResearch,NovellandCalderaestablishedthetermreplacement
variables[5]forthem.JPSoftwarecallsthembatchfileparameters.[6]

Examples
Thisexamplebatchfiledisplays"HelloWorld!",promptsandwaitsfortheusertopressakey,andthenterminates.
(Note:Itdoesnotmatterifcommandsarelowercaseoruppercaseunlessworkingwithvariables)
@ECHOOFF
ECHOHelloWorld!
PAUSE

Toexecutethefile,itmustbesavedwiththeextension.bat(or.cmdforWindowsNTtypeoperatingsystems)in
plaintextformat,typicallycreatedbyusingatexteditorsuchasMicrosoftNotepadorawordprocessorintext
mode.
Whenexecuted,thefollowingisdisplayed:
HelloWorld!
Pressanykeytocontinue...

Explanation
Theinterpreterexecuteseachlineinturn,startingwiththefirst.The@symbolatthestartofanylinepreventsthe
promptfromdisplayingthatcommandasitisexecuted.ThecommandECHOOFFturnsoffthepromptpermanently,
oruntilitisturnedonagain.Thecombined@ECHOOFFisoftenasherethefirstlineofabatchfile,preventingany
commandsfromdisplaying,itselfincluded.ThenthenextlineisexecutedandtheECHOHelloWorld!command
https://en.wikipedia.org/wiki/Batch_file

3/10

12/22/2016

BatchfileWikipedia

outputsHelloWorld!,asonlyoffandonhavespecialfunctions.ThenthenextlineisexecutedandthePAUSE
commanddisplaysPressanykeytocontinue...andpausesthescript'sexecution.Afterakeyispressed,the
scriptterminates,astherearenomorecommands.InWindows,ifthescriptisexecutedfromanalreadyrunning
CommandPromptwindow,thewindowremainsopenatthepromptasinMSDOSotherwise,CommandPrompt
windowclosesontermination.PAUSEcommandatendofthescriptcausesthewindowtoremainopenforaslong
astheuserallows.

Limitationsandexceptions
Nullvaluesinvariables
Variableexpansionsaresubstitutedtextuallyintothecommand,andthusvariableswhichcontainnothingsimply
disappearfromthesyntax,andvariableswhichcontainspacesturnintomultipletokens.Thiscanleadtosyntax
errorsorbugs.
Forexample,if%foo%isempty,thisstatement:
IF%foo%==barECHOEqual

parsesastheerroneousconstruct:
IF==barECHOEqual

Similarly,if%foo%contains"abcdef",thenadifferentsyntaxerrorresults:
IFabcdef==barECHOEqual

Theusualwaytopreventthisproblemistosurroundvariableexpansionsinquotessothatanemptyvariable
expandsintothevalidexpressionIF""=="bar"insteadoftheinvalidIF==bar.Thetextthatisbeingcomparedto
thevariablemustalsobeenclosedinquotes,becausethequotesarenotspecialdelimitingsyntaxthesecharacters
representthemselves.
IF"%foo%"=="bar"ECHOEqual

Thedelayed!VARIABLE!expansionavailableinWindows2000andlatermaybeusedtoavoidthesesyntactical
errors.Inthiscase,nullormultiwordvariablesdonotfailsyntacticallybecausethevalueisexpandedaftertheIF
commandisparsed:
IF!foo!==barECHOEqual

AnotherdifferenceinWindows2000orhigheristhatanemptyvariable(undefined)isnotsubstituted.As
describedinpreviousexamples,previousbatchinterpreterbehaviourwouldhaveresultedinanemptystring.
Example:
C:\>setMyVar=
C:\>echo%MyVar%
%MyVar%

https://en.wikipedia.org/wiki/Batch_file

4/10

12/22/2016

BatchfileWikipedia

C:\>if"%MyVar%"==""(echoMyVarisnotdefined)else(echoMyVaris%MyVar%)
MyVaris%MyVar%

BatchinterpreterspriortoWindows2000wouldhavedisplayedresult"MyVarisnotdefined"

Quotationmarksandspacesinpassedstrings
Forsomecommands,spacesaretreatedasdelimitersincommands,unlessthosespacesareenclosedby
quotationmarks.Asinglequotationmark(")isnotincludedaspartofthestring.However,anescaped
quotationmark(""")canbepartofthestring.
Forothercommands,spacesarenottreatedasdelimitersanddonotneedquotationmarks.Ifquotesare
includedtheybecomepartofthestring.
Thiscancauseconflictswhereastringcontainsquotationmarks,andistobeinsertedintoanotherlineoftextthat
mustalsobeenclosedinquotationmarks:
C:\>setfoo="thisstringisenclosedinquotationmarks"
C:\>echo"test1%foo%"
"test1"thisstringisenclosedinquotationmarks""
C:\>eventcreate/TWarning/ID1/LSystem/SO"Source"/D"Example:%foo%"
ERROR:InvalidArgument/Option'string'.
Type"EVENTCREATE/?"forusage.

OnWindows2000andlater,thesolutionistoreplaceeachoccurrenceofaquotecharacterwithinavaluebya
seriesofthreequotecharacters:
C:\>setfoo="thisstringisenclosedinquotes"
C:\>setfoo=%foo:"="""%
C:\>echo"test1%foo%"
"test1"""thisstringisenclosedinquotes""""
C:\>eventcreate/TWarning/ID1/LSystem/SO"Source"/D"Example:%foo%"
SUCCESS:A'Warning'typeeventiscreatedinthe'Source'log/source.

Escapedcharactersinstrings
Somecharacters,suchaspipe("|")characters,havespecialmeaningtothecommandline.Theycannotbeprinted
astextusingtheECHOcommandunlessescapedusingthecaret^symbol:
C:\>Echofoo|bar
'bar'isnotrecognizedasaninternalorexternalcommand,
operableprogramorbatchfile.
C:\>Echofoo^|bar
foo|bar

However,escapingdoesnotworkasexpectedwheninsertingtheescapedcharacterintoanenvironmentvariable.
Thevariableendsupcontainingalivepipecommandwhenmerelyechoed.Itisnecessarytoescapeboththecaret
itselfandtheescapedcharacterforthecharacterdisplayastextinthevariable:
C:\>setfoo=bar|baz
'baz'isnotrecognizedasaninternalorexternalcommand,
https://en.wikipedia.org/wiki/Batch_file

5/10

12/22/2016

BatchfileWikipedia

operableprogramorbatchfile.
C:\>setfoo=bar^|baz
C:\>echo%foo%
'baz'isnotrecognizedasaninternalorexternalcommand,
operableprogramorbatchfile.
C:\>setfoo=bar^^^|baz
C:\>echo%foo%
bar|baz

Thedelayed!VARIABLE!expansionavailablewithCMD/V:ONorwithSETLOCALENABLEDELAYEDEXPANSIONin
Windows2000andlatermaybeusedtoshowspecialcharactersstoredinenvironmentvariablesbecausethe
variablevalueisexpandedafterthecommandwasparsed:
C:\>cmd/V:ON
MicrosoftWindows[Version6.1.7601]
Copyright(c)2009MicrosoftCorporation.Allrightsreserved.
C:\>setfoo=bar^|baz
C:\>echo!foo!
bar|baz

Sleeporscripteddelay
UntiltheTIMEOUTcommandwasintroducedwithWindowsVista,therewasnoeasywaytoimplementatimed
pause,asthePAUSEcommandhaltsscriptactivityindefinitelyuntilanykeyispressed.
Manyworkaroundswerepossible,[7]butgenerallyonlyworkedinsomeenvironments:TheCHOICEcommandwas
notavailableinolderDOSversions,PINGwasonlyavailableifTCP/IPwasinstalled,andsoon.Nosolutionwas
availablefromMicrosoft,butanumberofsmallutilityprograms,couldbeinstalledfromothersources.A
commercialexamplewouldbethe1988NortonUtilitiesBatchEnhancer(BE)command,whereBEDELAY18
wouldwaitfor1second,orthefree94byteWAIT.COM[8]whereWAIT5wouldwaitfor5seconds,thenreturn
controltothescript.Mostsuchprogramsare16bit.COMfiles,soareincompatiblewith64bitWindows.

TextoutputwithstrippedCR/LF
Normally,allprintedtextautomaticallyhasthecontrolcharactersfor"carriagereturn"(CR)and"linefeed"(LF)
appendedtotheendofeachline.
batchtest.bat
@echofoo
@echobar

C:\>batchtest.bat
foo
bar

ItdoesnotmatterifthetwoechocommandssharethesamecommandlinetheCR/LFcodesareinsertedtobreak
theoutputontoseparatelines:
C:\>@echoMessage1&@echoMessage2
Message1
Message2
https://en.wikipedia.org/wiki/Batch_file

6/10

12/22/2016

BatchfileWikipedia

AtrickdiscoveredwithWindows2000andlateristousethespecialpromptforinputtooutputtextwithout
CR/LFtrailingthetext.Inthisexample,theCR/LFdoesnotfollowMessage1,butdoesfollowLine2andLine3:
batchtest2.bat
@echooff
set/p="Message1"<nul
echoMessage2
echoMessage3

C:\>batchtest2.bat
Message1Message2
Message3

ThiscanbeusedtooutputdatatoatextfilewithoutCR/LFappendedtotheend:
C:\>set/p="Message1"<nul>data.txt
C:\>set/p="Message2"<nul>>data.txt
C:\>set/p="Message3"<nul>>data.txt
C:\>typedata.txt
Message1Message2Message3

However,thereisnowaytoinjectthisstrippedCR/LFpromptoutputdirectlyintoanenvironmentvariable.

SettingaUNCworkingdirectoryfromashortcut
ItisnotpossibletohaveacommandpromptthatusesaUNCpathasthecurrentworkingdirectorye.g.
\\server\share\directory\

Thecommandpromptrequirestheuseofdriveletterstoassignaworkingdirectory,whichmakesrunningcomplex
batchfilesstoredonaserverUNCsharemoredifficult.WhileabatchfilecanberunfromaUNCfilepath,the
workingdirectorydefaultis"C:\Windows\system32\"
InWindows2000andlater,aworkaroundistousethePUSHDandPOPDcommandwithcommandextensions.[9]
Ifnotenabledbydefault,commandextensionscanbetemporarilyenabledusingthe"/E:ON"switchforthe
commandinterpreter.
SotorunabatchfileonaUNCshare,assignatemporarydrivelettertotheUNCshare,andusetheUNCshareas
theworkingdirectoryofthebatchfile,aWindowsshortcutcanbeconstructedthatlookslikethis:
Target:%COMSPEC%/E:ON/C"PUSHD"""\\SERVER\SHARE\DIR1\DIR2\"""&BATCHFILE.BAT&POPD"
Theworkingdirectoryattributeofthisshortcutisignored.
ThisalsosolvesaproblemrelatedtoUserAccountControl(UAC)onWindowsVistaandnewer.Whenan
administratorisloggedonandUACisenabled,andtheytrytorunabatchfileasadministratorfromanetwork
driveletter,usingtherightclickfilecontextmenu,theoperationwillunexpectedlyfail.Thisisbecausethe
elevatedUACprivilegedaccountcontextdoesnothavenetworkdriveletterassignments,anditisnotpossibleto
assigndrivelettersfortheelevatedcontextviatheExplorershellorlogonscripts.However,bycreatingashortcut

https://en.wikipedia.org/wiki/Batch_file

7/10

12/22/2016

BatchfileWikipedia

tothebatchfileusingtheabovePUSHD/POPDconstruct,andusingtheshortcuttorunthebatchfileas
administrator,thetemporarydriveletterwillbecreatedandremovedintheelevatedaccountcontext,andthebatch
filewillfunctioncorrectly.
Thefollowingsyntaxdoescorrectlyexpandtothepathofthecurrentbatchscript.
%~dp0

UNCdefaultpathsareturnedoffbydefaultastheyusedtocrasholderprograms.[10]
TheDwordregistryvalueDisableUNCCheckatHKEY_CURRENT_USER\Software\Microsoft\CommandProcessor[10]
allowsthedefaultdirectorytobeUNC.CDcommandwillrefusetochangebutplacingaUNCpathinDefault
DirectoryinashortcuttoCmdorbyusingtheStartcommand.start""/d\\127.0.0.1\C$"cmd/k"(C$shareis
foradministrators).

Characterset
BatchfilesuseanOEMcharacterset,asdefinedbythecomputer,e.g.Codepage437.ThenonASCIIpartsof
theseareincompatiblewiththeUnicodeorWindowscharactersetsotherwiseusedinWindowssocareneedstobe
taken.[11]NonEnglishfilenamesworkonlyifenteredthroughaDOScharactersetcompatibleeditor.Filenames
withcharactersoutsidethissetwon'tworkinbatchfiles.
TogetoutputinUnicodeintofilepipesfromaninternalcommandsuchasdir,onecanusethecmd/Ucommand.
Forexample,cmd/U/Cdir>files.txtcreatesafilecontainingadirectorylistingwithcorrectWindows
characters,intheUTF16LEencoding.

Batchvirusesandmalware
Batchfilescanbeusedtowritemalwareandviruses.Somewellknownexamplesinthehackingcommunityare
theforkbomb(alsocalledwindowbomber)malware,whichopensthesameprogramsomanytimesthecomputer
resourcesareexhausted,theneverendingcopyingofthebatchfilealloverthedisk,ortheDNSpoisoningmalware
inwhichthebatchfilemodifiesthehostsfiletomakeaWindowscomputerconnecttoanIPaddressspecifiedby
thebatchfile'sprogrammerwhentheuserattemptstovisitawellknownInternetsiteunrelatedtothemalware.
BatchvirusescanalsospreadthemselvesviaUSBflashdrivesbyusingWindows'Autoruncapability.[12]An
exampleofabatchviruscommonlyusedtodeletedataisshownbelow.Itdeletesallthedatainthecurrent
directory(folder).
del*.*

del/Q*.*

Doesthesamethingwithoutaskingforconfirmation,youcanalsouse"erase"insteadofdel.
Thisisaforkbombin5bytesthatwillcrashacomputerinlessthan10seconds:
%0|%0

%0,orpercentagesign,zeromeansthecurrentdirectory,and|,orpipecharacter,meansfork.
https://en.wikipedia.org/wiki/Batch_file

8/10

12/22/2016

BatchfileWikipedia

OtherWindowsscriptinglanguages
Thecmd.execommandprocessorthatinterprets.cmdfilesissupportedinall32and64bitversionsofWindows
uptoatleastWindows10.COMMAND.EXE,whichinterprets.BATfiles,wassupportedinall16and32bit
versionsuptoatleastWindows10.[13]
Thereareother,laterandmorepowerful,scriptinglanguagesavailableforWindows.However,theserequirethe
scriptinglanguageinterpretertobeinstalledbeforetheycanbeused:
KiXtart(.kix)developedbyaMicrosoftemployeein1991,specificallytomeettheneedforcommands
usefulinanetworklogonscriptwhileretainingthesimple'feel'ofa.cmdfile.
WindowsScriptHost(.vbs,.jsand.wsf)releasedbyMicrosoftin1998,andconsistingofcscript.exeand
wscript.exe,runsscriptswritteninVBScriptorJScript.Itcanruntheminwindowedmode(withthe
wscript.exehost)orinconsolebasedmode(withthecscript.exehost).TheyhavebeenapartofWindows
sinceWindows98.
WindowsPowerShell(.ps1)releasedin2006byMicrosoftandcanoperatewithWindowsXP(SP2/SP3)
andlaterversions.PowerShellcanoperatebothinteractively(fromacommandlineinterface)andalsovia
savedscripts,andhasastrongresemblancetoUnixshells.[14]
UnixstyleshellscriptinglanguagescanbeusedifaUnixcompatibilitytool,suchasCygwin,isinstalled.
CrossplatformscriptingtoolsincludingPerl,Python,Ruby,Rexx,Node.jsandPHPareavailablefor
Windows.
Scriptfilesrunifthefilenamewithoutextensionisentered.Therearerulesofprecedencegoverninginterpretation
of,say,DoThisifDoThis.cmd,DoThis.bat,DoThis.exe,etc.existbydefaultDoThis.cmdhashighestpriority.This
defaultordermaybemodifiedinneweroperatingsystemsbytheusersettablePATHEXTenvironmentvariable.

Seealso
ListofDOScommands

References
1."Usingbatchfiles:ScriptingManagementServices".Technet.microsoft.com.20050121.Retrieved20121130.
2.ToverifythatCOMMAND.COMremainsavailable(inthe\WINDOWS\SYSTEM32directory),type
"COMMAND.COM"atthe32bitWindows7commandprompt.
3."Differencebetweenbatandcmd|WWoITWayne'sWorldofIT".waynesworldit.blogspot.fr.20121115.Retrieved
20121130.
4."btmfileextension::allaboutthe.btmfiletype".Cryer.co.uk.Retrieved20121130.
5.DRDOS7.02UserGuide,Caldera,Inc.,1998,archivedfromtheoriginalon20161105,retrieved20130810
6.Brothers,HardinRawson,TomConn,RexC.Paul,MatthiasDye,CharlesE.Georgiev,LuchezarI.(20020227).
4DOS8.00onlinehelp.
7."Howtodoadelay"(http://www.ericphelps.com/batch/samples/sleep.txt),ericphelps.com
8.UtilitiesforDOS,linkingtoWAIT.ZIP(archiveofWAIT.COM)andotherprograms(http://www.uwesieber.de/util_e.ht
ml)
9."IfCommandExtensionsareenabledthePUSHDcommandacceptsnetworkpathsinadditiontothenormaldriveletter
andpath.Ifanetworkpathisspecified,PUSHDcreatesatemporarydriveletterthatpointstothatspecifiednetwork
resourceandthenchangethecurrentdriveanddirectory,usingthenewlydefineddriveletter.Temporarydrivelettersare
allocatedfromZ:ondown,usingthefirstunuseddriveletterfound."ThehelpforPUSHDinWindows7
10.https://support.microsoft.com/enus/kb/156276
11.Chen,Raymond."Keepyoureyeonthecodepage".Microsoft.
12.http://www.explorehacking.com/2011/01/batchfilesartofcreatingviruses.html

https://en.wikipedia.org/wiki/Batch_file

9/10

12/22/2016

BatchfileWikipedia

13.AvailabilityofCMD.EXEandCOMMAND.COMcanbeconfirmedbyinvokingtheminanyversionofWindows
(COMMAND.COMnotin64bitversionsprobablyonlyavailableinWindows832bitversionsifinstalledwithoption
tosupport16bitprograms)
14."WindowsPowerShellUnixcomestoWindows".Geekswithblogs.net.Retrieved20121130.

Externallinks
MicrosoftWindowsXPBatchfilereference(http://www.microsoft.c
Wikibookshasabookon
om/resources/documentation/windows/xp/all/proddocs/enus/batch.m
thetopicof:Guideto
spx?mfr=true)
Windowscommands
HowWindowsbatchfileswork(http://commandwindows.com/batch.
htm)
Windowsbatchfilecommandoverview(http://www.ss64.com/nt/)
FileExtensionBAT(https://www.howopen.org/en/extensions/executablefiles/bat)
FreeDOS'FreeCOM:completefeaturelist(http://www.freedos.org/freecom/)
MSDOS+Win../95/98/MEbatchprogramminglinks(http://www.netikka.net/tsneti/http/tsnetihttpprog.php#
batch)
WindowsCommandLineInterfacescriptprogramminglinks(http://www.netikka.net/tsneti/http/tsnetihttppr
og.php#cmdscript)
scriptingrelatedinformation(alsocommandline)(http://www.robvanderwoude.com/)
Retrievedfrom"https://en.wikipedia.org/w/index.php?title=Batch_file&oldid=755204615"
Categories: Scriptinglanguages DOSonIBMPCcompatibles Windowsadministration
Thispagewaslastmodifiedon16December2016,at21:13.
TextisavailableundertheCreativeCommonsAttributionShareAlikeLicenseadditionaltermsmayapply.
Byusingthissite,youagreetotheTermsofUseandPrivacyPolicy.Wikipediaisaregisteredtrademark
oftheWikimediaFoundation,Inc.,anonprofitorganization.

https://en.wikipedia.org/wiki/Batch_file

10/10

Das könnte Ihnen auch gefallen