4DOS.TXT 1.0 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650
  1. ;---------------------------------------------------------------------------
  2. ; Copyright 1988 - 2004, JP Software Inc., All Rights Reserved.
  3. ; Published by JP Software Inc., P.O. Box 328, Chestertown, MD 21620, USA.
  4. ;
  5. ; This is a variant help text for Luchezar Georgiev's updated release
  6. ; of 4DOS.
  7. ;
  8. ; Changes since 2006-04-04:
  9. ;
  10. ; 2006-12-15 CED Changes for build 136: Startup option /Y reenabled
  11. ; (yeah!); changes to RMDIR, SET, SHIFT, @FILESIZE.
  12. ; Stripped out the wishlist and change log pages.
  13. ;
  14. ; 2006-12-22 LIG Changes for build 140: Removed warning about @READY.
  15. ; Added _CPU information about the Pentium 4 and newer.
  16. ;
  17. ; 2006-12-24 LIG Changes for build 141: Added gigabyte suffix to file
  18. ; size ranges and units pages, and for DIR /4.
  19. ;
  20. ; 2006-12-26 LIG Added help for @SERIAL and compatibility information
  21. ; about CADStar PCB.
  22. ;
  23. ; 2006-12-30 LIG Changes for build 144: Added /V option to TYPE.
  24. ; Added SMARTDRV cache flushing and /P option to REBOOT.
  25. ;
  26. ; 2007-1-6 LIG Changes for build 145: Added EJECTMEDIA and CLOSETRAY.
  27. ; Added "DVD" to most places where a CD-ROM is mentioned.
  28. ; Added a @READY warning about some CD-ROM drivers.
  29. ;
  30. ; 2007-1-7 LIG Changes for build 146: Added @CWD and @CWDS functions.
  31. ;
  32. ; 2007-1-8 LIG Changes for build 147: Added @EVAL hex output option.
  33. ; Corrected the limits of @CONVERT value.
  34. ;
  35. ; 2007-1-31 LIG Changes for build 151 (7.51):
  36. ; Changed some error strings to reflect changes in 4DOS.
  37. ; Updated version number which now equals 7.(build-100).
  38. ;
  39. ; 2007-2-4 LIG Changes for build 152 (7.52): Added /L option to LIST.
  40. ;
  41. ; 2007-2-15 LIG Changes for build 153 (7.53):
  42. ; Maximal description length before wrapping decremented.
  43. ; Updated File Not Found & No More Files error messages.
  44. ; Second error list column condensed to hide less of it.
  45. ;
  46. ; 2007-4-20 LIG Changes for build 154 (7.54):
  47. ; Added _ALT, _CAPSLOCK, _CTRL, _LSHIFT, _NUMLOCK,
  48. ; _RSHIFT, _SCROLLLOCK and _SHIFT variables.
  49. ;
  50. ; 2007-6-25 LIG Changes for build 156 (7.56):
  51. ; Added _DATETIME and _MONTHF variables.
  52. ; Added @AGEDATE and @MONTHF functions.
  53. ;
  54. ; 2007-7-27 LIG Changes for build 157 (7.57): Added @FIELDS function.
  55. ;
  56. ; 2007-10-27 LIG Changes for build 159 (7.59): Added @MD5 function.
  57. ;
  58. ; 2008-5-24 LIG Changes for build 164 (7.64): Added EQC operator.
  59. ;
  60. ; 2008-6-11 LIG Changes for build 165 (7.65):
  61. ; Added _LALT, _LCTRL, _RALT, _RCTRL variables.
  62. ; Changed and amended text for the _DOS variable.
  63. ; Added newer Windows versions to the Windows NT topic
  64. ; and changed the URL for 4NT (now named TCC).
  65. ;
  66. ; 2008-6-29 LIG Changes for build 167 (7.67):
  67. ; Added _EXECSTR variable.
  68. ; Deleted the note about REBOOT not working in Windows 9x
  69. ; and added a similar note about the /P option.
  70. ;
  71. ; 2008-7-1 LIG Changes for build 168 (7.68):
  72. ; Added a warning for REBOOT under Windows (important!).
  73. ; Deleted text saying REBOOT /P does not work in W9x/ME.
  74. ; Added text about showing the "brand string" for _CPU.
  75. ;
  76. ; 2008-7-4 LIG Changes for build 169 (7.69):
  77. ; Added _STDIN, _STDOUT and _STDERR variables.
  78. ; Added @SHA1 function.
  79. ;
  80. ; 2008-7-9 LIG Changes for build 170 (7.70):
  81. ; Added /N option and case-sensitive search to LIST.
  82. ;
  83. ; 2008-7-10 LIG Changes for build 171 (7.71):
  84. ; Added _EDITMODE and _EXPANSION variables.
  85. ; Added user-defined function expansion (9) to SETDOS /X.
  86. ;
  87. ; 2008-7-15 LIG Changes for build 172 (7.72):
  88. ; Added @LTRIM, @RTRIM and @TRUNCATE functions.
  89. ; Added text for @RANDOM to describe the new algorithm.
  90. ; Removed text on SETDOS /W failing in MS-/PC DOS/W9x/ME.
  91. ; and added a link to SETDOS in the UnixPaths topic.
  92. ;
  93. ; 2008-7-17 LIG Added a recommendation to set Logo=0 in MSDOS.SYS.
  94. ;
  95. ; 2008-8-4 LIG Changes for build 173 (7.73):
  96. ; Added @SMBSTR.
  97. ; Removed text in MEMORY and @EXTENDED topics saying that
  98. ; XMS excludes extended memory because it's no longer so.
  99. ;
  100. ; 2008-8-12 LIG Changes for build 174 (7.74):
  101. ; Added @FILEREADB.
  102. ; Added text for the mode of @FILEWRITEB when length = -1
  103. ;
  104. ; 2008-8-24 LIG Changes for build 175 (7.75):
  105. ; Added SET /E option.
  106. ; Added @AVERAGE and _SYSREQ.
  107. ; Added text that labels are not limited to 8 characters.
  108. ;
  109. ; 2008-8-29 LIG Changes for build 176 (7.76):
  110. ; Added MOD operator for @EVAL.
  111. ; Added @ISODOWI, @ISOWEEK, _ISODOWI, _ISOWEEK.
  112. ;
  113. ; 2008-8-31 LIG Changes for build 177 (7.77):
  114. ; Added _ISOWDATE.
  115. ; Added ISO week date input to Date Formats, DATE, TOUCH
  116. ; and ranges.
  117. ; Added format 5 (ISO week date) to @AGEDATE, @FILEDATE
  118. ; and @MAKEDATE.
  119. ;
  120. ; 2008-9-8 LIG Changes for build 178 (7.78):
  121. ; Removed text for 55 ms DELAY resolution limit, updated
  122. ; maximum allowed delay and added default value.
  123. ; Added details for TIMER smallest and largest interval,
  124. ; documented its already existing OFF option and added /Q
  125. ; Added _TSC and _CPUSPEED.
  126. ;
  127. ; 2008-9-11 LIG Changes for build 179 (7.79):
  128. ; Added _BATCHTYPE, _BDEBUGGER, _CMDSPEC, _V86 variables.
  129. ; Added @QUOTE and @UNQUOTE functions.
  130. ; Marked all 4DOS-unique variables and functions by '!'.
  131. ;
  132. ; 2008-9-14 LIG Changes for build 180 (7.80):
  133. ; Added _ININAME and _TICK variables.
  134. ; Added @COUNT, @ISALNUM, @ISALPHA, @ISASCII, @ISCNTRL,
  135. ; @ISDIGIT, @ISPRINT, @ISPUNCT, @ISSPACE and @ISXDIGIT.
  136. ;
  137. ; 2008-9-17 LIG Changes for build 181 (7.81):
  138. ; Added _CDROMS, _DRIVES, _ISOWYEAR and _READY variables.
  139. ; Added @DATECONV, @HISTORY, @ISOWYEAR, @SUBST and
  140. ; @UNQUOTES functions.
  141. ;
  142. ; 2008-9-19 LIG Changes for build 182 (7.82):
  143. ; Added text that SETDOS /C|E|P accept decimal ASCII code
  144. ; Added $A and $K special characters to the PROMPT page.
  145. ; Added _HDRIVES variable.
  146. ; Added @CEILING, @DRIVETYPE and @FLOOR functions.
  147. ;
  148. ; 2008-9-22 LIG Changes for build 183 (7.83):
  149. ; Added @COMPARE, @LCS and @REVERSE functions.
  150. ;
  151. ; 2008-9-24 LIG Changes for build 184 (7.84):
  152. ; Added format 6 (ISO ordinal date)
  153. ; to @AGEDATE, @DATECONV, @FILEDATE and @MAKEDATE.
  154. ; Added _ISORDATE and _WINTICKS variables.
  155. ; Added @DIRSTACK and @SIMILAR functions.
  156. ; Reflected the actual order of lines shown by DIRS.
  157. ;
  158. ; 2008-9-26 LIG Changes for build 185 (7.85):
  159. ; Added ISO ordinal date input
  160. ; to Date Formats, DATE, TOUCH and ranges.
  161. ; Added _STARTPATH variable.
  162. ; Noted that _WINTITLE now works also under W9x/ME.
  163. ; Updated the "Keywords" page.
  164. ;
  165. ; 2008-10-6 LIG Changes for build 186 (7.86):
  166. ; Added _DST,_MJD,_STZN,_STZO,_TZN,_TZO,_UNIXTIME,
  167. ; _UTCDATE,_UTCDATETIME,_UTCHOUR,_UTCISODATE,_UTCMINUTE,
  168. ; _UTCSECOND,_UTCTIME.
  169. ; Updated the "Keywords" page.
  170. ;
  171. ; 2008-10-10 LIG Changes for build 187 (7.87):
  172. ; Edited the TZ text to stress the universality and
  173. ; importance of this environment variable.
  174. ; Removed text on old CPU limitations for TIMER,_WINTICKS
  175. ; Added text that TITLEPROMPT works under OS/2 too.
  176. ; Added TITLE and moved most TITLEPROMPT text there.
  177. ; Updated the "Keywords" page.
  178. ;
  179. ; 2008-10-12 LIG Changes for build 188 (7.88):
  180. ; Added hex input format for SETDOS /C|E|P, @CHAR and
  181. ; @FILEWRITEB (others accept it too but it's unusual).
  182. ; Added =X hex output format with a leading 0x for @EVAL.
  183. ; Added TRANSIENT.
  184. ; Updated the "Keywords" page.
  185. ;
  186. ; 2008-10-20 LIG Changes for build 190 (7.90):
  187. ; Added IDLE.
  188. ; Updated the errors page.
  189. ; Updated the "Keywords" page.
  190. ;
  191. ; 2008-10-27 LIG Changes for build 191 (7.91):
  192. ; Added COUNTRY.
  193. ; Updated the "Keywords" page.
  194. ;
  195. ; 2008-10-31 LIG Changes for build 192 (7.92):
  196. ; Updated the KSTACK page for the /U(ninstall) option.
  197. ; Updated ALIAS, FUNCTION and SET pages for wildcards.
  198. ; Added @FSTYPE, _KEYSTACKED and _VCPI.
  199. ; Added VCPI in the glossary.
  200. ; Updated the "Keywords" page.
  201. ;
  202. ; 2008-11-7 LIG Changes for build 193 (7.93):
  203. ; Added /E option to BATCOMP.
  204. ; Added _FONTPAGE.
  205. ; Updated the "Keywords" page.
  206. ;
  207. ; 2008-11-18 LIG Changes for build 194 (7.94):
  208. ; Added notes for a possible crash of _CPUSPEED and _TSC.
  209. ; Added a V86 mode description in the glossary.
  210. ; Added @DDCSTR, _MACHINE, _NETWORK, _NLSFUNC and _SHARE.
  211. ; Updated the "Keywords" page.
  212. ;
  213. ; 2008-11-24 LIG Changes for build 195 (7.95):
  214. ; @DDCSTR: Added a warning about switching to a VESA mode
  215. ; Added @CLUSTSIZE and @HDDSIZE functions.
  216. ; Added APPEND,_ASSIGN,_DISPLAY,_DRIVER,_EGA,_GRAFTABL,
  217. ; _GRAPHICS,_MSCDEX,_PRINT,_SMARTDRV,_TASKMAX and
  218. ; _TASKSWITCHER variables.
  219. ; Updated the "Keywords" page.
  220. ;
  221. ; 2008-12-1 LIG Changes for build 196 (7.96):
  222. ; Added /M and /S options to REBOOT.
  223. ; Added @CODEPAGE and _POWER.
  224. ; Added a VESA description in the glossary.
  225. ; Updated the "Keywords" page.
  226. ;
  227. ; 2008-12-12 LIG Changes for build 197 (7.97):
  228. ; Replaced the JP Software support forum with the
  229. ; comp.os.msdos.4dos newsgroup in the "Unsupported" topic.
  230. ; Removed the obsolete 4NT and Take Command descriptions.
  231. ; Rewrote the Copyright and Contacting JP Software topics.
  232. ; Added NO_SEP environment variable.
  233. ; Added _VDS variable.
  234. ; Added VDS definition in the glossary.
  235. ; Updated the "Keywords" page.
  236. ;
  237. ; 2008-12-19 LIG Changes for build 198 (7.98):
  238. ; Added "svga" to the list of returned values for _VIDEO.
  239. ; Added @COM function and _SBDSP variable.
  240. ; Updated the "Keywords" page.
  241. ;
  242. ; 2008-12-29 LIG Changes for build 199 (7.99):
  243. ; Updated the _CPU, _NPU, _CPUSPEED and Copyright pages
  244. ; (renamed the later to Legal).
  245. ;
  246. ; 2009-2-27 LIG Changes for build 200 (8.00):
  247. ; Added SETERROR.
  248. ; Added /N option to ATTRIB.
  249. ; Added @ISLOWER and @ISUPPER functions.
  250. ; Updated the "Keywords" page.
  251. ;
  252. ; 2015-9-30 JOS Updated the 4DOS help text to reflect 4DOS' use in vDos.
  253. ; 2016-10-8 WEN Updated the 4DOS help text to reflect 4DOS' use in
  254. ; vDosPlus instead of original vDos.
  255. ;---------------------------------------------------------------------------
  256. !WIDTH 80
  257. !FIRST 1
  258. !KEYS 13
  259. !EXTERNAL HELP.COM DOSHELP
  260. !INDENT 0
  261. ;---------------------------------------------------------------------------
  262. !TOPIC 1 Table of Contents
  263. !NOINDEX
  264. Welcome to the 124DOS help system in 060vDosPlus.
  265. Select a topic area:
  266. !NOWRAP
  267. Using 4DOS 031Using the Command Line
  268. 592Commands by Category
  269. 071File Selection
  270. 047Directory Navigation
  271. 3514DOS.INI
  272. 046Other Features
  273. Aliases and Batch Files 101Aliases
  274. 102Batch Files
  275. The Environment 131Using the Environment
  276. 161Internal Variables
  277. 241Variable Functions
  278. Setup and Troubleshooting 352Starting 4DOS
  279. 719Error Messages
  280. 751Compatibility
  281. 720Troubleshooting
  282. Reference Information 941File Systems and File Name Conventions
  283. 891Miscellaneous Reference Information
  284. 911ASCII and Key Codes
  285. 920An Embarrassment of Riches
  286. 971Glossary
  287. 011Legal
  288. !WRAP
  289. ;;version
  290. [2017-03-15 WEN -- 8.00]
  291. ;---------------------------------------------------------------------------
  292. ; Topic equates for index ---------------------------------------------
  293. !TOPIC 1001 =31 Cmd Line
  294. !INDEX 1
  295. !TOPIC 1002 =71 File Sel
  296. !INDEX 2
  297. !TOPIC 1003 =47 Dir Nav
  298. !INDEX 3
  299. !TOPIC 1004 =46 Other Feat
  300. !INDEX 4
  301. !TOPIC 1005 =592 Commands
  302. !INDEX 5
  303. !TOPIC 1006 =101 Aliases
  304. !INDEX 6
  305. !TOPIC 1007 =102 Batch File
  306. !INDEX 7
  307. !TOPIC 1008 =131 Environ
  308. !INDEX 8
  309. !TOPIC 1009 =161 Variables
  310. !INDEX 9
  311. !TOPIC 1010 =241 Functions
  312. !INDEX 10
  313. !TOPIC 1011 =351 4DOS.INI
  314. !INDEX 11
  315. !TOPIC 1012 =352 Startup
  316. !INDEX 12
  317. !TOPIC 1014 =719 Errors
  318. !INDEX 14
  319. !TOPIC 1015 =751 Compat
  320. !INDEX 15
  321. !TOPIC 1017 =720 Support
  322. !INDEX 17
  323. !TOPIC 1018 =12 Help Sys
  324. !INDEX 18
  325. !TOPIC 1019 =16 DOS Help
  326. !INDEX 19
  327. !TOPIC 1020 =941 File Sys
  328. !INDEX 20
  329. !TOPIC 1021 =891 Reference
  330. !INDEX 21
  331. !TOPIC 1022 =911 Codes
  332. !INDEX 22
  333. !TOPIC 1024 =971 Glossary
  334. !INDEX 24
  335. !TOPIC 1025 =11 Legal
  336. !INDEX 25
  337. ;---------------------------------------------------------------------------
  338. !TOPIC 11 Legal
  339. !NOINDEX
  340. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
  341. ³ Help Text Copyright 1988-2004, JP Software Inc., Worton, MD, USA ³
  342. ³ Changes Charles Dye 2004-2006 ¿JP Software is not responsible for any ³
  343. ³ & Luchezar Georgiev 2006-2009. ³ inaccuracies introduced in this text. ³
  344. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  345. The help system is based on an extensively modified version of the TPHELP
  346. unit from TurboPower Software's Turbo Professional 5.2 Turbo Pascal toolkit.
  347. Portions Copyright 1985-1986 Sunny Hill Software.
  348. !LINE
  349. Portions Copyright 1987-1992 TurboPower Software  Aristocrat Leisure Ltd.
  350. Portions Copyright 1987-1992 Borland Software Corporation.
  351. Software Copyright 1988-2004 Rex Conn and JP Software Inc.
  352. !LINE
  353. Portions Copyright 1983-2002 Watcom International Corporation  Sybase Inc.
  354. !LINE
  355. Portions Copyright 1985-1992 Microsoft Corporation.
  356. !LINE
  357. Portions Copyright 1991-1992 RSA Data Security Inc.
  358. !LINE
  359. Portions Copyright 1995-2004 The Internet Society.
  360. !LINE
  361. Portions Copyright 1996-2000 Vladimir Zakharychev.
  362. !LINE
  363. Portions Copyright 1991-1995 Mix Software Inc.
  364. Updates 2006-2009 Luchezar Georgiev and Jaelani Utomo
  365. 4DOS and 0204NT are trademarks of 732JP Software Inc. for its family
  366. of character- mode command processors. 4DOS and 20Take Command are
  367. registered trademarks of JP Software Inc. JP Software, jpsoft.com, and all
  368. JP Software's designs and logos are also trademarks of JP Software Inc. All
  369. other trademarked product and company names are the property of their
  370. respective trademark holders.
  371. ;---------------------------------------------------------------------------
  372. !TOPIC 12 The 4DOS Help System
  373. !NOINDEX
  374. For information on using the help system see:
  375. 013Help Keys
  376. 014Help Reference
  377. 015Using the Mouse
  378. 0004DOS Help Index
  379. 016External (DOS) Help
  380. ;---------------------------------------------------------------------------
  381. !TOPIC 13 Help Keys
  382. !NOINDEX
  383. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
  384. ³ Scroll down  ³ Next link Tab,  ³
  385. ³ Scroll up  ³ Prev link Shift-Tab,  ³
  386. ³ Next page PgDn, Space ³ Select link Enter ³
  387. ³ Prev page PgUp ³ ³
  388. ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  389. ³ Back up / exit Esc, Ctrl-B ³ Next topic F8, Ctrl  ³
  390. ³ Quick exit Alt-F4, Ctrl-C ³ Prev topic F7, Ctrl  ³
  391. ³ Exit, no clear Alt-X ³ ³
  392. ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  393. ³ Search topic F5, Ctrl-F ³ Go to index F1 ³
  394. ³ Search all F6, Ctrl-G ³ Go to ToC F2 ³
  395. ³ Search again Shift-F5/F6, Ctrl-N ³ External help F4 ³
  396. ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  397. ³ Print topic F9, Ctrl-P ³ (Go to keys) F3 ³
  398. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  399. Press Esc to return; press Enter or 014click here for more information.
  400. ;---------------------------------------------------------------------------
  401. !TOPIC 14 Help Reference
  402. !NOINDEX
  403. The 4DOS help system includes complete help for all 4DOS internal commands
  404. and most 4DOS features, and can allow you to load the DOS help system for
  405. help on DOS external commands. The information is fully cross-referenced,
  406. so you can move easily among related commands.
  407. This section explains in detail how to use and configure the 4DOS help
  408. system. The help system is easy to navigate and uses standard keystrokes
  409. or mouse clicks to move between the table of contents, help text, and
  410. cross-referenced topics. In most cases you'll be able to find what you
  411. want by experimenting, without studying the details below. However if you
  412. want to know what shortcuts are built into the system, reconfigure it to
  413. your liking, or see the full range of options available, then read on.
  414. For information on using the mouse see 015Using the Mouse. For
  415. information on customization options for use with the 380HelpOptions
  416. directive in 4DOS.INI, see the end of this section.
  417. The help system supports most screen heights, and will adjust the height of
  418. the help index and text display to match the height of your screen. The
  419. width of the help text display is fixed at 80 characters. To modify the
  420. help colors see the section on HELPCFG below.
  421. Starting the Help System
  422. To start the help system and go to the table of contents, press F1 or
  423. type HELP at the 4DOS prompt.
  424. If you type part or all of a command on the line before you press F1, the
  425. help system will provide "context-sensitive" help by using the first word on
  426. the line as a help topic. If it's a valid topic, you will see help for that
  427. topic automatically; if not, you will see the help table of contents and
  428. you can pick the topic you want.
  429. You can also invoke help for the word immediately above (or immediately to
  430. the left of) the cursor by pressing Ctrl-F1. (This can be useful when you
  431. need the syntax for a variable function.)
  432. You can get help on a specific command by entering the command HELP
  433. <command name]> (for example, HELP COPY) at the 4DOS prompt. You can use
  434. this feature to obtain help on any topic -- not just on commands. For
  435. example, if you enter the command HELP _DOSVER you will see help for the
  436. _DOSVER internal variable.
  437. Quick Help
  438. If you type the name of any internal command at the prompt, followed by a
  439. slash and a question mark [e.g. COPY /?] then you will see help for the
  440. command in a "quick-reference" style. Output from a /? display may be
  441. redirected with > or >>.
  442. The /? option may not work correctly if you have used an alias to
  443. redefine how an internal command operates. To view the /? help for
  444. such a command you must add an asterisk to the beginning of the command to
  445. disable alias processing. For example, if you have defined this alias:
  446. alias copy *copy /r
  447. then the command COPY /? will be translated to COPY /R /?, which will not
  448. work properly. However, if you use *COPY /?, the alias will be ignored and
  449. the /? will work as you intended.
  450. Using the Keyboard
  451. The following keys can be used within the HELP system (see 013Help Keys
  452. for a quick-reference chart):
  453. !NOWRAP
  454. F1 Display the help index.
  455. PgDn Display the next page of text for the current topic.
  456. or Space
  457. PgUp Display previous page of text for the current topic.
  458.  Select the next cross-reference, or scroll one line
  459. toward the bottom of the topic (see below).
  460.  Select the previous cross-reference, or scroll one
  461. line toward the top of the topic (see below).
  462. Tab Select the next cross-reference.
  463. or 
  464. Shift-Tab Select the previous cross-reference.
  465. or 
  466. Enter Switch to the selected cross-reference topic.
  467. F8 Display help for the next topic in the index.
  468. or Ctrl 
  469. F7 Display help for the previous topic in the index.
  470. or Ctrl 
  471. F5 Find a string in the current help topic (a topic search).
  472. or Ctrl-F
  473. F6 Find a string in any help topic (a global search).
  474. or Ctrl-G
  475. Shift-F5 Find the next occurrence of the search string.
  476. or Ctrl-N
  477. F9 Print the current topic.
  478. or Ctrl-P
  479. Esc Go back to the last topic you viewed (the help system
  480. or Ctrl-B saves the last 15 topics). If there is no previous
  481. topic, exit from the help system.
  482. Alt-F4 Exit the help system immediately, without returning to
  483. or Ctrl-C the index or Table of Contents.
  484. Alt-X Exit the help system without restoring the screen
  485. (leaves the topic you were viewing visible after you
  486. exit).
  487. !WRAP
  488. F9 or Ctrl-P will print the topic on LPT1 at 58 lines per page. You
  489. can select another output device or file if you wish (you will be prompted
  490. for the output device each time you print a topic).
  491. If there are any cross-references highlighted in the text you can use the
  492. Tab and arrow keys (Tab, Shift-Tab, , or ) to select a topic, and
  493. <Enter> to switch to the selected topic.
  494. You can also move between cross-reference topics by typing text which
  495. matches a topic name.
  496. You can use F5 or Ctrl-F to search the current topic for a string, and
  497. F6 or Ctrl-G to search all topics, starting with the current topic (a
  498. "global" search). Shift-F5 or Ctrl-N continues either type of
  499. search. The search is not case sensitive. If the string is found, the line
  500. containing it is highlighted with marks ( ) at either end. If the
  501. string is not found, the help program beeps.
  502. The Esc Key
  503. Pressing Esc or Ctrl-B will "backtrack" through the most recent 15
  504. help topics you have viewed. As you back up through the list each topic
  505. will be displayed at the same screen position it was at when you last saw
  506. it. When you "back up" from the Table of Contents, or the first topic you
  507. viewed, the help system exits.
  508. The default behavior of the Esc key allows you to navigate through a
  509. hierarchy of topics and quickly back up to previous screens. If you
  510. prefer, you can change the default so that Esc does not back up
  511. through previous topics, and always returns immediately to the first
  512. topic shown (the table of contents or index), or exits completely if
  513. HELP was started with an explicit topic. To do so, add the /E switch
  514. to the 380HelpOptions directive in 4DOS.INI (see below for additional
  515. details on help system options). If you use /E, you can still back up
  516. to previous topics with Ctrl-B. Using /E also affects the right mouse
  517. button, which always has the same effect as the Esc key.
  518. The  and  Arrow Keys
  519. The  and  keys normally move the cross-reference highlight in the
  520. appropriate direction. Once the highlight is at the first or last
  521. cross-reference on the screen, the screen begins to scroll. This allows
  522. you to scroll through long cross-reference lists easily. If you want to
  523. change the behavior of the arrow keys so that they always scroll the text
  524. immediately, without moving the cross-reference highlight, add the /L
  525. switch to the 380HelpOptions directive in 4DOS.INI (see below for
  526. additional details on help system options). If you use /L, you can still
  527. move the cross-reference highlight with , , Tab, or Shift-Tab.
  528. Using the Index
  529. While in the index, pressing an alphabetic key will move the highlighted box
  530. to the first topic starting with that letter. If you continue to press
  531. alphabetic keys the string being entered will be displayed at the lower left
  532. of the screen and the highlight bar will be placed on the first topic that
  533. matches the entered string, moving, if necessary, to a new topic as the
  534. string is being entered.
  535. If a character is entered that results in no matching topic, the entered
  536. string will be reset and the highlight bar will be placed on the first
  537. topic that begins with that letter.
  538. Pressing <Enter> selects the highlighted help topic and displays the
  539. appropriate text.
  540. Changing the Help Colors
  541. The HELPCFG.EXE program included with 4DOS allows you to customize the HELP
  542. colors. To use it, just change to your 4DOS directory, enter the command
  543. HELPCFG, and follow the instructions it displays. To force HELPCFG to adjust
  544. the monochrome HELP colors, even if you are using a color system, use the
  545. command HELPCFG /M to start the program.
  546. Help System Options
  547. You can set several options for the help system, see 380HelpOptions
  548. for the options.
  549. For example, if you want HELP to use a monochrome display and disable the
  550. mouse by default, you could include the following line in your 4DOS.INI
  551. file:
  552. HelpOptions = /M /X
  553. You can include the same options on the HELP command line if you
  554. wish. Options used on the HELP command line will override any that are set
  555. in the 4DOS.INI file. For example, to obtain help on the COPY command, and
  556. disable the mouse, you could use this command:
  557. c:\> help /x copy
  558. You can also use the 384InstallPath directive in your 3514DOS.INI file
  559. to inform 4DOS of the location of the HELP files (4HELP.EXE and 4DOS.HLP). If
  560. you don't use the InstallPath directive, the HELP program must be in the
  561. current directory or in one of the directories specified in your 138PATH
  562. setting. If you use the InstallPath directive, the HELP command will
  563. generally respond more quickly because 4DOS won't have to search the
  564. directories in your PATH setting to find the help files.
  565. ;---------------------------------------------------------------------------
  566. !TOPIC 15 Using the Mouse
  567. !NOINDEX
  568. This topic covers mouse usage in the HELP system. For general information
  569. on the help system, including keyboard usage, see 014Help Reference.
  570. The mouse is fully supported in this help system. It can be used to scroll
  571. the display, select a cross-reference topic, and perform other actions.
  572. When the table of contents or index is displayed, you can highlight a topic
  573. by positioning the mouse cursor on the topic and pressing the left
  574. button. Pressing the left button a second time on that topic will display
  575. the help text.
  576. Once in the help screen, most standard keyboard actions can be selected with
  577. the mouse by placing the mouse cursor on the appropriate section of the
  578. "button bar" at the bottom of the screen and pressing the left button.
  579. Pressing the left mouse button while highlighting the diamond in the upper
  580. left corner will exit to the menu or the 4DOS prompt.
  581. Pressing the right mouse button will back up through the topics you have
  582. viewed, then exit to the menu or the 4DOS prompt (like the Esc key). If
  583. you use the /E switch to change Esc so it returns to the table of
  584. contents or exits immediately, the behavior of the right mouse button will
  585. change as well. See 014Help Reference for details on /E.
  586. Pressing the left and right buttons together will display the help index.
  587. When the topic you are viewing is longer than one screen, you can move
  588. through the text by placing the mouse cursor on the "scroll bar" at the
  589. right side of the screen and pressing the left button. A "slider" is
  590. displayed in the scroll bar to show the relative position of the current
  591. page of text within the topic. Different parts of the scroll bar can be
  592. used to move the text by lines or pages, or to "drag" it vertically within
  593. the window. The action taken depends on where the mouse cursor is when you
  594. press the left button:
  595. Mouse cursor position Action of left button
  596. --------------------- ---------------------
  597. On the  at the bottom Scroll down one line
  598. On the  at the top Scroll up one line
  599. Below the slider Move down one page
  600. Above the slider Move up one page
  601. On the slider Drag the slider and the text in
  602. either direction
  603. If you hold the button down while scrolling by line, the scrolling will
  604. be repeated until the beginning or end of the topic is reached. If you
  605. hold the button down while paging from the scroll bar, the paging will be
  606. repeated until the slider reaches or moves past the mouse cursor.
  607. To make the scroll bar easier to "hit" with the mouse, the help system
  608. responds to mouse clicks in the column immediately to the left of the scroll
  609. bar as if they had taken place in the scroll bar itself.
  610. ;---------------------------------------------------------------------------
  611. !TOPIC 16 External Help
  612. !NOINDEX
  613. 65535Select this link to invoke the external DOS help program.
  614. You must specify its location in the 145DOSHELP environment variable
  615. before 4DOS help can find it.
  616. You can not put parameters after the file name; the DOSHELP variable
  617. must be set to the path and file name only.
  618. ;---------------------------------------------------------------------------
  619. !TOPIC 17 OPTION Dialog Keys
  620. !NOINDEX
  621. General
  622. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
  623. ³ Next control Tab ³ Menu bar F10 ³
  624. ³ Previous control Shift-Tab ³ Field help F1 ³
  625. ³ Select control Space ³ Close menu Esc ³
  626. ³ Navigate menus &     ³ Exit OPTION Ctrl-C, ³
  627. ³ list-boxes ³ Alt-F4 ³
  628. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  629. Data entry fields
  630. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
  631. ³ Move through text   ³ Beginning of field Home, Ctrl  ³
  632. ³ Delete character Backspace ³ Clear field Ctrl-Home ³
  633. ³ Insert/Overstrike Insert ³ Clear field to end Ctrl-End ³
  634. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  635. Press Esc to return; press Enter or 018click here for more information.
  636. ;---------------------------------------------------------------------------
  637. !TOPIC 18 OPTION Reference
  638. !NOINDEX
  639. This section describes how to use the OPTION dialogs to change 4DOS
  640. configuration settings. The dialogs are run by using the 648OPTION
  641. command.
  642. Each setting in the dialogs corresponds to a directive in the 4DOS.INI
  643. file. If you save the changes made in the dialogs, 4DOS.INI will be
  644. updated automatically (additional details are below).
  645. See 017OPTION Dialog Keys for a summary of the keys that can be used in
  646. OPTION.
  647. Menu bar
  648. You can access the menu bar at the top of the screen in one of three
  649. ways: Selecting a menu item with the left mouse button, hitting F10, or
  650. holding down the Alt key while typing one of the highlighted letters
  651. (i.e. Alt-X for Exit, Alt-C for Configure, or Alt-H for help). Once the
  652. menu is active, you can move the selection bar between the items with the
  653. arrow keys.
  654. As you move the selection bar from item to item in a menu, the status
  655. bar at the bottom of the screen will show a description of the currently
  656. highlighted item. Hitting Esc while in a menu will return you to the
  657. dialog area. Pressing Enter selects the menu item.
  658. The main menu items are Exit, Configure, and Help. The Exit sub-menu
  659. displays three options for leaving the program: Save, Use, and Cancel. For
  660. an explanation each option, see the Exiting OPTION topic below.
  661. The Configure menu lists the major categories of options. Selecting a
  662. category will change the dialog area of the screen to allow you to
  663. modify that group of options.
  664. The Help menu allows you to access this help topic and the help file
  665. Table of Contents, as well as additional information on the 4DOS.INI
  666. directive corresponding to the current option, the 4DOS.INI file in
  667. general, and the keys that can be used to navigate the OPTION dialogs.
  668. Dialogs
  669. The dialog area displays "controls" (numeric values, check boxes, etc.)
  670. which allow you to modify specific 4DOS configuration settings.
  671. In addition to displaying a short description of the current option,
  672. the status bar at the bottom of the screen contains the corresponding
  673. 4DOS.INI directive name enclosed in brackets.
  674. You can use the Tab key to move forward (down or right) and Shift-Tab to
  675. move backward through the controls. In addition, each control has a
  676. highlighted letter which represents its hot key. By holding down Alt
  677. and striking the hot key, the appropriate control will be selected.
  678. The integer and text controls are simple data entry fields. You can use
  679. the keyboard to edit the information contained in the data area; see
  680. 017OPTION Dialog Keys for the keys that can be used.
  681. Check box controls are represented by brackets "[ ]", which either have
  682. an X or a blank space between them. When a check box contains an X,
  683. the 4DOS.INI directive will be given the value of "Yes"; if it is blank,
  684. the directive will be assigned "No." You can toggle the value of a
  685. check box by selecting it with the spacebar.
  686. Radio buttons are represented by parentheses "( )" and are found in
  687. groups of two or more controls. Only one radio button in a group may be
  688. active, signifying the current value of the option, and this is
  689. indicated by the character "". To change the selection, use Tab or
  690. Shift-Tab to move to the value you want selected, and press the spacebar.
  691. "Combo boxes" look like a text field followed by a down arrow symbol
  692. []. However, a combo box is not editable because the directive it
  693. represents can only be assigned one of a specific set of values. When a
  694. combo box is active, pressing the spacebar or the down arrow [] will
  695. display this set in a list and allow you to choose a value. Once the list is
  696. displayed, you can move a selection bar within it by using the up and
  697. down arrows [], PageUp, PageDown, End, Home, or by typing the
  698. first character of an item in the list. You can then select that value with
  699. the spacebar. The list will disappear when you Tab to a different
  700. control or hit the left arrow key.
  701. Using the Mouse
  702. The mouse is supported when OPTION is run in 80 column mode. It can be
  703. used to select controls, menu items, and buttons, and to perform other
  704. actions. (On screens wider than 80 columns you can use the keyboard to
  705. control OPTION.)
  706. To select a control or menu item, position the mouse cursor on it and
  707. press the left mouse button. The color of the text for that item will
  708. change to show that it is active.
  709. When selecting a text or numeric field, clicking on the text preceeding
  710. the entry field will position the cursor at the left edge of the field. You
  711. can put the cursor elsewhere by clicking on a location inside the
  712. data entry field. A numeric field may also have "spin buttons"; arrow
  713. controls which can be clicked on to increment [] or decrement [] the
  714. value in the field. The value used to raise or lower the number in the
  715. field is different for each numeric field.
  716. Selecting a check box with the mouse will toggle the setting. Selecting
  717. a radio button option will turn on that option and turn off the others.
  718. Selecting a combo box control will drop the list to allow you to choose
  719. a setting. You can also display the list by clicking on the []
  720. character to the right of the list box.
  721. You can move through the selections in a combo box list with the "scroll
  722. bar" at the right side of the list. You can use the arrows at the top
  723. and bottom of the scroll bar to move a line at a time; click above or
  724. below the "slider" to move a page at a time; or drag the slider for
  725. continuous scrolling. To select an item in the list, click on it with
  726. the left mouse button.
  727. You can close an open list by clicking on the [] character or by
  728. selecting another control or menu item.
  729. Exiting OPTION
  730. When you are finished modifying the 4DOS options you can exit the
  731. program by selecting Exit on the main menu, or by typing Ctrl-C or
  732. Alt-F4.
  733. When you use the Exit selection on the menu bar you can select Save
  734. to save your changes in 4DOS.INI for use in the current session and all
  735. future sessions, Use to use your changes in the current session only,
  736. or Cancel to discard the changes.
  737. Save saves all changes since the last Save, or since the last time
  738. you started 4DOS. If you run OPTION and exit with
  739. Use, any changes will not be saved in the .INI file at that time. However,
  740. if you run OPTION again and exit with Save, any earlier
  741. changes will automatically be saved in 4DOS.INI along with any new
  742. changes.
  743. Using Ctrl-C or Alt-F4 to exit OPTION displays a popup box containing a
  744. button for each of the options found on the exit menu. There is an
  745. additional button, labeled Resume, which will return you to the OPTION
  746. dialogs without affecting 4DOS.INI or the current session. You can
  747. choose a button with the arrow keys or Tab and select it with the
  748. spacebar or Enter, or click on it with the left mouse button.
  749. In most cases, changes you make in the Startup section of the OPTION
  750. dialogs or notebook will only take effect when you restart the vDosPlus
  751. session.
  752. Other changes take effect as soon as you exit the dialogs or notebook
  753. with Save or Use. However, not all option changes will appear
  754. immediately, even if they have taken effect. For example, some color
  755. changes will only appear after a 604CLS command.
  756. ;---------------------------------------------------------------------------
  757. !TOPIC 20 4NT and Take Command
  758. !NOINDEX
  759. 4NT is the old name (before version 9) of the Take Command Console (TCC),
  760. a powerful alternative to the 25Windows NT line command processor
  761. (CMD.EXE) that enhances most of its standard commands and adds a wide
  762. variety of new ones.
  763. Take Command offers a new approach to working in Windows that brings users
  764. the "best of both worlds." It is a powerful command line utility, fully
  765. integrated into the Windows graphical environment.
  766. Visit http://jpsoft.com for up-to-date features, system requirements and
  767. pricing and ordering information.
  768. ;---------------------------------------------------------------------------
  769. !TOPIC 25 The Windows NT Line
  770. !NOINDEX
  771. Microsoft's Windows NT line includes Windows NT, 2000, XP, Server 2003,
  772. Vista, Server 2008 and 7. Unlike Windows ME, 98, 95 and earlier Windows
  773. versions, these operating systems do not contain or require an underlying
  774. MS-DOS layer; they instead include a DOS emulation system which is loaded as
  775. needed.
  776. 4DOS is a DOS-based program; it was not designed for Windows NT. It can be
  777. run under the NT line, but with some limitations. Files and directories with
  778. extremely long DOS-compatible filenames, or without DOS-compatible filenames,
  779. will be inaccessible. Long filename support is disabled by default, and must
  780. be explicitly enabled through an .INI directive. Very large or deeply-nested
  781. directories may cause out-of-memory errors. 4DOS does not support internet
  782. files, Windows file associations, graphical controls, or true pipes. 4DOS
  783. is also unable to access the clipboard under Windows NT.
  784. 0204NT and Take Command are the preferred command shells for Windows
  785. NT. They were designed for these systems, and do not suffer from the
  786. DOS-imposed limitations of 4DOS.
  787. ;---------------------------------------------------------------------------
  788. ;OPTION equates (for help from OPTION)
  789. !TOPIC 27 =17 OPTKEYS
  790. !NOINDEX
  791. !TOPIC 28 =18 OPTHELP
  792. !NOINDEX
  793. ;---------------------------------------------------------------------------
  794. !TOPIC 31 Using the Command Line
  795. !NOINDEX
  796. 4DOS displays a c:\> prompt when it is waiting for you to enter a
  797. command. (The actual text depends on the current drive and directory as
  798. well as your PROMPT settings.) This is called the command line and the
  799. prompt is asking you to enter a command, an alias or batch file name, or the
  800. instructions necessary to begin an application program.
  801. This section explains the features that will help you while you are typing
  802. in commands, and how keystrokes are interpreted when you enter them at the
  803. command line. The keystrokes discussed here are the ones normally used by
  804. 4DOS. If you prefer using different keystrokes to perform these functions,
  805. you can assign new ones with 481Key Mapping Directives in 4DOS.INI.
  806. The standard command line features documented in this section are:
  807. 032Command-Line Editing
  808. 033Command History and Recall
  809. 034Command History Window
  810. 058Command Names and Parameters
  811. 035Filename Completion
  812. 039Automatic Directory Changes
  813. 040Directory History Window
  814. 041Multiple Commands
  815. 042Expanding and Disabling Aliases
  816. 043Command Line Help
  817. 117Command Parsing
  818. 118Argument Quoting
  819. 044Command Line Length Limits
  820. Additional command-line features are documented under 071File Selection
  821. and 047Directory Navigation.
  822. ;---------------------------------------------------------------------------
  823. !TOPIC 32 Command-Line Editing
  824. !NOINDEX
  825. The command line works like a single-line word processor, allowing you to
  826. edit any part of the command at any time before you press Enter to
  827. execute it, or Esc to erase it.
  828. The command line you enter can be up to 511 characters long.
  829. You can use the following editing keys when you are typing a command (the
  830. words Ctrl and Shift mean to press the Ctrl or Shift key together
  831. with the other key named):
  832. !NOWRAP
  833. Cursor Movement
  834. Left arrow Move the cursor left one character.
  835. Right arrow Move the cursor right one character.
  836. Ctrl-Left Move the cursor left one word.
  837. Ctrl-Right Move the cursor right one word.
  838. Home Move the cursor to the beginning of the line.
  839. End Move the cursor to the end of the line.
  840. Insert and Delete
  841. Ins Toggle between insert and overstrike mode.
  842. Del Delete the character at the cursor.
  843. Backspace Delete the character to the left of the cursor.
  844. Ctrl-L Delete the word or partial word to the left of
  845. the cursor.
  846. Ctrl-R Delete the word or partial word to the right
  847. (or Ctrl-Bksp) of the cursor.
  848. Ctrl-Home Delete from the beginning of the line to the
  849. cursor.
  850. Ctrl-End Delete from the cursor to the end of the line.
  851. Esc Delete the entire line.
  852. Ctrl-V Insert the first line in the clipboard.
  853. Marking Text
  854. Shift-Left Mark the character to the left.
  855. Shift-Right Mark the character to the right.
  856. Shift-Home Mark from the beginning of the line to the
  857. cursor.
  858. Shift-End Mark from the cursor to the end of the line.
  859. Ctrl-Shift-Left Mark the word to the left.
  860. Ctrl-Shift-Right Mark the word to the right.
  861. Ctrl-Y Copy the marked text to the clipboard
  862. (Windows only).
  863. Execution
  864. Ctrl-C Cancel the command line.
  865. (or Ctrl-Break)
  866. Enter Execute the command line.
  867. Ctrl-F5 Toggle batch debug mode.
  868. !WRAP
  869. Most of the command-line editing capabilities are also available when a
  870. 4DOS command prompts you for a line of input. For example, you can use
  871. the command-line editing keys when 611DESCRIBE prompts for a file
  872. description, when 636INPUT prompts for input from an alias or batch
  873. file, or when 640LIST prompts you for a search string.
  874. If you want your input at the command line to be in a different color from
  875. 4DOS's prompts or output, you can use the Display page of the 648OPTION
  876. dialogs, or the 465InputColors directive in 4DOS.INI.
  877. 4DOS will prompt for additional command-line text when you include the
  878. escape character as the very last character of a typed command
  879. line. The default escape character is Ctrl-X
  880. (see 086Escape Character.) For example,
  881. c:\> echo The quick brown fox jumped over the lazy
  882. More? sleeping dog. > alphabet
  883. Sometimes you may want to enter one of the command line editing
  884. keystrokes on the command line, instead of performing the key's usual action.
  885. For example, suppose you have a program that requires a Ctrl-R character on
  886. its command line. Normally you couldn't type this keystroke at the prompt,
  887. because it would be interpreted as a "Delete word right" command.
  888. To get around this problem, use the special keystroke Alt-255. You enter
  889. Alt-255 by holding down the Alt key while you type 255 on the numeric
  890. keypad, then releasing the Alt key (you must use the number keys on the
  891. numeric pad; the row of keys at the top of your keyboard won't work). This
  892. forces 4DOS to interpret the next keystroke literally and places it on the
  893. command line, ignoring any special meaning it would normally have as a
  894. command-line editing or history keystroke. You can use Alt-255 to suppress
  895. the normal meaning of command-line editing keystrokes even if they have been
  896. reassigned with key mapping directives in the .INI file (see
  897. 351.INI File), and Alt-255 itself can be reassigned with the
  898. 513CommandEscape directive.
  899. ;---------------------------------------------------------------------------
  900. !TOPIC 33 Command History and Recall
  901. !NOINDEX
  902. Command History Keys
  903. !NOWRAP
  904. Up Arrow Recall the previous (or most recent) command, or
  905. the most recent command that matches a partial
  906. command line.
  907. Down Arrow Recall the next (or oldest) command, or the oldest
  908. command that matches a partial command line.
  909. F3 Fill in the rest of the command line from the
  910. previous command, beginning at the current cursor
  911. position.
  912. Ctrl-D Delete the currently displayed history list entry,
  913. erase the command line, and display the previous
  914. (matching) history list entry.
  915. Ctrl-E Display the last entry in the history list.
  916. Ctrl-K Save the current command line in the history list
  917. without executing it, and then clear the command
  918. line.
  919. Ctrl-Enter Copy the current command line to the end of the
  920. history list even it has not been altered, then
  921. execute it.
  922. @ As the first character in a line: Do not save the
  923. current line in the history list when it is
  924. executed, or store it in the 132CMDLINE environment
  925. variable. This allows you to squeeze out the last
  926. few bytes of environment space before loading TSRs by
  927. prefacing each TSR command with an "@".
  928. !WRAP
  929. Use the Up Arrow key repeatedly to scan back through the history list.
  930. When the desired command appears, press Enter to execute it again. After
  931. you have found a command, you can edit it before pressing Enter. See
  932. 034Command History Window for information on viewing previous commands in
  933. a popup window.
  934. The history list is normally "circular." If you move to the last command in
  935. the list and then press the down arrow one more time, you'll see the first
  936. command in the list. Similarly, if you move to the first command in the
  937. list and then press the up arrow one more time, you'll see the last command
  938. in the list. You can disable this feature and make command history recall
  939. stop at the beginning or end of the list by turning off the History Wrap
  940. selection on the Command Line page of the 648OPTION dialogs, or setting
  941. 435HistWrap to No in the .INI file.
  942. You can search the command history list to find a previous command quickly
  943. using command completion. Just enter the first few characters of the
  944. command you want to find and press Up Arrow. If you press the Up Arrow
  945. key a second time, you will see the previous command that matches. The
  946. system will beep if there are no matching commands. The search process
  947. stops as soon as you type one of the editing keys, whether or not the line
  948. is changed. At that point, the line you're viewing becomes the new line to
  949. match if you press Up Arrow again.
  950. You can specify the size of the command history list on the Command
  951. Line page of the 648OPTION dialogs, or with the 382History
  952. directive in 4DOS.INI. When the list is full, the oldest commands
  953. are discarded to make room for new ones. You can also use the
  954. 433HistMin directive in 4DOS.INI to enable or disable history
  955. saves and to specify the shortest command line that will be saved.
  956. You can prevent any command line from being saved in the history by
  957. beginning it with an at sign [@].
  958. When you execute a command from the history, that command remains in the
  959. history list in its original position. The command is not copied to the
  960. end of the list (unless you modify it). If you want each command to be
  961. copied or moved to the end of the list when it is re-executed, set
  962. 431HistCopy or 434HistMove to Yes in 4DOS.INI. If you select either of
  963. these options, the list entry identified as "current" (the entry from which
  964. commands are retrieved when you press Up Arrow) is also adjusted to
  965. refer to the end of the history list after each recalled command is executed.
  966. Local and Global Command History
  967. The command history can be stored in either a "local" or "global" list.
  968. With a local command history list, any changes made to the history will only
  969. affect the current copy of 4DOS. They will not be visible in other shells,
  970. or other sessions. A local command history list is the default.
  971. With a global command history list, all copies of 4DOS will share the same
  972. command history, and any changes made to the history in one copy will affect
  973. all other copies.
  974. You can control the type of command history on the Startup page of the
  975. 648OPTION dialogs, with the 388LocalHistory directive in 4DOS.INI and with
  976. the /L and /LH 352startup options.
  977. There is no fixed rule for deciding whether to use a local or global command
  978. history list. Depending on your work style, you may find it most convenient
  979. to use one type, or a mixture of types in different sessions or shells. We
  980. recommend that you start with the default approach for your 4DOS, then
  981. modify it if you find a situation where the default is not convenient.
  982. 4DOS can share a global command history list among a parent 4DOS shell and
  983. any child shells you start from that parent shell. For example, if you
  984. start an application, and then "shell to DOS" from the application, the
  985. original copy of 4DOS and the child shell can share the global command
  986. history.
  987. ;---------------------------------------------------------------------------
  988. !TOPIC 34 Command History Window
  989. !NOINDEX
  990. Command History Window Keys
  991. !NOWRAP
  992. PgUp or PgDn (from the command line) Open the command history
  993. window.
  994. Up Arrow Scroll the display up one line.
  995. Down Arrow Scroll the display down one line.
  996. Left Arrow Scroll the display left 4 columns.
  997. Right Arrow Scroll the display right 4 columns.
  998. PgUp (inside the window) Scroll the display up one
  999. page.
  1000. PgDn (inside the window) Scroll the display down one
  1001. page.
  1002. Ctrl-PgUp Go to the beginning of the history list.
  1003. (or Home)
  1004. Ctrl-PgDn Go to the end of the history list.
  1005. (or End)
  1006. Ctrl-D Delete the selected line from the history list.
  1007. Enter Execute the selected line.
  1008. Ctrl-Enter Move the selected line to the command line for
  1009. editing.
  1010. !WRAP
  1011. You can view the command history in a scrollable window, and select the
  1012. command to modify or re-execute from those displayed in the window. To
  1013. activate the command history window press PgUp or PgDn at the command
  1014. line. A window will appear in the upper right corner of the screen, with
  1015. the command you most recently executed marked with a highlight. (If you
  1016. just finished re-executing a command from the history, then the next command
  1017. in sequence will be highlighted.)
  1018. Once you have selected a command in the history window, press Enter to
  1019. execute it immediately, or Ctrl-Enter to move the line to the prompt for
  1020. editing (you cannot edit the line directly in the history window).
  1021. You can bring up a "filtered" history window by typing some characters on
  1022. the command line, then pressing PgUp or PgDn. Only those commands matching
  1023. the typed characters will be displayed in the window.
  1024. 4DOS also supports the mouse in popup windows.
  1025. See 894Popup Windows for information on customizing window position,
  1026. size, and color.
  1027. ;---------------------------------------------------------------------------
  1028. !TOPIC 35 Filename/Variable Completion
  1029. !NOINDEX
  1030. Filename Completion Keys
  1031. !NOWRAP
  1032. F8 Get the previous matching filename.
  1033. (or Shift-Tab)
  1034. F9 or Tab Get the next matching filename.
  1035. F10 Keep the current matching filename and display the
  1036. next matching name immediately after the current
  1037. one.
  1038. F12 Repeat the filename just returned from an F9 match.
  1039. Ctrl-A Toggle between long filename and short filename
  1040. in vDosPlus.
  1041. !WRAP
  1042. Filename completion can help you by filling in a complete file name on the
  1043. command line when you only remember or want to type part of the name. For
  1044. example, if you want to copy a file whose name begins with AU, but you
  1045. can't remember the rest of the name, type copy au, then press the Tab
  1046. key or F9 key. 4DOS will search the current directory for filenames that
  1047. begin AU and insert the first one onto the command line in place of the AU
  1048. that you typed.
  1049. If this is the file that you want, simply complete the command. If 4DOS
  1050. didn't find the file that you were looking for, press Tab or F9
  1051. again to substitute the next filename that begins with AU. When there are
  1052. no more filenames that match your pattern, the system will beep each time
  1053. you press Tab or F9.
  1054. If you go past the filename that you want, press Shift-Tab or F8 to
  1055. back up and return to the previous matching filename. After you back up to
  1056. the first filename, the system will beep each time you press Shift-Tab
  1057. or F8.
  1058. If you want to enter more than one matching filename on the same command
  1059. line, press F10 when each desired name appears. This will keep that
  1060. name and place the next matching filename after it on the command line. You
  1061. can then use Tab (or F9), Shift-Tab (or F8), and F10 to move
  1062. through the remaining matching files.
  1063. The pattern you use for matching may contain any valid filename characters,
  1064. as well as 073wildcard characters and extended wildcards. For example,
  1065. you can copy the first matching .TXT file by typing
  1066. c:\> copy *.txt
  1067. and then pressing Tab.
  1068. If you don't specify part of a filename before pressing Tab, 4DOS will
  1069. match all files. For example, if you enter the above command
  1070. as "COPY", without the "*.TXT", and then press Tab, the first filename in
  1071. the current directory is displayed. Each time you press Tab or F9 after
  1072. that, another name from the current directory is displayed, until all
  1073. filenames have been displayed.
  1074. If you type a filename without an extension, 4DOS will add *.* to the name
  1075. (* on LFN drives). It will also place a "*" after a partial
  1076. extension. If you are typing a group of file names in an 080include
  1077. list, the part of the include list at the cursor will be used as the
  1078. pattern to match.
  1079. When filename completion is used at the start of the command line, it will
  1080. only match directories, executable files, and files with executable
  1081. extensions, since these are the only file names that it makes sense to use
  1082. at the start of a command. If a directory is found, a "\" will be appended
  1083. to it to enable an 039automatic directory change.
  1084. If the name to be completed begins with a %, the completion routines will
  1085. scan the environment for matching variable names.
  1086. Converting Between Long and Short Filenames
  1087. On LFN drives, 4DOS will search for and display long filenames during filename
  1088. completion. If you want to search for traditional 8.3 short filenames,
  1089. press Ctrl-A before you start using filename completion. This allows you to
  1090. use filename completion on LFN drives with applications that do not support
  1091. long filenames.
  1092. The switch to the short filename format remains in effect for the remainder
  1093. of the current command line. When 4DOS begins a new
  1094. command line it will return to long filename format unless you press Ctrl-A
  1095. again.
  1096. You can also press Ctrl-A just after a filename is displayed, and the name
  1097. will be converted to short filename format. However, this feature only
  1098. affects the most recently entered file or directory name (the part between
  1099. the cursor and the last backslash [\] on the command line), and any
  1100. subsequent entries. It will not automatically convert all the parts of a
  1101. previously entered path.
  1102. Ctrl-A "toggles" the filename completion mode, so you can switch back and
  1103. forth between long and short filename displays by pressing Ctrl-A each time
  1104. you want to change modes.
  1105. Several topics are related to filename completion:
  1106. 036Appending Backslashes to Directory Names
  1107. 037Customizing Filename Completion
  1108. 038Filename Completion Window
  1109. ;---------------------------------------------------------------------------
  1110. !TOPIC 36 Appending Backslashes to Directory Names
  1111. !NOINDEX
  1112. If you set the 413AppendToDir .INI directive, or the "Add \ .." option
  1113. on the Command Line page of the 648OPTION dialogs, 4DOS will add a
  1114. trailing backslash [\] to all directory names. This feature can be
  1115. especially handy if you use filename completion to specify files that are
  1116. not in the current directory -- a succession of Tab (or F9) and F10
  1117. keystrokes can build a complete path to the file you want to work with.
  1118. The following example shows the use of this technique to edit the file
  1119. C:\DATA\FINANCE\MAPS.DAT. The lines which include <F9> show where F9
  1120. (or Tab) is pressed; the other lines show how the command line appears
  1121. after the previous F9 or Tab (the example is displayed on several lines
  1122. here, but all appears at a single command prompt when you actually perform
  1123. the steps):
  1124. 1 c:\> edit \da <F9>
  1125. 2 c:\> edit \data\
  1126. 3 c:\> edit \data\f <F9>
  1127. 4 c:\> edit \data\frank.doc <F9>
  1128. 5 c:\> edit \data\finance\
  1129. 6 c:\> edit \data\finance\map <F9>
  1130. 7 c:\> edit \data\finance\maps.dat
  1131. Note that F9 was pressed twice in succession on lines 3 and 4, because the
  1132. file name displayed on line 3 was not what was needed -- we were looking for
  1133. the FINANCE directory, which came up the second time F9 was pressed. In
  1134. this example, filename completion saves about half the keystrokes that would
  1135. be required to type the name in full. If you are using long file or
  1136. directory names, the savings can be much greater.
  1137. ;---------------------------------------------------------------------------
  1138. !TOPIC 37 Customizing Filename Completion
  1139. !NOINDEX
  1140. You can customize filename completion for any internal or external command
  1141. or alias. This allows the DOS to display filenames
  1142. intelligently based on the command you are entering. For example, you might
  1143. want to see only .TXT files when you use filename completion in the EDIT
  1144. command.
  1145. To customize filename completion you can use the Command Line page of the
  1146. 648OPTION command, or set the 429FileCompletion directive manually in
  1147. your .INI file. You can also use the 137FILECOMPLETION environment
  1148. variable. If you use both, the environment variable will override the
  1149. settings in your .INI file. You may find it useful to use the environment
  1150. variable for experimenting, then create permanent settings with the OPTION
  1151. command or the FileCompletion directive.
  1152. The format for both the environment variable and the .INI file is:
  1153. cmd1:ext1 ext2 ...; cmd2: ...
  1154. where "cmd" is a command name and "ext" is a file extension (which may
  1155. include wildcards) or one of the following file types:
  1156. DIRS Directories
  1157. RDONLY Read-only files
  1158. HIDDEN Hidden files
  1159. SYSTEM System files
  1160. ARCHIVE Files modified since the last backup
  1161. FILES Files only (no directories)
  1162. The command name is the internal command, alias command, or executable file
  1163. name (without a path). For example, to have file completion return only
  1164. directories for the CD command and only .C and .ASM files for B (the Boxer
  1165. editor), you would use this setting for filename completion in the OPTION
  1166. dialogs:
  1167. FileCompletion=cd:dirs; b:c asm
  1168. To set the same values using the environment variable, you would use this
  1169. line:
  1170. c:\> set filecompletion=cd:dirs; b:c asm
  1171. With this setting in effect, if you type "CD " and then pressed Tab,
  1172. 4DOS will return only directories, not files. If you type "B "
  1173. and press Tab, you will see only names of .C and .ASM files.
  1174. You can specify extensions NOT to match by prefacing the extension with a !.
  1175. 4DOS does not check your command line for aliases before matching the
  1176. commands for customized file completion. Instead, they ignore any path or
  1177. file extension information in the first word of the command, and then search
  1178. the 137FILECOMPLETION environment variable and the 429FileCompletion
  1179. .INI directive to find a match that will limit the files selected for
  1180. filename completion.
  1181. ;---------------------------------------------------------------------------
  1182. !TOPIC 38 Filename Completion Window
  1183. !NOINDEX
  1184. You can also view filenames in a filename completion window and select the
  1185. file you want to work with. To activate the window, press F7 or Ctrl-Tab
  1186. at the command line. You will see a window in the upper-right corner of the
  1187. screen, with a sorted list of files that match any partial filename you have
  1188. entered on the command line. If you haven't yet entered a file name, the
  1189. window will contain the name of all files in the current directory. You can
  1190. search for a name by typing the first few characters. (Ctrl-Tab will work
  1191. only if your keyboard and BIOS or keyboard driver support it. If it does not
  1192. work on your system, use F7 instead.)
  1193. The keys you can use in the filename completion window are:
  1194. F7 or Ctrl-Tab (from the command line) Open the filename
  1195. completion window.
  1196. Up Arrow Scroll the display up one line.
  1197. Down Arrow Scroll the display down one line.
  1198. Left Arrow Scroll the display left 4 columns.
  1199. Right Arrow Scroll the display right 4 columns.
  1200. PgUp Scroll the display up one page.
  1201. PgDn Scroll the display down one page.
  1202. Ctrl-PgUp Go to the beginning of the filename list.
  1203. (or Home)
  1204. Ctrl-PgDn Go to the end of the filename list.
  1205. (or End)
  1206. Enter Insert the selected filename into the command
  1207. line.
  1208. See 894Popup Windows for information on customizing window position,
  1209. size, and color.
  1210. ;---------------------------------------------------------------------------
  1211. !TOPIC 39 Automatic Directory Changes
  1212. !NOINDEX
  1213. [Automatic directory changes are part of a set of comprehensive directory
  1214. navigation features built into 4DOS. For a summary of these features, and
  1215. more information on the 048Extended Directory Searches and 049CDPATH features
  1216. mentioned below, see 047Directory Navigation.]
  1217. The automatic directory change feature lets you change directories quickly
  1218. from the command prompt, without entering an explicit 601CD or
  1219. 602CDD command. To do so, simply type the name of the directory you
  1220. want to change to at the prompt, with a backslash [\] at the end. For
  1221. example:
  1222. c:\> 4dos\
  1223. c:\4dos>
  1224. This can make directory changes very simple when it is combined with
  1225. 048Extended Directory Searches or 049CDPATH. If you have enabled
  1226. either of those features, 4DOS will use them in searching
  1227. for any directory you change to with an automatic directory change.
  1228. For example, suppose Extended Directory Searches are enabled, and the
  1229. directory WIN exists on drive E:. You can change to this directory with a
  1230. single word on the command line:
  1231. c:\4dos> win\
  1232. e:\win>
  1233. Depending on the way Extended Directory Searches are configured, and the
  1234. number of subdirectories on your disk whose names contain the string WIN,
  1235. when you execute such a command you may see an immediate change as shown
  1236. above, or a popup window which contains a list of subdirectories named WIN
  1237. to choose from.
  1238. The text before the backslash can include a drive letter, a full path, or a
  1239. partial path. Commands like "....\" can be used to move up the directory
  1240. tree quickly (see 072Extended Parent Directory Names). Automatic
  1241. directory changes save the current directory, so it can be recalled with a
  1242. "CDD -" or "CD -" command. For example, any of the following are valid
  1243. automatic directory change entries:
  1244. c:\> d:\data\finance\
  1245. c:\> archives\
  1246. c:\> ...\util\win95\
  1247. The first and last examples change to the named directory. The second
  1248. changes to the ARCHIVES subdirectory of the current directory, and the third
  1249. changes to the UTIL\WIN95 subdirectory of the directory which is two levels
  1250. "up" from the current directory in the tree.
  1251. ;---------------------------------------------------------------------------
  1252. !TOPIC 40 Directory History Window
  1253. !NOINDEX
  1254. [The directory history window is part of a set of comprehensive directory
  1255. navigation features built into 4DOS. For a summary of these features, and
  1256. more information on enhanced directory navigation features, see
  1257. 047Directory Navigation.]
  1258. Directory History Window Keys
  1259. Ctrl-PgUp (from the command line) Open the directory history
  1260. (or Ctrl-PgDn) window.
  1261. Up Arrow Scroll the display up one line.
  1262. Down Arrow Scroll the display down one line.
  1263. Left Arrow Scroll the display left 4 columns.
  1264. Right Arrow Scroll the display right 4 columns.
  1265. PgUp Scroll the display up one page.
  1266. PgDn Scroll the display down one page.
  1267. Ctrl-PgUp Go to the beginning of the directory
  1268. (or Home) list.
  1269. Ctrl-PgDn Go to the end of the directory list.
  1270. (or End)
  1271. Ctrl-D Delete the selected line from the directory list.
  1272. Enter Change to the selected drive and directory.
  1273. Ctrl-Enter Move the selected line to the command line
  1274. for editing.
  1275. See 894Popup Windows for information on customizing window position,
  1276. size, and color.
  1277. The current directory is recorded automatically in the directory history
  1278. list just before each change to a new directory and drive.
  1279. You can view the directory history from a directory history window and
  1280. change to any drive and directory on the list. To activate the directory
  1281. history window, press Ctrl-PgUp or Ctrl-PgDn at the command line. You
  1282. can then select a new directory with the Enter key.
  1283. If the directory history list becomes full, old entries are deleted to make
  1284. room for new ones. You can set the size of the list with the 376DirHistory
  1285. directive in the .INI file. In order to conserve space, each directory name
  1286. is recorded just once in the directory history, even if you move into and out
  1287. of that directory several times. The directory history can be stored in
  1288. either a "local" or "global" list.
  1289. When you switch directories the original directory is saved in the directory
  1290. history list, regardless of whether you change directories at the command
  1291. line, from within a batch file, or from within an alias. However, directory
  1292. changes made by external directory navigation utilities or other external
  1293. programs are not recorded by 4DOS.
  1294. Local and Global Directory History
  1295. The directory history can be stored in either a "local" or "global" list.
  1296. With a local directory history list, any changes made to the list will only
  1297. affect the current copy of 4DOS. They will not be visible
  1298. in other shells, or other sessions. A local directory history list is the
  1299. default under 4DOS.
  1300. With a global list, all copies of 4DOS will share the same
  1301. directory history, and any changes made to the list in one copy will affect
  1302. all other copies.
  1303. You can control the type of directory history list on the Startup page
  1304. of the 648OPTION dialogs, with the 386LocalDirHistory directive in
  1305. 4DOS.INI, with the /L and /LD 352startup options. You can control where a
  1306. global directory history list is stored with the 394UMBDirHistory
  1307. directive in 4DOS.INI, or the corresponding setting available from the
  1308. OPTION command.
  1309. There is no fixed rule for deciding whether to use a local or global
  1310. directory history list. Depending on your work style, you may find it most
  1311. convenient to use one type, or a mixture of types in different sessions or
  1312. shells. We recommend that you start with the default setting for 4DOS,
  1313. then modify it if you find a situation where the default is not convenient.
  1314. 4DOS can share a global directory history list among a parent 4DOS shell and
  1315. any child shells you start from that parent shell. For example, if you start
  1316. an application, and then "shell to DOS" from the application, the original
  1317. copy of 4DOS and the child shell can share the global directory history.
  1318. Whenever you start a secondary shell which uses a local directory history
  1319. list, it inherits a copy of the directory history from the previous
  1320. shell. However, any changes to the list made in the secondary shell will
  1321. affect only that shell. If you want changes made in a secondary shell to
  1322. affect the previous shell, use a global directory history list in both shells.
  1323. ;---------------------------------------------------------------------------
  1324. !TOPIC 41 Multiple Commands
  1325. !NOINDEX
  1326. You can type several commands on the same command line, separated by a
  1327. caret [^]. For example, if you know you want to copy all of your .TXT
  1328. files to drive A: and then run CHKDSK to be sure that drive A's file
  1329. structure is in good shape, you could enter the following command:
  1330. c:\> copy *.txt a: ^ chkdsk a:
  1331. You may put as many commands on the command line as you wish, as long as
  1332. the total length of the command line does not exceed 511 characters.
  1333. You can use multiple commands in 101aliases and 102batch files
  1334. as well as at the command line.
  1335. If you don't like using the default command separator, you can pick another
  1336. character using the 664SETDOS /C command or the 418CommandSep
  1337. directive in 4DOS.INI. If you plan to share aliases or batch files between
  1338. 4DOS and 0204NT or Take Command, see 054Special Character Compatibility
  1339. for details about choosing compatible command separators for two or more
  1340. products.
  1341. ;---------------------------------------------------------------------------
  1342. !TOPIC 42 Expanding and Disabling Aliases
  1343. !NOINDEX
  1344. A few command line options are specifically related to 101aliases, and are
  1345. documented briefly here for completeness.
  1346. You can expand an alias on the command line and view or edit the results by
  1347. pressing Ctrl-F before the command is executed. Doing so is especially
  1348. useful when you are developing and debugging a complex alias or if you want
  1349. to make sure that an alias that you may have forgotten won't change the
  1350. intent of your command.
  1351. At times, you may want to temporarily disable an alias that you have
  1352. defined. To do so, precede the command with an asterisk [*]. For
  1353. example, if you have an alias for DIR which changes the display format, you
  1354. can use the following command to bypass the alias and display the directory
  1355. in the standard format:
  1356. c:\> *dir
  1357. ;---------------------------------------------------------------------------
  1358. !TOPIC 43 Command Line Help
  1359. !NOINDEX
  1360. You can start the online help system at the command line by entering HELP
  1361. or HELP plus a topic, or by pressing F1 or Ctrl-F1 at any time.
  1362. If you have already typed part or all of a command on the line, the help
  1363. system will provide "context-sensitive" help by using the first word on the
  1364. line as a help topic. If it's a valid topic, you will see help for that
  1365. topic automatically; if not, you will see a table of contents and you can
  1366. then pick the topic you want. For example, if you press F1 after entering
  1367. each of the command lines shown below you will get the display indicated:
  1368. c:\> Topic list / table of contents
  1369. c:\> copy *.* a: Help on COPY
  1370. c:\> c:\util\map Topic list / table of contents
  1371. Ctrl-F1 works just like F1 except that it provides help for the word at
  1372. the cursor instead of the first word on the command line. Where F1 is good
  1373. for checking the syntax of commands, Ctrl-F1 is useful for reviewing
  1374. internal variables and variable functions.
  1375. For quick help you can type the name of any internal command at the prompt,
  1376. followed by a slash and a question mark [/?] like this:
  1377. copy /?
  1378. This will show you help for the command in a "quick-reference" style (the
  1379. output can be 051redirected.) The /? option may not work correctly if
  1380. you have redefined how the command operates with an alias. In this case you
  1381. may need to add an asterisk to the beginning of the command to 042disable
  1382. alias processing:
  1383. alias copy copy /r
  1384. *copy /?
  1385. /? will only access the help system when you use it with an internal
  1386. command. If you use it with an external command name, the external command
  1387. will be executed and will interpret the /? parameter according to its own
  1388. rules. Some external commands, including some external utility programs, do
  1389. display help when run with a /? parameter, but this a characteristic of
  1390. these commands and does not depend on 4DOS. Many other
  1391. external commands do not have this feature.
  1392. ;---------------------------------------------------------------------------
  1393. !TOPIC 44 Command Line Length Limits
  1394. !NOINDEX
  1395. A command line can be up to 511 characters long, including aliases,
  1396. environment variables, and multiple commands. If your use of aliases or
  1397. environment variables causes the command line to exceed 511 characters,
  1398. you will see a "Command line too long" error and the remainder of the
  1399. line will not be executed.
  1400. ;---------------------------------------------------------------------------
  1401. !TOPIC 45 Page and File Prompts
  1402. !NOINDEX
  1403. Several 4DOS commands can generate prompts, which wait for you to press a
  1404. key to view a new page or to perform a file activity.
  1405. When 4DOS is displaying information in page mode, for example with a DIR /P
  1406. or SET /P command, it displays the message
  1407. Press ESC to quit or another key to continue...
  1408. At this prompt, you can press Esc, Ctrl-C, or Ctrl-Break if you
  1409. want to quit the command. You can press almost any other key to continue
  1410. with the command and see the next page of information.
  1411. During file processing, if you have activated prompting with a command like
  1412. DEL /P, you will see this prompt before processing every file:
  1413. Y/N/A/R ?
  1414. You can answer this prompt by pressing Y for Yes, N for No, or A or
  1415. R to process all remaining files without further prompting. (A and R
  1416. are equivalent.) You can also press Ctrl-C, Ctrl-Break, or Esc at this
  1417. prompt to cancel the remainder of the command.
  1418. ;---------------------------------------------------------------------------
  1419. !TOPIC 46 Other Features
  1420. !NOINDEX
  1421. For information on other features of 4DOS see:
  1422. 045Page and File Prompts
  1423. 050Redirection and Piping
  1424. 053Keystack
  1425. 083Critical Errors
  1426. 084Conditional Commands
  1427. 085Command Grouping
  1428. 086Escape Character
  1429. ;---------------------------------------------------------------------------
  1430. !TOPIC 47 Directory Navigation
  1431. !NOINDEX
  1432. The operating system remembers a current or default
  1433. directory for every drive in your system. The current directory on the
  1434. current drive is sometimes called the current working directory.
  1435. With traditional command processors, you change the current drive by typing
  1436. the new drive letter plus a colon at the prompt, and you change the current
  1437. working directory with the CD command. 4DOS supports those standard
  1438. features, and offers a number of enhancements to make directory navigation
  1439. much simpler and faster.
  1440. This section begins with a summary of all 4DOS directory navigation features.
  1441. It also provides detailed documentation on the enhanced directory search
  1442. features: 048Extended Directory Searches and the 049CDPATH.
  1443. The 4DOS directory navigation features are in three groups: features which
  1444. help 4DOS find the directory you want, methods for
  1445. initiating a directory change with a minimal amount of typing, and methods
  1446. for returning easily to directories you've recently used. Each group is
  1447. summarized below.
  1448. Finding Directories
  1449. Traditional command processors require you to explicitly type the name of the
  1450. directory you want to change to. 4DOS supports this method, and also offers
  1451. two significant enhancements:
  1452. !INDENT 7 5 5 5
  1453. * 048Extended Directory Searches allow 4DOS to
  1454. search a "database" of all the directories on your system to find
  1455. the one you want.
  1456. * The 049CDPATH allows you to enter a specific list of directories
  1457. to be searched, rather than searching a database. Use CDPATH
  1458. instead of Extended Directory Searches if you find the extended
  1459. searches too broad, or your hard drive has too many directories for
  1460. an efficient search.
  1461. !INDENT 0
  1462. Initiating a Directory Change
  1463. 4DOS supports the traditional methods of changing directories, and also
  1464. offers several more flexible approaches:
  1465. !INDENT 7 5 5 5
  1466. * 039Automatic Directory Changes allow you to type a directory name
  1467. at the prompt and switch to it automatically, without typing an
  1468. explicit CD or similar command.
  1469. * The 601CD command can change directories on a single
  1470. drive, and can return to the most recently used directory.
  1471. * The 602CDD command changes drive and directory at the same time,
  1472. and can return to the most recently used drive and directory.
  1473. * The 653PUSHD command changes the drive and directory like CDD,
  1474. and records the previous directory in a directory "stack." You can
  1475. view the stack with 614DIRS and return to the directory on the top of
  1476. the stack with 651POPD.
  1477. !INDENT 0
  1478. CDD, PUSHD, and automatic directory changes can also change to a network
  1479. drive and directory mapped to a drive letter.
  1480. Returning to a Previous Directory
  1481. Traditional command processors do not remember previously-used directories,
  1482. and can only "return" to a directory by changing back to it with a standard
  1483. drive change or CD command. 4DOS supports three additional methods for
  1484. returning to a previous directory:
  1485. !INDENT 7 5 5 5
  1486. * The 601CD - and 602CDD - commands can be used to return
  1487. to the previous working directory (the one you used immediately
  1488. before the current directory). Use these commands if you
  1489. are working in two directories and alternating between them.
  1490. * The 040Directory History Window allows you to select one of several
  1491. recently-used directories from a popup list and return to it
  1492. immediately. The window displays the contents of the directory
  1493. history list.
  1494. * The 651POPD command will return to the last directory saved by
  1495. 653PUSHD. The directory stack holds 511 characters, enough for 20 to
  1496. 40 typical drive and directory entries.
  1497. !INDENT 0
  1498. ;---------------------------------------------------------------------------
  1499. !TOPIC 48 Extended Directory Searches
  1500. !NOINDEX
  1501. When you change directories with an 039automatic directory change,
  1502. 601CD, 602CDD, or 653PUSHD command, 4DOS must find the
  1503. directory you want to change to. To do so, 4DOS first uses the
  1504. traditional method to find a new directory: it checks to see whether you
  1505. have specified either the name of an existing subdirectory below the current
  1506. directory, or the name of an existing directory with a full path or a drive
  1507. letter. If you have, 4DOS changes to that directory, and
  1508. does no further searching.
  1509. This traditional search method requires that you navigate manually through
  1510. the directory tree, and type the entire name of each directory you want to
  1511. change to. Extended Directory Searches speed up the navigation process
  1512. dramatically by allowing 4DOS to find the directory you
  1513. want, even if you only enter a small part of its name.
  1514. When the traditional search method fails, 4DOS tries to find the directory
  1515. you requested via the 049CDPATH, then via an Extended Directory
  1516. Search. This section covers only Extended Directory Searches, which are more
  1517. flexible and more commonly used than CDPATH.
  1518. Extended Directory Searches use a database of directory names to facilitate
  1519. changing to the correct directory. The database is used only if Extended
  1520. Directory Searches are enabled, and if the explicit directory search and
  1521. CDPATH search fail to find the directory you requested.
  1522. An extended directory search automatically finds the correct path to the
  1523. requested directory and changes to it if that directory exists in your
  1524. directory database. If more than one directory in the database matches the
  1525. name you have typed, a popup window appears and you can choose the directory
  1526. you want.
  1527. You can control the color, position and size of the popup directory search
  1528. window from the Windows page of the 648OPTION dialogs, or with
  1529. directives in the .INI file, including 417CDDWinLeft, CDDWinTop,
  1530. CDDWinWidth, and CDDWinHeight, and 462CDDWinColors. You can also change
  1531. the keys used in the popup window with 481Key Mapping Directives in the
  1532. .INI file.
  1533. To use extended directory searches, you must explicitly enable them and also
  1534. create the directory database.
  1535. The Extended Search Database
  1536. To create or update the database of directory names, use the 602CDD /S
  1537. command. When you create the database with CDD /S, you can specify which
  1538. drives should be included. If you enable Extended Directory Searches and do
  1539. not create the database, it will be created automatically the first time it
  1540. is required, and will include all local hard drives.
  1541. The database is stored in the file JPSTREE.IDX, which is placed in the root
  1542. directory of drive C: by default. The same tree file is used by all JP
  1543. Software command processors. You can specify a different location for this
  1544. file on the Windows page of the 648OPTION dialogs, or with the
  1545. 392TreePath .INI directive. If you are using 2 or more of our products
  1546. on your computer and want to have different drives stored in the database
  1547. for each, use the dialogs or the TreePath directive to place their database
  1548. directories in different locations.
  1549. If you use an internal 4DOS command to create or delete a directory, the
  1550. directory database is automatically updated to reflect the change to your
  1551. directory structure. The updates occur if 4DOS can find the
  1552. JPSTREE.IDX file in the root directory of drive C: or in the location
  1553. specified by the TreePath .INI directive.
  1554. The internal commands which can modify the directory structure and cause
  1555. automatic updates of the file are 644MD, 655RD,
  1556. 606COPY /S, 609DEL /X, 609ERASE /X, 646MOVE /S, and
  1557. 658REN. The MD /N command can be used
  1558. to create a directory without updating the directory database. This is
  1559. useful when creating a temporary directory which you do not want to appear
  1560. in the database.
  1561. In 4DOS, directories can only be added automatically to JPSTREE.IDX if
  1562. the new entry needs to be placed less than 64K bytes from the end of the
  1563. file. If a directory cannot be added automatically, an error message
  1564. appears. Automatic deletions will work from any location in the file.
  1565. Enabling Extended Searches
  1566. To enable extended directory searches and control their operation, you must
  1567. set the 430FuzzyCD directive in the .INI file. You can set FuzzyCD
  1568. with the Search Level option on the Windows page of the 648OPTION
  1569. dialogs, or by editing the .INI file manually.
  1570. !INDENT 5 5 5 5
  1571. If FuzzyCD = 0, extended searches are disabled, the JPSTREE database
  1572. is ignored, and CD, CDD, PUSHD, and automatic directory
  1573. changes search for directories using only explicit names and
  1574. CDPATH. This is the default.
  1575. If FuzzyCD = 1 and an extended search is required, 4DOS
  1576. will search the JPSTREE database for directory names which
  1577. exactly match the name you specified.
  1578. If FuzzyCD = 2 and an extended search is required, 4DOS
  1579. will search the database for exact matches first, just as
  1580. when FuzzyCD = 1. If the requested directory is not found, it will
  1581. search the database a second time looking for directory names that
  1582. begin with the name you specified.
  1583. If FuzzyCD = 3 and an extended search is required, 4DOS
  1584. will search the database for exact matches first, just
  1585. as when FuzzyCD = 1. If the requested directory is not found, it
  1586. will search the database a second time looking for directory names
  1587. that contain the name you specified anywhere within them.
  1588. !INDENT 0
  1589. For example, suppose that you have a directory called C:\DATA\MYDIR,
  1590. CDPATH is not set, and C:\DATA is not the current directory on drive
  1591. C:. The following chart shows what CDD command you might use to change to
  1592. this directory.
  1593. FuzzyCD
  1594. Setting CDD Command
  1595. 0 cdd c:\data\mydir
  1596. 1 cdd mydir
  1597. 2 cdd myd
  1598. 3 cdd yd
  1599. An extended directory search is not used if you specify a full directory path
  1600. (one beginning with a backslash [\], or a drive letter and a backslash). If
  1601. you use a name which begins with a drive letter (e.g. C:MYDIR), the
  1602. extended search will examine only directories on that drive.
  1603. Forcing an Extended Search with Wildcards
  1604. Normally you type a specific directory name for 4DOS to
  1605. locate, and the search proceeds as described in the preceding
  1606. sections. However, you can also force 4DOS to perform an
  1607. extended directory search by using 073wildcard characters in the directory
  1608. name. If you use a wildcard, an extended search will occur whether or not
  1609. extended searches have been enabled.
  1610. When 4DOS is changing directories and it finds wildcards in the directory
  1611. name, it skips the explicit search and 049CDPATH steps and goes directly
  1612. to the extended search.
  1613. If a single match is found, the change is made immediately. If more than one
  1614. match is found, a popup window is displayed with all matching directories.
  1615. Wildcards can only be used in the final directory name in the path (after the
  1616. last backslash in the path name). For example you can find COMM\*A*.* (all
  1617. directories whose parent directory is COMM and which have an A somewhere in
  1618. their names), but you cannot find CO?M\*A*.* because it uses a wildcard
  1619. before the last backslash.
  1620. If you use wildcards in the directory name as described here, and the
  1621. extended directory search database does not exist, it will be built
  1622. automatically the first time a wildcard is used. You can update the
  1623. database at any time with 602CDD /S.
  1624. Internally, extended directory searches use wildcards to scan the directory
  1625. database. If FuzzyCD is set to 2, an extended search looks for the name you
  1626. typed followed by an asterisk (i.e. DIRNAME*). If FuzzyCD is set to 3,
  1627. it looks for the name preceded and followed by an asterisk (i.e. *DIRNAME*).
  1628. These internal wildcards will be used in addition to any wildcards you use in
  1629. the name. For example if you search for ABC?DEF (ABC followed by any
  1630. character followed by DEF) and FuzzyCD is set to 3, 4DOS
  1631. will actually search the directory database for *ABC?DEF*.
  1632. Disabling Extended Searches in Batch Files
  1633. When writing batch files you may want to use the 601CD or
  1634. 602CDD command to switch directories without triggering an extended
  1635. search. For example, you may need the search to fail (rather than search
  1636. the extended search database) if a directory does not exist, or you may want
  1637. to ensure that the extended search popup window does not appear in a
  1638. batch file designed to run in unattended mode.
  1639. To disable extended searches, use the /N option of CD or CDD. When
  1640. this option is used and a directory does not exist below the current
  1641. directory or on the CDPATH, the command will fail with an error message,
  1642. and will not search the extended search database. For example this
  1643. command might trigger an extended search:
  1644. cdd testdir
  1645. but this one will not:
  1646. cdd /n testdir
  1647. Note that this option is not available for 653PUSHD. To perform the
  1648. same function when using PUSHD, save the current directory with PUSHD
  1649. (without parameters) and then use CDD /N to change directories, for
  1650. example:
  1651. pushd
  1652. cdd /n testdir
  1653. ;---------------------------------------------------------------------------
  1654. !TOPIC 60 vDosPlus
  1655. !NOINDEX
  1656. vDosPlus - 4DOS, what's what?
  1657. vDosPlus: A Windows program emulating a PC, its hardware, BIOS and DOS in a
  1658. window, based on vDos and DOSBox.
  1659. 4DOS: A DOS program running in vDosPlus. 4DOS is an enhanced DOS command.com,
  1660. executing DOS commands and batch files.
  1661. DOS programs were once developed to run on PC's that booted into DOS. DOS
  1662. wasn't multitasking itself, DOS programs always start as 16-bit, and the
  1663. 16-bit processor mode isn't supported by Windows 64-bit. DOS programs
  1664. running under Windows are unaware that the PC's hardware cannot be directly
  1665. addressed anymore. The (windowed) DOS screen doesn't match the real display.
  1666. The Windows printing system is incompatible with that of DOS, etc., etc.
  1667. To work around these problems, vDosPlus runs DOS programs in an emulated DOS
  1668. PC in the Windows environment. In vDosPlus, these internal DOS-style commands
  1669. have been added or modified:
  1670. !NOWRAP
  1671. 062ABOUT Displays a popup with information about vDosPlus.
  1672. 603CHCP Enhanced to display language specific characters.
  1673. 065CMD Links to the Windows CMD command line processor.
  1674. 066LABEL Assigns a volume label to a disk drive.
  1675. 063MEM Reports memory available to DOS programs.
  1676. 663SET Enhanced to include Windows variables.
  1677. 067SETCFG Views or changes the vDosPlus configuration settings.
  1678. 068SETCOLOR Views or changes the vDosPlus text mode color settings.
  1679. 069SETPORT Views or changes the vDosPlus COMx/LPTx port settings.
  1680. 064UNUSE Unassigns specified vDosPlus drive letters.
  1681. 061USE Assigns vDosPlus drive letters to Windows drives/shares.
  1682. 681VER Displays the vDosPlus and emulated DOS version.
  1683. !WRAP
  1684. Visit the vDosPlus home page for latest downloads and further information:
  1685. http://www.vdosplus.org/
  1686. ;---------------------------------------------------------------------------
  1687. !TOPIC 61 USE
  1688. !TTY
  1689. Purpose: Assigns a vDosPlus drive letter to a Windows path.
  1690. Format: USE [drive letter:] [Windows path\]
  1691. Windows path: Windows drive letter:, or
  1692. Windows folder, or
  1693. network share.
  1694. Usage
  1695. This is one of the most important commands in vDosPlus.
  1696. The DOS drive letters in vDosPlus are not just those of Windows. At startup,
  1697. before any USE commands, only the C: drive is defined in vDosPlus; this drive
  1698. in vDosPlus is the Start-in folder of the shortcut that launches vDosPlus. It
  1699. is possible to let vDosPlus automatically assign DOS drive letters to match
  1700. those of Windows at startup by setting the USEDRVS=ON directive in its config
  1701. file.
  1702. USE without any parameters reports the assigned vDosPlus drive letters.
  1703. You could be accustomed to assign a Windows drive letter to some network
  1704. share, accommodating Windows 32-bit NTVDM. That's not needed, preferred is to
  1705. USE that share directly (eg: USE F: \\servername\share name\).
  1706. Drives letters assigned by USE can be unassigned by UNUSE in vDosPlus.
  1707. ;---------------------------------------------------------------------------
  1708. !TOPIC 62 ABOUT
  1709. !TTY
  1710. Purpose: Displays a popup with information about vDosPlus.
  1711. Format: ABOUT
  1712. !TTY
  1713. Usage
  1714. About displays information about vDosPlus, including the version and build
  1715. dates as well as a few other information such as the credits.
  1716. ;---------------------------------------------------------------------------
  1717. !TOPIC 63 MEM
  1718. !TTY
  1719. Purpose: Briefly reports memory available to DOS programs.
  1720. Format: MEM
  1721. !TTY
  1722. Usage
  1723. Mem provides a brief report of memory available to DOS programs.
  1724. A more detailed (and typically slightly different) report is provided by the
  1725. 645MEMORY command.
  1726. ;---------------------------------------------------------------------------
  1727. !TOPIC 64 UNUSE
  1728. !TTY
  1729. Purpose: Unassigns a vDosPlus drive letter that was previously assigned.
  1730. Format: UNUSE drive letter:
  1731. Usage
  1732. This command unassigns a vDosPlus drive letter previously assigned by USE.
  1733. If you unassign the C: drive, then it will be restored to the Start-in
  1734. folder of the shortcut that launches vDosPlus. Drives that have been
  1735. unassigned by this command can be assigned again by USE.
  1736. ;---------------------------------------------------------------------------
  1737. !TOPIC 65 CMD
  1738. !TTY
  1739. Purpose: Links to the Windows CMD command line processor.
  1740. Format: CMD [WAIT][HIDE] windows command line
  1741. Usage
  1742. This command is linked to the Windows CMD command line processor. You can
  1743. start an internal command or external program with this. The optional WAIT
  1744. and HIDE have to be in capitals. Eventual paths in command line are those
  1745. of Windows. If you program yourself, you can execute cmd.exe w/o the need
  1746. of setting vDosPlus drives to Windows paths.
  1747. Some examples
  1748. cmd /c start /max notepad
  1749. cmd WAITHIDE /c mytest.bat
  1750. ;---------------------------------------------------------------------------
  1751. !TOPIC 66 LABEL
  1752. !TTY
  1753. Purpose: Assigns a volume label to a disk drive.
  1754. Format: LABEL [drive letter:] newlabel
  1755. Usage
  1756. You can change the volume label of a disk drive with this command. You can
  1757. use the VOL command to display the volume labels of disk drives. If you want
  1758. to delete the current label of a disk drive without assigning a new one,
  1759. then you simply need to specify "" as the new volume label.
  1760. ;---------------------------------------------------------------------------
  1761. !TOPIC 67 SETCFG
  1762. !TTY
  1763. Purpose: Views or changes the vDosPlus configuration settings.
  1764. Format: SETCFG [option[=value]]
  1765. Usage
  1766. You can change the vDosPlus configuration options (config.txt directives) on
  1767. the fly from the DOS command line with this command. Note however that not
  1768. all configuration options can be changed with this command. Currently the
  1769. only configuration options NOT supported by the SETCFG command are:
  1770. COLORS
  1771. CONFWARN
  1772. LOW
  1773. XMEM
  1774. Use the SETPORT command to view or change the COM and LPT port settings, and
  1775. the color settings can be viewed or changed with the SETCOLOR command.
  1776. If you do not specify any parameters for this command, then it will list the
  1777. current settings in the alphabetic order; if only an option is given (and
  1778. without the equal sign), the current value for this option will be shown.
  1779. Some examples
  1780. SETCFG MOUSE=ON
  1781. SETCFG WHEELMOD=3,2
  1782. SETCFG TITLE=New title for vDosPlus
  1783. If you do not specify a value for an option, then the default value for this
  1784. option is used. For example:
  1785. SETCFG WP=
  1786. ;---------------------------------------------------------------------------
  1787. !TOPIC 68 SETCOLOR
  1788. !TTY
  1789. Purpose: Views or changes the vDosPlus text mode color settings.
  1790. Format: SETCOLOR [color# [value]]
  1791. Usage
  1792. You can change the vDosPlus text mode color settings with this command. The
  1793. COLORS directive in the config file can be used to set up the color scheme
  1794. by supplying all 16 color values at the same time when vDosPlus starts, but
  1795. this command allows you to change the color value one by one and on the fly.
  1796. Both RGB: (r,g,b) and hexadecimal as in HTML: #RRGGBB formats are accepted.
  1797. If you do not specify any parameters (or only specify a color#) for this
  1798. command, then it will list the current color setting(s).
  1799. Note: You can use the 605COLOR command to actually change the default
  1800. display colors in the text mode.
  1801. Some examples
  1802. SETCOLOR 0 (20,30,40)
  1803. SETCOLOR 7 #606060
  1804. If you specify "-" as the color value, then it will return the specified
  1805. color to the default color value. For example:
  1806. SETCOLOR 7 -
  1807. You can also use the syntax "SETCOLOR MONO [+|-]" to view or change the MONO
  1808. color mode. For example, to enable the MONO mode:
  1809. SETCOLOR MONO +
  1810. ;---------------------------------------------------------------------------
  1811. !TOPIC 69 SETPORT
  1812. !TTY
  1813. Purpose: Views or changes the vDosPlus COMx and LPTx port settings.
  1814. Format: SETPORT [port[=value]]
  1815. Usage
  1816. You can view or changes the current settings of COMx and LPTx ports (x=1..9)
  1817. with this command. The format of this command is similar to the SETCFG
  1818. command. If an equal sign is given after a COM or LPT port but no value is
  1819. provided, then the default value will be used for this port. If only a port
  1820. is given for this command then the current setting of this port is shown.
  1821. If you do not specify any parameters for this command, then the current
  1822. settings of all COM and LPT ports are displayed.
  1823. Some examples
  1824. SETPORT LPT4=CLIP
  1825. SETPORT COM5=DUMMY
  1826. SETPORT COM6
  1827. ;---------------------------------------------------------------------------
  1828. !TOPIC 144 = 49 _CDPATH
  1829. !NOINDEX
  1830. !TOPIC 49 CDPATH
  1831. !NOINDEX
  1832. When you change directories with an 039automatic directory change,
  1833. 601CD, 602CDD, or 653PUSHD command, 4DOS must find the
  1834. directory you want to change to. To do so, it first uses the traditional
  1835. method to find a new directory.
  1836. When the traditional search method fails, 4DOS tries to find the directory
  1837. you requested via the CDPATH, then via an
  1838. 048Extended Directory Search. This section covers only the CDPATH.
  1839. Enabling both CDPATH and Extended Directory Searches can yield confusing
  1840. results, so we recommend that you do not use both features at the same
  1841. time. If you prefer to explicitly list where 4DOS should
  1842. look for directories, use CDPATH. If you prefer to have 4DOS
  1843. look at all of the directory names on your disk, use Extended
  1844. Directory Searches.
  1845. CDPATH is an environment variable, and is similar to the 138PATH variable
  1846. used to search for executable files: it contains an explicit list of
  1847. directories to search when attempting to find a new directory. 4DOS
  1848. appends the specified directory name to each directory in CDPATH
  1849. and attempts to change to that drive and directory. It stops when it finds
  1850. a match or when it reaches the end of the CDPATH list.
  1851. CDPATH is ignored if a complete directory name (one beginning with a
  1852. backslash [\]) is specified, or if a drive letter is included in the
  1853. name. It is only used when a name is given with no drive letter or leading
  1854. backslash.
  1855. CDPATH provides a quick way to find commonly used subdirectories in an
  1856. explicit list of locations. You can create CDPATH with the 663SET
  1857. command. The format of CDPATH is similar to that of 138PATH: a list of
  1858. directories separated by semicolons [;]. For example, if you want the
  1859. directory change commands to search the C:\DATA directory, the D:\SOFTWARE
  1860. directory, and the root directory of drive E:\ for the subdirectories that
  1861. you name, you should create CDPATH with this command:
  1862. c:\> set cdpath=c:\data;d:\software;e:\
  1863. Suppose you are currently in the directory C:\WP\LETTERS\JANUARY, and you'd
  1864. like to change to D:\SOFTWARE\UTIL. You could change directories explicitly
  1865. with the command:
  1866. c:\wp\letters\january> cdd d:\software\util
  1867. However, because the D:\SOFTWARE directory is listed in your CDPATH
  1868. variable as shown in the previous example (we'll assume it is the first
  1869. directory in the list with a UTIL subdirectory), you can simply enter the
  1870. command:
  1871. c:\wp\letters\january> cdd util
  1872. or, using an automatic directory change:
  1873. c:\wp\letters\january> util\
  1874. to change to D:\SOFTWARE\UTIL.
  1875. As it handles this request, 4DOS looks first in the current
  1876. directory, and attempts to find the C:\WP\LETTERS\JANUARY\UTIL
  1877. subdirectory. Then it looks at CDPATH, and appends the name you entered,
  1878. UTIL, to each entry in the CDPATH variable in other words, it tries to
  1879. change to C:\DATA\UTIL, then to D:\SOFTWARE\UTIL. Because this change
  1880. succeeds, the search stops and the directory change is complete.
  1881. An alternative for the CDPATH environment variable is _CDPATH
  1882. (see 862Compatibility with Microsoft Bookshelf).
  1883. ;---------------------------------------------------------------------------
  1884. !TOPIC 50 Redirection and Piping
  1885. !NOINDEX
  1886. This section covers redirection and piping. You can use these features
  1887. to change how 4DOS and some application programs handle input and output.
  1888. Internal commands and many external programs get their input from the
  1889. computer's standard input device and send their output to the standard
  1890. output device. Some programs also send special messages to the standard
  1891. error device. Normally, the keyboard is used for standard input and the
  1892. video screen for both standard output and standard error.
  1893. Redirection and piping allow you to change these assignments temporarily.
  1894. 051Redirection changes the standard input, standard output, or standard
  1895. error device for a program or command from the default device (the keyboard or
  1896. screen), to another device or to a file.
  1897. 052Piping changes the standard output and/or standard error device so
  1898. that the output of one command becomes the standard input for another
  1899. program or command.
  1900. ;---------------------------------------------------------------------------
  1901. !TOPIC 51 Redirection
  1902. !NOINDEX
  1903. Redirection can be used to reassign standard input, standard output,
  1904. and standard error devices from their default settings (the keyboard and
  1905. screen) to another device like the printer or serial port, to a file, or to
  1906. the clipboard. You must use some discretion when you use redirection with a
  1907. device; there is no way to get input from the printer, for example.
  1908. Redirection always applies to a specific command, and lasts only for the
  1909. duration of that command. When the command is finished, the assignments
  1910. for standard input, standard output, and standard error revert to whatever
  1911. they were before the command.
  1912. In the descriptions below, filename means either the name of a file or of
  1913. an appropriate device (for example PRN, LPT1, LPT2, LPT3 for printers; AUX
  1914. and COM1 to COM4 for serial ports; CON for the keyboard and screen; CLIP: for
  1915. the clipboard; NUL for the "null" device, etc.).
  1916. Here are the redirection options supported by 4DOS:
  1917. < filename To get input from a file or device instead of from
  1918. the keyboard
  1919. > filename To redirect standard output to a file or device
  1920. >& filename To redirect standard output and standard error to a
  1921. file or device
  1922. >&> filename To redirect standard error only to a file or device
  1923. If you want to append output to the end of an existing file, rather than
  1924. creating a new file, replace the first ">" in the output redirection
  1925. symbol with ">>" (i.e., use >>, >>&, and >>&>). This 055table of
  1926. all legal output redirection operators in 4DOS may be helpful.
  1927. To use redirection, place the redirection symbol and filename at the end of
  1928. the command line, after the command name and any parameters. For example,
  1929. to redirect the output of the DIR command to a file called DIRLIST, you could
  1930. use a command line like this:
  1931. c:\> dir /b *.dat > dirlist
  1932. You can use both input and output redirection for the same command, if both
  1933. are appropriate. For example, this command sends input to SORT from the
  1934. file DIRLIST, and sends output from SORT to the file DIRLIST.SRT:
  1935. c:\> sort < dirlist > dirlist.srt
  1936. You can redirect text to or from the Windows clipboard by using the
  1937. pseudo-device name CLIP: (the colon is required).
  1938. If you redirect the output of a single internal command like DIR, the
  1939. redirection ends automatically when that command is done. If you start a
  1940. batch file with redirection, all of the batch file's output is redirected,
  1941. and redirection ends when the batch file is done. Similarly, if you use
  1942. redirection at the end of a 085command group, all of the output from
  1943. the command group is redirected, and redirection ends when the command
  1944. group is done.
  1945. When output is directed to a file with >, >&, or >&>, if the
  1946. file already exists, it will be overwritten. You can protect existing
  1947. files by using the 664SETDOS /N1 command, the "Protect redirected output
  1948. files" setting available on the Options 1 page of the 648OPTION dialogs,
  1949. or the 438NoClobber directive in 4DOS.INI.
  1950. When output is appended to a file with >>, >>&, or >>&>, the
  1951. file will be created if it doesn't already exist. However, if NoClobber is
  1952. set as described above, append redirection will not create a new file;
  1953. instead, if the output file does not exist, a "File not found" or similar
  1954. error will be displayed.
  1955. You can temporarily override the current setting of NoClobber by using
  1956. an exclamation mark [!] after the redirection symbol. For example, to
  1957. redirect the output of DIR to the file DIROUT, and allow overwriting of any
  1958. existing file despite the NoClobber setting:
  1959. c:\> dir >! dirout
  1960. Redirection is fully nestable. For example, you can invoke a batch file
  1961. and redirect all of its output to a file or device. Output redirection on
  1962. a command within the batch file will take effect for that command only;
  1963. when the command is completed, output will revert to the redirected output
  1964. file or device in use for the batch file as a whole.
  1965. You can use redirection if you need to create a zero-byte file. To do
  1966. so, enter >filename as a command, with no actual command before the
  1967. > character.
  1968. Redirections are performed before the command is executed. If a redirection
  1969. fails for any reason -- an illegal filename or a nonexistant file, a device
  1970. which is not available or not ready, NoClobber protection, etc. -- then the
  1971. command will not be executed at all, and the 164_? internal variable will
  1972. be set to a nonzero value.
  1973. For another method of changing the standard input and output devices, see
  1974. 607CTTY.
  1975. ;---------------------------------------------------------------------------
  1976. !TOPIC 52 Piping
  1977. !NOINDEX
  1978. You can use the | character to create a "pipe" which sends the standard
  1979. output of one command to the standard input of another command:
  1980. command1 | command2 Sends the standard output of command1 to
  1981. the standard input of command2
  1982. command1 |& command2 Sends the standard output and standard
  1983. error of command1 to the standard input of
  1984. command2
  1985. For example, to take the output of the 663SET command (which displays
  1986. a list of your environment variables and their values) and pipe it to the
  1987. SORT utility to generate a sorted list, you would use the command:
  1988. c:\> set | sort
  1989. To do the same thing and then pipe the sorted list to the internal 640LIST
  1990. command for full-screen viewing:
  1991. c:\> set | sort | list
  1992. The 670TEE and 686Y commands are "pipe fittings" which add
  1993. more flexibility to pipes.
  1994. Like redirection, pipes are fully nestable. For example, you can invoke
  1995. a batch file and send all of its output to another command with a pipe. A
  1996. pipe on a command within the batch file will take effect for that command
  1997. only; when the command is completed, output will revert to the pipe in use
  1998. for the batch file as a whole.
  1999. 4DOS creates one or two temporary files to hold the output of pipes. The
  2000. files are given unique names, and deleted when the pipe is completed. By
  2001. default, these files are stored in the root directory of C: drive,
  2002. but you can override this with either the 141TEMP4DOS or 140TEMP
  2003. environment variable.
  2004. ;---------------------------------------------------------------------------
  2005. ;This is the keystack explanation; see also KEYSTACK
  2006. !TOPIC 53 Keystack
  2007. !NOINDEX
  2008. The Keystack overcomes two weaknesses of input redirection: some
  2009. programs ignore standard input and read the keyboard directly, and input
  2010. redirection doesn't end until the program or command terminates. You can't,
  2011. for example, use redirection to send the opening commands to a program and
  2012. then type the rest of the commands yourself. But the Keystack lets you do
  2013. exactly that.
  2014. The Keystack sends keystrokes to an application program. Once the Keystack is
  2015. empty, the program will receive the rest of its input from the keyboard. The
  2016. Keystack is useful when you want a program to take certain actions
  2017. automatically when it starts. It is most often used in batch files and
  2018. aliases. The Keystack is invoked with the 638KEYSTACK command.
  2019. KEYSTACK depends on a small resident program called 703KSTACK.COM, which
  2020. may be installed from your 109AUTOEXEC.BAT file. If you don't have
  2021. KSTACK.COM installed, the KEYSTACK command will display an error
  2022. message.
  2023. To place the letters, digits, and punctuation marks you would normally type
  2024. for your program into the keystack, enclose them in double quotes:
  2025. c:\> keystack "myfile"
  2026. Many other keys can be entered into the Keystack using their names. This
  2027. example puts the F1 key followed by the Enter key in the keystack:
  2028. c:\> keystack F1 Enter
  2029. See 893Keys and Key Names for details on how key names are entered. See
  2030. the 638KEYSTACK command for information on using numeric key
  2031. values along with or instead of key names, and other details about using
  2032. the Keystack.
  2033. The following command creates an 595alias that will run a FoxPro
  2034. report called TIMEREP (it should be entered on one line):
  2035. c:\> alias timerep `keystack "use times index times" Enter
  2036. "report form timerep to print" Enter "quit" Enter ^ foxpro`
  2037. This command creates an alias called timerep which puts the following
  2038. characters on the keystack:
  2039. the characters "use times index times"
  2040. the Enter key's code
  2041. the characters "report form timerep to print"
  2042. the Enter key's code
  2043. the characters "quit"
  2044. and one more Enter key
  2045. The alias then runs the program FOXPRO which receives those characters just
  2046. as if you had typed them.
  2047. When you use the Keystack, remember that you must put the keystrokes into
  2048. the Keystack before you run the program that will receive them. The
  2049. Keystack will hold the keystrokes until the program asks for them.
  2050. ;---------------------------------------------------------------------------
  2051. !TOPIC 54 Special Character Compatibility
  2052. !NOINDEX
  2053. If you use two or more of our products, or if you want to share aliases and
  2054. batch files with users of different products, you need to be aware of the
  2055. differences in three important characters: the Command Separator (see
  2056. 041Multiple Commands), the Escape Character (see 086Escape
  2057. Character), and the Parameter Character (see 105Batch File
  2058. Parameters).
  2059. The default values of each of these characters in each product is shown in
  2060. the following chart:
  2061. Product Separator Escape Parameter
  2062. 4DOS ^  &
  2063. 4OS2, 4NT, Take Command & ^ $
  2064. (The up-arrow [] represents the ASCII Ctrl-X character, numeric value 24.)
  2065. In your batch files and aliases, and even at the command line, you can
  2066. smooth over these differences in three ways:
  2067. !INDENT 7 5 5 5
  2068. * Select a consistent set of characters from the Options 1 page of the
  2069. 648OPTION dialogs, or with .INI file 410Configuration
  2070. Directives. For example, to set the 4DOS characters to match
  2071. 0204NT, use these lines in 4DOS.INI:
  2072. !INDENT 7 5 7 5
  2073. 418CommandSep = &
  2074. 426EscapeChar = ^
  2075. 439ParameterChar = $
  2076. !INDENT 7 5 5 5
  2077. * Use internal variables that contain the current special character,
  2078. rather than using the character itself (see 166+ and 165=). For
  2079. example, this command:
  2080. !INDENT 7 5 7 5
  2081. if "%1" == "" (echo Argument missing! ^ quit)
  2082. will only work if the command separator is a caret. However, this
  2083. version works regardless of the current command separator:
  2084. if "%1" == "" (echo Argument missing! %+ quit)
  2085. !INDENT 7 5 5 5
  2086. * In a batch file, use the 665SETLOCAL command to save the command
  2087. separator, escape character, and parameter character when the batch
  2088. file starts. Then use 664SETDOS as described below to select the
  2089. characters you want to use within the batch file. Use an 621ENDLOCAL
  2090. command at the end of the batch file to restore the previous settings.
  2091. !INDENT 0
  2092. You can also use the SETDOS command to change special characters on the
  2093. command line. However, when setting new special character values on the
  2094. command line you must take into account the possibility that one of your new
  2095. values will have a current meaning that causes problems with the setting. For
  2096. example, this command:
  2097. c:\> setdos /e^
  2098. would not set the escape character to a caret [^] in 4DOS if the standard
  2099. 4DOS special characters were currently in effect. The ^ would be seen as a
  2100. command separator, and would terminate the SETDOS command before the escape
  2101. character was set. To work around this, use the escape character variable
  2102. %= before each setting to ensure that the following character is not
  2103. treated with any special meaning.
  2104. For example, the following sequence of commands in a batch file will always
  2105. set the special characters correctly to their standard 4NT values, no matter
  2106. what their current setting, and will restore them when the batch file is
  2107. done:
  2108. setlocal
  2109. setdos /c%=& /e%=^ /p%=$
  2110. .....
  2111. endlocal
  2112. A similar sequence can be used to select the standard 4DOS characters,
  2113. regardless of the current settings:
  2114. setlocal
  2115. setdos /c%=^ /e%= /p%=&
  2116. .....
  2117. endlocal
  2118. ;---------------------------------------------------------------------------
  2119. !TOPIC 55 Output Redirection Operators
  2120. !NOINDEX
  2121. !NOWRAP
  2122. ÚÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
  2123. ³ Symbol ³ Redirects ³ NoClobber=No ³ NoClobber=Yes ³
  2124. ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  2125. ³ > ³ stdout ³ Create/Overwrite ³ Create, or error ³
  2126. ³ >> ³ stdout ³ Create/Append ³ Append, or error ³
  2127. ³ >! ³ stdout ³ Create/Overwrite ³ Create/Overwrite ³
  2128. ³ >>! ³ stdout ³ Create/Append ³ Create/Append ³
  2129. ³ >&> ³ stderr ³ Create/Overwrite ³ Create, or error ³
  2130. ³ >>&> ³ stderr ³ Create/Append ³ Append, or error ³
  2131. ³ >&>! ³ stderr ³ Create/Overwrite ³ Create/Overwrite ³
  2132. ³ >>&>! ³ stderr ³ Create/Append ³ Create/Append ³
  2133. ³ >& ³ stdout and stderr ³ Create/Overwrite ³ Create, or error ³
  2134. ³ >>& ³ stdout and stderr ³ Create/Append ³ Append, or error ³
  2135. ³ >&! ³ stdout and stderr ³ Create/Overwrite ³ Create/Overwrite ³
  2136. ³ >>&! ³ stdout and stderr ³ Create/Append ³ Create/Append ³
  2137. ÀÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  2138. !WRAP
  2139. This table summarizes all the legal output redirection operators in
  2140. 4DOS. The first column lists operators; the second tells which output
  2141. stream (standard output, standard error, or both) each one redirects. The
  2142. third column indicates how the output file is opened when the NoClobber
  2143. feature is disabled, 4DOS's default condition. The fourth is for when
  2144. NoClobber is enabled. NoClobber support is set by the 438NoClobber .INI
  2145. directive at startup, and can be dynamically changed using 664SETDOS /N.
  2146. For most devices (as opposed to files), there is no real difference between
  2147. appending and overwriting: DIR > LPT1 and DIR >> LPT1 are
  2148. equivalent. However, you can overwrite or append to the clipboard contents
  2149. when redirecting to the CLIP: pseudo-device: DIR > CLIP: replaces any text
  2150. on the clipboard, but DIR >> CLIP: adds to it.
  2151. stdout is the command's standard output; stderr is its standard
  2152. error.
  2153. Create/Overwrite: The output file will be created if it does not already
  2154. exist, overwritten if it does.
  2155. Create/Append: The output file will be created if it does not already
  2156. exist; otherwise the command's output will be added to the end of to the
  2157. existing file.
  2158. Create, or error: A new output file will be created. If the specified
  2159. file already exists, 4DOS will display a "File exists" error.
  2160. Append, or error: The command's output will be added to the end of to an
  2161. existing file. If the file does not exist, 4DOS will display a "File not
  2162. found" error.
  2163. ;---------------------------------------------------------------------------
  2164. !TOPIC 56 Command Switches for File Selection
  2165. !NOINDEX
  2166. The 4DOS file processing commands (606COPY, 609DEL,
  2167. 646MOVE, 658REN, 677TYPE, etc.) support several standard
  2168. switches for selecting files to process. Be sure to see the
  2169. individual commands for details on which switches are supported for
  2170. each command and how they work, and for additional switches specific
  2171. to each command.
  2172. The common file selection switches include:
  2173. /A:[[+|-]rhsad]: Select files based on their attributes. Preceding
  2174. an attribute letter with a hyphen [-] will select files that do not
  2175. have that attribute set. You can OR attributes by preceding each
  2176. attribute letter with a plus sign [+]. For example:
  2177. dir /a:rh lists all files with both the read-only and hidden
  2178. attributes set
  2179. dir /a:-a lists files which do not have the archive attribute
  2180. dir /a:d lists subdirectories only, not files
  2181. dir /a:-d lists files only, not subdirectories
  2182. dir /a:+s+h lists all files with either the system or the hidden
  2183. attribute (or both) set
  2184. See 946File Attributes and Time Stamps for more information on
  2185. attributes.
  2186. /I"text": Select files based on their description.
  2187. 073Wildcards are supported. The search text must be enclosed in
  2188. quotation marks, and must follow the /I immediately, with no
  2189. intervening spaces.
  2190. del /i"*agua*" *.txt deletes all .TXT files with the string
  2191. "agua" somewhere in the file description
  2192. del /i"[]" *.txt deletes all .TXT files which do not
  2193. have a description
  2194. See 611DESCRIBE for details on file descriptions.
  2195. /N: Don't actually process any files. This allows you to
  2196. test what the results of a command would be, without actually
  2197. performing the operation.
  2198. /P: Prompt for confirmation of each file individually. See
  2199. also 045Page and File Prompts.
  2200. /S: Process files in the current (or specified) directory and all
  2201. of its subdirectories. In most cases, /S will not search into
  2202. subdirectories with the hidden or system attributes set unless you
  2203. also specify /A:. Do not use /S in combination with 057@file lists!
  2204. ;---------------------------------------------------------------------------
  2205. !TOPIC 57 @File Lists
  2206. !NOINDEX
  2207. Certain 4DOS file processing commands allow you to specify the files
  2208. you want to process in a file list instead of on the command line.
  2209. We call these "@file lists" because the "@" sign is used in the
  2210. command, preceding the list filename.
  2211. An @file list is simply a standard ASCII file containing the names
  2212. of the files to process, one per line. This allows you to create a
  2213. list of files for processing using output from 612DIR /B, DIR /F, or
  2214. 625FFIND, a text editor, or any other method that produces a file in
  2215. the proper format. Paths may be included in the file; see below for
  2216. details.
  2217. @File lists are supported by the 596ATTRIB, 606COPY,
  2218. 609DEL, 611DESCRIBE, 623EXCEPT, 697HEAD,
  2219. 640LIST, 646MOVE, 655RD / RMDIR, 658REN,
  2220. 698TAIL, 674TOUCH, and 677TYPE commands.
  2221. Note: Elements of an @file list are always processed exactly "as is". No
  2222. further checking is done. This means that if a command allows options to
  2223. restrict operations based on age (/U, /C), ranges (/[d..., /[t...),
  2224. descriptions (/I), attributes (/A:), or location (/S), those options
  2225. will not apply to the @file contents.
  2226. To use an @file list, precede its name with an "@" sign in the
  2227. command. For example, to copy all of the files listed in MYLIST.TXT
  2228. to D:\SAVE\:
  2229. c:\> copy @mylist.txt d:\save\
  2230. If you use a drive and/or path specification the "@" sign can appear
  2231. before the path or before the file name. For example, these are
  2232. equivalent:
  2233. c:\> copy @e:\lists\mylist.txt d:\save\
  2234. c:\> copy e:\lists\@mylist.txt d:\save\
  2235. To use appropriately formatted data on the Windows clipboard as an
  2236. @file list use @CLIP: as the file name, for example:
  2237. c:\> copy @clip: d:\save\
  2238. @File Lists, Paths, and Subdirectories
  2239. The entries in @file lists may contain no path, a relative path, or
  2240. an absolute path, for example:
  2241. file1
  2242. mydir\file1
  2243. d:\data\mydir\file1
  2244. If a filename has no path the command processor will look for the
  2245. file in the directory that is current when the operation takes
  2246. place. Similarly, if a relative path is used it will be interpreted
  2247. as relative to the directory that is current when the operation
  2248. takes place.
  2249. @file lists should not be used with the subdirectory switches in
  2250. file processing commands (COPY /S, DEL /S, etc.). To process files
  2251. listed in a single @file list across multiple subdirectories use
  2252. 626FOR's ability to read the list and handle each file name
  2253. individually, for example:
  2254. for %file in (@flist) copy /s %file d:\target\
  2255. @File Lists and "@" Signs in File Names
  2256. Note that the "@" sign is a rarely used, but legal filename
  2257. character in some environments. If a file whose name begins with
  2258. @ exists and you attempt to use an @file list with the same name,
  2259. the file whose name begins with @ will take precedence. For
  2260. example, if C:\ contains both a file named @MYLIST.TXT and another
  2261. named MYLIST.TXT, this command:
  2262. c:\> copy @mylist.txt d:\save\
  2263. will copy the single file @MYLIST.TXT to D:\SAVE\, and will not
  2264. process the list of files in MYLIST.TXT. To avoid this confusion,
  2265. use a different name for one of the files.
  2266. ;---------------------------------------------------------------------------
  2267. !TOPIC 58 Command Names and Parameters
  2268. !NOINDEX
  2269. When you enter a command you type its name at the prompt, followed by a
  2270. space and any parameters for the command. For example, all of these
  2271. could be valid commands:
  2272. c:\> dir
  2273. c:\> copy file1 file2 d:\
  2274. c:\> f:\util\mapmem /v
  2275. c:\> "c:\program files\jp software\take command\tcmd.exe" /l
  2276. The last three commands above include both a command name, and one or
  2277. more parameters. There are no spaces within the command name (except in
  2278. quoted file names), but there is a space between the command name and
  2279. any parameters, and there are spaces between the parameters.
  2280. Some commands may work when parameters are entered directly after the
  2281. command (without an intervening space, e.g. DIR/P), or when several
  2282. parameters are entered without spaces between them (e.g. DIR /2/P).
  2283. A very few older programs may even require this approach. However
  2284. leaving out spaces in this way is usually technically incorrect, and is
  2285. not recommended as a general practice, as it may not work for all
  2286. commands.
  2287. If the command name includes a path, the elements must be separated with
  2288. backslashes (e.g. F:\UTIL\MAPMEM). If you are accustomed to Unix syntax
  2289. where forward slashes are used in command paths, and want 4DOS to
  2290. recognize this approach, you can set 476UnixPaths to Yes in
  2291. 4DOS.INI.
  2292. For more information on command entry see 041Multiple Commands and
  2293. 044Command Line Length Limits. For details on how 4DOS handles the
  2294. various elements it finds on the command line see 117Command Parsing.
  2295. ;---------------------------------------------------------------------------
  2296. !TOPIC 71 File Selection
  2297. !NOINDEX
  2298. Most internal commands (like COPY, DIR, etc.) work on a file or a group of
  2299. files. Besides typing the exact name of the file you want to work with,
  2300. you can use several shorthand forms for naming or selecting files and the
  2301. applications associated with them.
  2302. Most of the features explained in this section apply to 4DOS commands only,
  2303. and can not be used to pass file names to external programs unless
  2304. those programs were specifically written to support these features.
  2305. The file selection features are:
  2306. 072Extended Parent Directory Names
  2307. 073Wildcards
  2308. 074Date, Time, and Size Ranges
  2309. 078File Exclusion Ranges
  2310. 079Multiple Filenames
  2311. 080Include Lists
  2312. 081LFN File Searches
  2313. 082Executable Extensions
  2314. 057@File Lists
  2315. 056Command Switches for File Selection
  2316. ;---------------------------------------------------------------------------
  2317. !TOPIC 72 Extended Parent Directory Names
  2318. !NOINDEX
  2319. 4DOS allows you to extend the traditional DOS ".." syntax for naming
  2320. the parent directory, by adding additional [.] characters. Each
  2321. additional [.] represents an additional directory level above the
  2322. current directory. For example, .\FILE.DAT refers to a file in the current
  2323. directory, ..\FILE.DAT refers to a file one level up (in the parent
  2324. directory), and ...\FILE.DAT refers to a file two levels up (in the parent
  2325. of the parent directory). If you are in the C:\DATA\FINANCE\JANUARY
  2326. directory and want to copy the file LETTERS.DAT from the directory C:\DATA
  2327. to drive A:
  2328. C:\DATA\FINANCE\JANUARY> copy ...\LETTERS.DAT A:
  2329. ;---------------------------------------------------------------------------
  2330. !TOPIC 73 Wildcards
  2331. !NOINDEX
  2332. Wildcards let you specify a file or group of files by typing a partial
  2333. filename. The appropriate directory is scanned to find all of the files
  2334. that match the partial name you have specified.
  2335. Wildcards are usually used to specify which files should be processed by a
  2336. command. If you need to specify which files should not be processed see
  2337. 078File Exclusion Ranges (for internal commands), or 623EXCEPT (for external
  2338. commands).
  2339. Most internal commands accept filenames with wildcards anywhere that a full
  2340. filename can be used. There are two wildcard characters, the asterisk [*]
  2341. and the question mark [?], plus a special method of specifying a range
  2342. of permissible characters.
  2343. An asterisk [*] in a filename means "any zero or more characters in
  2344. this position." For example:
  2345. c:\> dir *.* Displays a list of all files in the current
  2346. directory
  2347. c:\> dir *.txt Displays a list of all .TXT files in the current
  2348. directory
  2349. If you know that the file you are looking for has a base name that begins
  2350. with ST and an extension that begins with .D, you can find it this
  2351. way. Filenames such as STATE.DAT, STEVEN.DOC, and ST.D will all be displayed:
  2352. c:\> dir st*.d*
  2353. With 4DOS, you can also use the asterisk to match filenames with specific
  2354. letters somewhere inside the name. The following example will display any
  2355. file with a .TXT extension that has the letters AM together anywhere inside
  2356. its base name. It will, for example, display AMPLE.TXT, STAMP.TXT,
  2357. CLAM.TXT, and AM.TXT:
  2358. c:\> dir *am*.txt
  2359. A question mark [?] matches any single filename character. You can put
  2360. the question mark anywhere in a filename and use as many question marks as
  2361. you need. The following example will display files with names like
  2362. LETTER.DOC and LATTER.DAT, and LITTER.DU:
  2363. c:\> dir l?tter.d??
  2364. The use of an asterisk wildcard before other characters, and of the
  2365. character ranges discussed below, are enhancements to the standard wildcard
  2366. syntax, and may not work properly with software other than 4DOS and Take
  2367. Command.
  2368. "Extra" question marks in your wildcard specification are ignored if the file
  2369. name is shorter than the wildcard specification. For example, if you have
  2370. files called LETTER.DOC, LETTER1.DOC, and LETTERA.DOC, this command will
  2371. display all three names:
  2372. c:\> dir letter?.doc
  2373. The file LETTER.DOC is included in the display because the "extra" question
  2374. mark at the end of "LETTER?" is ignored when matching the shorter name
  2375. LETTER.
  2376. In some cases, the question mark wildcard may be too general. You can
  2377. also specify what characters you want to accept (or exclude) in a
  2378. particular position in the filename by using square brackets. Inside the
  2379. brackets, you can put the individual acceptable characters or ranges of
  2380. characters. For example, if you wanted to match LETTER0.DOC through
  2381. LETTER9.DOC, you could use this command:
  2382. c:\> dir letter[0-9].doc
  2383. You could find all files that have a vowel as the second letter in their
  2384. name this way. This example also demonstrates how to mix the wildcard
  2385. characters:
  2386. c:\> dir ?[aeiouy]*.*
  2387. You can exclude a group of characters or a range of characters by using an
  2388. exclamation mark [!] as the first character inside the brackets. This
  2389. example displays all filenames that are at least 2 characters long
  2390. except those which have a vowel as the second letter in their names:
  2391. c:\> dir ?[!aeiouy]*.*
  2392. The next example, which selects files such as AIP, BIP, and TIP but not
  2393. NIP, demonstrates how you can use multiple ranges inside the brackets. It
  2394. will accept a file that begins with an A, B, C, D, T,
  2395. U, or V:
  2396. c:\> dir [a-dt-v]ip
  2397. You may use a question mark character inside the brackets, but its
  2398. meaning is slightly different than a normal (unbracketed) question mark
  2399. wildcard. A normal question mark wildcard matches any character, but will
  2400. be ignored when matching a name shorter than the wildcard specification, as
  2401. described above. A question mark inside brackets will match any character,
  2402. but will not be discarded when matching shorter filenames. For
  2403. example:
  2404. c:\> dir letter[?].doc
  2405. will display LETTER1.DOC and LETTERA.DOC, but not LETTER.DOC.
  2406. A pair of brackets with no characters between them [], or an exclamation
  2407. point and question mark together [!?], will match only if there is no
  2408. character in that position. For example,
  2409. c:\> dir letter[].doc
  2410. will not display LETTER1.DOC or LETTERA.DOC, but will display
  2411. LETTER.DOC. This is most useful for commands like
  2412. c:\> dir /I"[]" *.btm
  2413. which will display a list of all .BTM files which don't have a description
  2414. because the empty brackets match only an empty description string (DIR /I
  2415. selects files to display based on their descriptions).
  2416. You can repeat any of the wildcard characters in any combination you
  2417. desire within a single file name. For example, the following command lists
  2418. all files which have an A, B, or C as the third character,
  2419. followed by zero or more additional characters, followed by a D, E,
  2420. or F, followed optionally by some additional characters, and with an
  2421. extension beginning with P or Q. You probably won't need to do
  2422. anything this complex, but we've included it to show you the flexibility of
  2423. extended wildcards:
  2424. c:\> dir ??[abc]*[def]*.[pq]*
  2425. You can also use the square bracket wildcard syntax to work around a conflict
  2426. between long filenames containing semicolons [;], and the use of a
  2427. semicolon to indicate an 080Include List. For example, if you have a
  2428. file named C:\DATA\LETTER1;V2 and you enter this command:
  2429. c:\> del \data\letter1;v2
  2430. you will not get the results you expect. Instead of deleting the named file,
  2431. 4DOS will attempt to delete LETTER1 and then V2, because the semicolon
  2432. indicates an include list. However, if you use square brackets
  2433. around the semicolon it will be interpreted as a filename character, and
  2434. not as an include list separator. For example, this command would delete
  2435. the file named above:
  2436. c:\> del \data\letter1[;]v2
  2437. Also, extra caution should be taken using wildcards on long file names
  2438. because operations using wildcards will be performed on both long and short
  2439. filenames. See 081LFN File Searches for more information.
  2440. ;---------------------------------------------------------------------------
  2441. !TOPIC 74 Ranges -- Date, Time, and Size Ranges
  2442. !NOINDEX
  2443. Most internal commands which accept wildcards also allow date, time, and
  2444. size ranges to further define the files that you wish to work with. 4DOS
  2445. will examine each file's size and timestamp (a record of when the file
  2446. was created, last modified, or last accessed) to determine if the file meets
  2447. the range criteria you have specified.
  2448. (4DOS also supports 078File Exclusion Ranges to exclude files from a
  2449. command. These are similar to date, time, and size ranges, but have a
  2450. slightly different purpose and therefore are documented separately.)
  2451. A range begins with the switch character (usually a slash [/]),
  2452. followed by a left square bracket ("[") and a character that specifies
  2453. the range type: "s" for a size range, "d" for a date range, or "t" for a
  2454. time range. The "s", "d", or "t" is followed by a start value, and an
  2455. optional comma and end value. The range ends with a right square bracket
  2456. ("]"). For example, to select files between 100 and 200 bytes long you
  2457. could use the range /[s100,200].
  2458. See the individual range types for details on specifying ranges:
  2459. 075Size Ranges
  2460. 076Date Ranges
  2461. 077Time Ranges
  2462. Using Ranges
  2463. All ranges are inclusive. For example, a size range which selects files from
  2464. 10,000 to 20,000 bytes long will match files that are exactly 10,000 bytes
  2465. and 20,000 bytes long, as well as all sizes in between; a date range that
  2466. selects files last modified between 6-27-2000 and 6-30-2000 will include files
  2467. modified on each of those dates, and on the two days in between.
  2468. If you reverse range start and end values 4DOS will
  2469. recognize the reversal, and will use the second (lower) value as the start
  2470. point of the range and the first (higher) value as its end point. For
  2471. example, selecting files between 100 and 200 bytes long could also
  2472. be entered as /[s200,100].
  2473. If you combine two types of ranges, a file must satisfy both ranges to be
  2474. included. For example, /[d2-8-00,2-9-00] /[s1024,2048] means files
  2475. last modified between February 8 and February 9, 2000, which are also
  2476. between 1,024 and 2,048 bytes long.
  2477. When you use a date, time, size, or file exclusion range in a
  2478. command, it should immediately follow the command name, so that any
  2479. additional switches for the command are after any range(s) used. If
  2480. the range is placed later in the command it may be ignored, or cause
  2481. an error. Unlike some command switches which apply to only part of
  2482. the command line, the range usually applies to all file names
  2483. specified for the command.
  2484. For example:
  2485. c:\> dir /[d6-1-00,+0] *.c Get a directory of all the *.C files
  2486. dated June 1, 2000.
  2487. c:\> del /[s0,0] *.* /s Delete all the 0-byte files on the
  2488. hard disk.
  2489. c:\> copy /[d-1] /[s1] *.* a: Copy all the non-zero byte files
  2490. that were changed yesterday or today.
  2491. c:\> copy /[s10k,20k] *.* a: Copy all the files with sizes from
  2492. 10,000 to 20,000 bytes to drive A:.
  2493. Drives which support long filenames (e.g. under Windows 95/98/ME, or
  2494. under plain DOS with a suitable LFN driver loaded) maintain 3 sets of
  2495. dates and times for each file: creation, last access, and last write
  2496. (for last access only the date is recorded; the last access time is
  2497. always returned as 00:00). By default, date and time ranges work
  2498. with the last write time stamp. You can use the "last access" (a)
  2499. or "created" (c) time stamp in a date or time range with the syntax:
  2500. /[da...] or /[dc...] or /[ta...] or /[tc...]
  2501. For example, to select files that were last accessed yesterday or today:
  2502. /[da-1]
  2503. Date, time, and size ranges can be used with the 596ATTRIB,
  2504. 606COPY, 609DEL, 611DESCRIBE, 612DIR, 615DO,
  2505. 623EXCEPT, 625FFIND, 626FOR, 697HEAD, 640LIST,
  2506. 646MOVE, 655RD / RMDIR, 658REN, 662SELECT,
  2507. 698TAIL, 674TOUCH, 675TREE, and 677TYPE commands. They
  2508. cannot be used with filename completion or in filename arguments for
  2509. variable functions.
  2510. ;---------------------------------------------------------------------------
  2511. !TOPIC 75 Size Ranges
  2512. !NOINDEX
  2513. Size ranges simply select files whose size is between the limits given. For
  2514. example, /[s10000,20000] selects files between 10,000 and 20,000 bytes long.
  2515. Either or both values in a size range can end with "k" to indicate
  2516. thousands of bytes, "K" to indicate kilobytes (1,024 bytes), "m" to
  2517. indicate millions of bytes, "M" to indicate megabytes (1,048,576 bytes),
  2518. "g" to indicate billions of bytes or "G" to indicate gigabytes
  2519. (1,073,741,824 bytes). For example, the range above could be rewritten as
  2520. /[s10k,20k].
  2521. The second argument of a size range is optional. If you use a single
  2522. argument, like /[s10k], you will select files of that size or larger. You
  2523. can also precede the second argument with a plus sign [+]; when you
  2524. do, it is added to the first value to determine the largest file size to
  2525. include in the search. For example, /[s10k,+1k] select files from
  2526. 10,000 through 11,000 bytes in size.
  2527. Some further examples of size ranges:
  2528. Specification Selects Files
  2529. /[s0,0] of length zero (empty)
  2530. /[s1M] 1 megabyte or more in length
  2531. /[s10k,+200] between 10,000 and 10,200 bytes
  2532. ;---------------------------------------------------------------------------
  2533. !TOPIC 76 Date Ranges
  2534. !NOINDEX
  2535. Date ranges select files that were created or last modified at any time
  2536. between the two dates. For example, /[d12-1-99,12-5-99] selects files
  2537. that were last modified between December 1, 1999, and December 5, 1999.
  2538. You can use hyphens, slashes, or periods to separate the month, day, and
  2539. year. 4DOS generally accepts dates between January 1, 1980 and
  2540. December 31, 2099. The year can be entered as a 2-digit or 4-digit
  2541. value. Two-digit years between 80 and 99 are interpreted as
  2542. 1980 - 1999; values between 00 and 79 are interpreted as
  2543. 2000 - 2079. References to years beyond 2079 must be entered
  2544. with 4 digits. For example, /[d12-31-99,1-1-00] is equivalent
  2545. to /[d12-31-1999,1-1-2000], and selects files modified on
  2546. December 31, 1999 or January 1, 2000.
  2547. If an argument begins with a four digit year greater than 1900, it's assumed
  2548. to be a date in the ISO 8601 international format (yyyy-mm-dd). If the
  2549. date contains the letter "W", it is assumed to be in the ISO 8601 week date
  2550. format yyyy-Www-d, where yyyy = year, ww = week, d = week day. If the
  2551. date is entered as two numbers in the format yyyy-ddd, it is assumed to be
  2552. in the ISO 8601 ordinal date format, where yyyy = year, ddd = day of the
  2553. year.
  2554. The time for the starting date defaults to 00:00:00 and the time for the
  2555. ending date defaults to 23:59:59. You can alter these defaults, if you
  2556. wish, by including a start and stop time inside the date range. The time
  2557. is separated from the date with an at sign [@]. For example, the range
  2558. /[d7-1-00@8:00a,7-3-00@6:00p] selects files that were modified at any
  2559. time between 8:00 am on July 1, 2000 and 6:00 pm on July 3, 2000. If you
  2560. prefer, you can specify the times in 24-hour format (e.g., @18:00 for the
  2561. end time in the previous example).
  2562. If you omit the second argument in a date range, 4DOS substitutes the
  2563. current date and time. For example, /[d10-1-99] selects files dated
  2564. between October 1, 1999 and today.
  2565. You can use an offset value for either the beginning or ending date, or
  2566. both. An offset begins with a plus sign [+] or a minus sign [-]
  2567. followed by an integer. If you use an offset for the second value, it is
  2568. calculated relative to the first. If you use an offset for the first (or
  2569. only) value, the current date is used as the basis for calculation. For
  2570. example:
  2571. Specification Selects Files
  2572. /[d10-27-99,+3] modified between 10-27-99 and 10-30-99
  2573. /[d10-27-99,-3] modified between 10-24-99 and 10-27-99
  2574. /[d-0] modified today (from today minus zero days, to
  2575. today)
  2576. /[d-1] modified yesterday or today (from today minus one
  2577. day, to today)
  2578. /[d-1,+0] modified yesterday (from today minus one day, to
  2579. zero days after that)
  2580. As a shorthand way of specifying files modified today, you can also use
  2581. /[d]; this has the same effect as the /[d-0] example shown above.
  2582. To select files last modified n days ago or earlier, use
  2583. /[dn,1/1/80]. For example, to get a directory of all files last modified
  2584. 3 days or more before today (i.e., those files not modified within the
  2585. last 3 days), you could use this command:
  2586. c:\> dir /[d-3,1/1/80]
  2587. This reversed date range (with the later date given first) will be handled
  2588. correctly by 4DOS. It takes advantage of the facts that an offset in the
  2589. start date is relative to today, and that the base or "zero" point for PC
  2590. file dates is January 1, 1980.
  2591. Note: If you do not specify a time in a reversed date range, the default
  2592. times will be applied before the first and second dates are swapped to become
  2593. the ending and starting dates respectively. If you want to include the
  2594. entire first and last days of a reversed date range, simply add a specific
  2595. @00:00:00 to your intended start date and a @23:59:59 to your intended
  2596. end date.
  2597. You cannot use offsets in the time portion of a date range (the part after
  2598. an @ sign), but you can combine a time with a date offset. For example,
  2599. /[d12-8-99@12:00,+2@12:00] selects files that were last modified
  2600. between noon on December 8 and noon on December 10, 1999. Similarly,
  2601. /[d-2@15:00,+1] selects files last modified between 3:00 pm the day
  2602. before yesterday and the end of the day one day after that, i.e.,
  2603. yesterday. The second time defaults to the end of the day because no time
  2604. is given.
  2605. Drives which support long filenames (e.g. under Windows 95/98/ME, or
  2606. under plain DOS with a suitable LFN driver loaded) maintain 3 sets
  2607. of dates and times for each file: creation, last access, and last write
  2608. (for last access only the date is recorded; the last access time is
  2609. always returned as 00:00). By default, date ranges work with the last
  2610. write time stamp. You can use the "last access" (a) or "created" (c)
  2611. date/time stamp in a date range with the syntax:
  2612. /[da...] or /[dc...]
  2613. For example, to select files that were last accessed yesterday or today:
  2614. /[da-1]
  2615. ;---------------------------------------------------------------------------
  2616. !TOPIC 77 Time Ranges
  2617. !NOINDEX
  2618. A time range specifies a file modification time without reference to the
  2619. date. For example, to select files modified between noon and 2:00 pm on
  2620. any date, use /[t12:00p,2:00p]. The times in a time range can either
  2621. be in 12-hour format, with a trailing "a" for AM or "p" for PM, or in 24-hour
  2622. format.
  2623. If you omit the second argument in a time range, you will select files that
  2624. were modified between the first time and the current time, on any date. You
  2625. can also use offsets, beginning with a plus sign [+] or a minus
  2626. sign [-] for either or both of the arguments in a time range. The
  2627. offset values are interpreted as minutes. Some examples:
  2628. Specification Selects Files
  2629. /[t12:00p,+120] modified between noon and 2:00 PM on any date
  2630. /[t-120,+120] modified between two hours ago and the current
  2631. time on any date
  2632. /[t0:00,11:59] modified in the morning on any date
  2633. Drives which support long filenames (e.g. under Windows 95/98/ME,
  2634. or under plain DOS with a suitable LFN driver loaded) maintain 3 sets
  2635. of dates and times for each file: creation, last access, and last write
  2636. (for last access only the date is recorded; the last access time is always
  2637. returned as 00:00). By default, time ranges work with the last
  2638. write time stamp. You can use the "last access" (a) or "created" (c)
  2639. time stamp in a time range with the syntax:
  2640. /[ta...] or /[tc...]
  2641. ;---------------------------------------------------------------------------
  2642. !TOPIC 78 File Exclusion Ranges
  2643. !NOINDEX
  2644. Most internal commands which accept wildcards also accept file exclusion
  2645. ranges to further define the files that you wish to work with. 4DOS
  2646. examines each file name and excludes files that match the names you have
  2647. specified in a file exclusion range.
  2648. A file exclusion range begins with the switch character (usually a slash),
  2649. followed by a left square bracket and an exclamation mark ("[!") The range
  2650. ends with a right square bracket ("]").
  2651. Inside the brackets, you can list one or more filenames to be excluded from
  2652. the command. The filenames can include wildcards and extended wildcards,
  2653. but cannot include path names or drive letters.
  2654. The following example will display all files in the current directory except
  2655. backup files (files with the extension .BAK or .BKP):
  2656. c:\> dir /[!*.bak *.bkp] *.*
  2657. You can combine file exclusion ranges with 074date, time, and size ranges.
  2658. This example displays all files that are 10K bytes or larger in size
  2659. and that were created in the last 7 days, except .C and .H files:
  2660. c:\> dir /[s10k] /[d-7] /[!*.c *.h] *.*
  2661. File exclusion ranges will only work for 4DOS internal commands. The
  2662. 623EXCEPT command can be used to exclude files from processing by many
  2663. external commands.
  2664. When you use a file exclusion range in a command it should
  2665. immediately follow the command name. See Using Ranges under
  2666. 074Date, Time, and Size Ranges for additional details.
  2667. See also 080Include Lists.
  2668. ;---------------------------------------------------------------------------
  2669. !TOPIC 79 Multiple Filenames
  2670. !NOINDEX
  2671. Most file processing commands can work with multiple files at one time. To
  2672. use multiple file names, you simply list the files one after another on the
  2673. command line, separated by spaces. You can use wildcards in any or all of
  2674. the filenames. For example, to copy all .TXT and .DOC files from the
  2675. current directory to drive A, you could use this command:
  2676. c:\> copy *.txt *.doc a:
  2677. If the files you want to work with are not in the default directory, you
  2678. must include the full path with each filename:
  2679. c:\> copy a:\details\file1.txt a:\details\file1.doc c:
  2680. Multiple filenames are handy when you want to work with a group of files which
  2681. cannot be defined with a single filename and wildcards. They let you be very
  2682. specific about which files you want to work with in a command.
  2683. (For another method which allows you to specify multiple filenames with a
  2684. single path before them, see 080Include Lists.)
  2685. Caution: When you use multiple filenames with a command that expects both a
  2686. source and a destination, like 606COPY or 646MOVE, be sure that
  2687. you always include a specific destination on the command line. If you
  2688. don't, the command will assume that the last filename is the destination
  2689. and may overwrite important files.
  2690. Like extended wildcards and include lists, the multiple filenames
  2691. will work with internal commands but not with external programs, unless
  2692. those programs have been written to handle multiple file names on the
  2693. command line.
  2694. If you have a list of files to process that's too long to put on the
  2695. command line or too time-consuming to type, see 626FOR or 662SELECT
  2696. for another way of passing multiple file names to a command.
  2697. ;---------------------------------------------------------------------------
  2698. !TOPIC 80 Include Lists
  2699. !NOINDEX
  2700. Any internal command that accepts 079multiple filenames will also
  2701. accept one or more include lists. An include list is simply a group of
  2702. filenames, with or without wildcards, separated by semicolons [;]. All
  2703. files in the include list must be in the same directory. You may not add a
  2704. space on either side of the semicolon.
  2705. For example, you can shorten this command which uses multiple file names:
  2706. c:\> copy a:\details\file1.txt a:\details\file1.doc c:
  2707. to this using an include list:
  2708. c:\> copy a:\details\file1.txt;file1.doc c:
  2709. Include lists are similar to multiple filenames, but have three important
  2710. differences. First, you don't have to repeat the path to your files if you
  2711. use an include list, because all of the included files must be in the same
  2712. directory. Second, if you use include lists, you aren't as likely to
  2713. accidentally overwrite files if you forget a destination path for commands
  2714. like COPY, because the last name in the list will be part of the include
  2715. list, and won't be seen as the destination file name. Include lists can
  2716. only be used as the source parameter (the location files are coming from)
  2717. for COPY and other similar commands. They cannot be used to specify a
  2718. destination for files.
  2719. Third, multiple filenames and include lists are processed differently by the
  2720. 612DIR and 662SELECT commands. If you use multiple filenames, all of
  2721. the files matching the first filename are processed, then all of the files
  2722. matching the second name, and so on. When you use an include list, all
  2723. files that match any entry in the include list are processed together, and
  2724. will appear together in the directory display or SELECT list. You can see
  2725. this difference clearly if you experiment with both techniques and the DIR
  2726. command. For example:
  2727. c:\> dir *.txt *.doc Lists the .TXT files then the .DOC files,
  2728. in two separate lists.
  2729. c:\> dir *.txt;*.doc Lists the .TXT and .DOC files in a single list.
  2730. Like extended wildcards and multiple filenames, the include list feature
  2731. will work with internal commands, but not with most external programs (unless
  2732. they have been programmed to support them). The maximum length of an include
  2733. list is 260 characters.
  2734. See also 078File Exclusion Ranges.
  2735. ;---------------------------------------------------------------------------
  2736. !TOPIC 81 LFN File Searches
  2737. !NOINDEX
  2738. In an LFN environment like vDosPlus, files on volumes which support long
  2739. filenames (VFAT, FAT32, etc. volumes) can have both a long file name
  2740. (LFN) and a short FAT-compatible file name. 4DOS normally examines
  2741. both forms of each file name when searching for files. It does
  2742. so in order to remain compatible with the default command
  2743. processor, COMMAND.COM.
  2744. The long filename is checked first, and if it does not match then the short
  2745. name is checked. Matching files which have only a short filename will be
  2746. found during the first search, because in that case Windows treats the short
  2747. name as if it were a long name.
  2748. For example, suppose you have two files in a directory with these names:
  2749. Long Name Short Name
  2750. --------------- ------------
  2751. Letter Home.DOC LETTER~1.DOC
  2752. Letter02.DOC LETTER02.DOC
  2753. A search for LETTER??.DOC will find both files. The second file
  2754. (LETTER02.DOC) will be found during the search of long filenames. The
  2755. firstfile ("Letter Home.DOC") will be found during the search of short
  2756. filenames.
  2757. You can change this default behavior with the 447Win95SFNSearch directive
  2758. in 4DOS.INI. Set Win95SFNSearch to No to disable the secondary short filename
  2759. search. This will prevent the potential problem described above, but
  2760. will make 4DOS's behavior inconsistent with that of COMMAND.COM.
  2761. Caution: Take extra care when you use wildcards to perform operations on
  2762. LFN volumes because you may select more files than you intended. For example,
  2763. Windows often creates short filenames that end "~1.", "~2.", etc. If you
  2764. use a command like:
  2765. del *1.*
  2766. you will delete all such files, including most files with long filenames,
  2767. which is probably not the result you intended!
  2768. ;---------------------------------------------------------------------------
  2769. !TOPIC 82 Executable Extensions
  2770. !NOINDEX
  2771. Normally, when you type a filename (as opposed to an alias or internal
  2772. command name) as the first word on the command line, 4DOS looks for a
  2773. file with that name to execute.
  2774. The file's extension may be .EXE or .COM to indicate that it contains a
  2775. program; or .BTM or .BAT to indicate a batch file. The exact list of
  2776. default extensions for executable files varies slightly depending on
  2777. which operating system you use, because each has its own rules for batch
  2778. file extensions. (See 649PATH and 143PATHEXT for additional
  2779. ways to control the search for executable files.)
  2780. You can add to the default list of extensions, and have 4DOS take the
  2781. action you want with files that are not executable programs or batch
  2782. files. The action taken is always based on the file's extension. For
  2783. example, you could start your text editor whenever you type the name of
  2784. a .DOC file, or start your database manager whenever you type the name
  2785. of a .DAT file.
  2786. You use environment variables to define the internal command, external
  2787. program, batch file, or alias to run for each defined file extension.
  2788. To create an executable extension for use only in 4DOS, use the SET
  2789. command to create a new environment variable. An environment variable
  2790. is recognized as an executable extension if its name begins with a period.
  2791. The syntax for creating an executable extension is:
  2792. set .ext=command [options]
  2793. where .EXT is the executable file extension; command is the name of the
  2794. internal command, external program, alias, or batch file to run; and
  2795. [options] are any command-line startup options you want to specify for
  2796. the program, batch file, or alias. You can specify multiple extensions
  2797. for a single command by separating them with semicolons, for example:
  2798. set .txt;.doc;.lst=command [options]
  2799. For example, if you want to run a word processor called EDITOR whenever you
  2800. type the name of a file that has an extension of .EDT, you could use this
  2801. command:
  2802. c:\> set .edt=c:\edit\editor.exe
  2803. If the command is a batch file or external program, 4DOS will search the
  2804. 138PATH for it if necessary. However, you can make sure that the correct
  2805. program or batch file is used, and speed up the executable extension, by
  2806. specifying the full name including drive, path, filename, and extension.
  2807. This example defines B.EXE (the Boxer text editor) as the processor for .MAK
  2808. files:
  2809. c:\> set .mak=c:\boxer\b.exe -s
  2810. With this definition, if you have a file named INIT.MAK in the current
  2811. directory and enter the command:
  2812. c:\source> init
  2813. 4DOS will execute the command:
  2814. c:\boxer\b.exe -s c:\source\init.mak
  2815. Notice that the full pathname of INIT.MAK is automatically included. If you
  2816. enter parameters on the command line, they are appended to the end of the
  2817. command. For example, if you changed the above entry to:
  2818. c:\source> init -w
  2819. 4DOS would execute the command:
  2820. c:\boxer\b.exe -s c:\source\init.mak -w
  2821. In order for executable extensions to work, the command, program, batch
  2822. file, or alias must be able to interpret the command line properly. For
  2823. example, if a program you want to run doesn't accept a file name on its
  2824. command line as shown in these examples, then executable extensions won't
  2825. work with that program. However, you can always point it to a 4DOS batch
  2826. file which will do the necessary parameter conversions for you and then
  2827. call the desired destination program.
  2828. Executable extensions may include 073wildcards, so you could, for example,
  2829. run your text editor for any file with an extension beginning with T
  2830. by defining an executable extension called .T*. Extended wildcards
  2831. (e.g., DO[CT] for .DOC and .DOT files) may also be used.
  2832. To remove an executable extension, use the 680UNSET command to remove the
  2833. corresponding variable.
  2834. ;---------------------------------------------------------------------------
  2835. !TOPIC 83 Critical Errors
  2836. !NOINDEX
  2837. DOS watches for physical errors during input and output operations. Physical
  2838. errors are those due to hardware problems.
  2839. These errors are called critical errors because DOS, 4DOS, or your
  2840. application program cannot proceed until the error is resolved.
  2841. When a critical error occurs, you will see a message asking you to choose
  2842. one of four error handling options. The message comes from 4DOS or your
  2843. application, and will vary slightly depending on your operating system and
  2844. whether you are in full-screen or windowed mode. However, the options and
  2845. their neanings are similar in all cases:
  2846. Retry Retry the operation. Choose this option if you have
  2847. corrected the problem.
  2848. Ignore Ignore the error and continue. Use caution when
  2849. choosing this option. Ignoring critical errors,
  2850. especially on the hard disk, can cause errors in your
  2851. applications or damage data on the disk.
  2852. Fail Tell the program that the operation failed. This option
  2853. returns an error code to 4DOS or to the application
  2854. program that was running when the error occurred. 4DOS
  2855. generally stops the current command when an operation
  2856. fails. This option is not available for all errors; if
  2857. you don't see it, use Abort instead. You can force a Fail
  2858. response to all critical errors with the 562CritFail
  2859. directive in 4DOS.INI.
  2860. Abort Abort the program. Choose this option to stop the
  2861. program that was running when the error occurred.
  2862. Choosing Abort will abort the command, but not 4DOS
  2863. itself.
  2864. ;---------------------------------------------------------------------------
  2865. !TOPIC 84 Conditional Commands
  2866. !NOINDEX
  2867. When an internal command or external program finishes, it returns a result
  2868. called the exit code. Conditional commands allow you to perform tasks based
  2869. upon the previous command's exit code. Many programs return a 0 if they are
  2870. successful and a non-zero value if they encounter an error.
  2871. If you separate two commands by && (AND), the second command will be
  2872. executed only if the first returns an exit code of 0. For example, the
  2873. following command will only erase files if the BACKUP operation succeeds:
  2874. c:\> backup c:\ a: && del c:\*.bak;*.lst
  2875. If you separate two commands by || (OR), the second command will be
  2876. executed only if the first returns a non-zero exit code. For example, if
  2877. the following BACKUP operation fails, then ECHO will display a message:
  2878. c:\> backup c:\ a: || echo Error in the backup!
  2879. All internal commands return an exit code, but not all external programs
  2880. do. Conditional commands will behave unpredictably if you use them with
  2881. external programs which do not return an explicit exit code. To determine
  2882. whether a particular external program returns a meaningful exit code use an
  2883. ECHO %? command immediately after the program is finished. If the
  2884. program's documentation does not discuss exit codes you may need to
  2885. experiment with a variety of conditions to see how the exit code changes.
  2886. ;---------------------------------------------------------------------------
  2887. !TOPIC 85 Command Grouping
  2888. !NOINDEX
  2889. Command grouping allows you to group a set of commands together logically
  2890. by enclosing them in parentheses. The parentheses are similar in function
  2891. to the BEGIN and END block statements in some programming languages.
  2892. There are two primary uses for command grouping. One is to execute multiple
  2893. commands in a place where normally only a single command is allowed. For
  2894. example, suppose you want to execute two different 658REN
  2895. commands in all subdirectories of your hard disk. You could do it like this:
  2896. c:\> global ren *.wx1 *.wxo
  2897. c:\> global ren *.tx1 *.txo
  2898. But with command grouping you can do the same thing in one command:
  2899. c:\> global (ren *.wx1 *.wxo ^ ren *.tx1 *.txo)
  2900. The two REN commands enclosed in the parentheses appear to 628GLOBAL as if
  2901. they were a single command, so both commands are executed for every directory,
  2902. but the directories are only scanned once, not twice.
  2903. This kind of command grouping is most useful with the 623EXCEPT, 626FOR,
  2904. 628GLOBAL, and 633IF commands. When you use this approach in a batch
  2905. file you must either place all of the commands in the group on one line, or
  2906. place the opening parenthesis at the end of a line and place the commands on
  2907. subsequent lines. For example, the first two of these sequences will work
  2908. properly, but the third will not:
  2909. for %f in (1 2 3) (echo hello %f ^ echo goodbye %f)
  2910. for %f in (1 2 3) (
  2911. echo hello %f
  2912. echo goodbye %f
  2913. )
  2914. for %f in (1 2 3) (echo hello %f
  2915. echo goodbye %f)
  2916. The second common use of command grouping is to 050redirect input or output
  2917. for several commands without repeatedly using the redirection symbols. For
  2918. example, consider the following batch file fragment which places some header
  2919. lines (including today's date) and directory displays in an output file using
  2920. redirection. The first ECHO command creates the file using >, and the other
  2921. commands append to the file using >>:
  2922. echo Data files %_date > filelist
  2923. dir *.dat >> filelist
  2924. echo. >> filelist
  2925. echo Text files %_date >> filelist
  2926. dir *.txt >> filelist
  2927. Using command grouping, these commands can be written much more simply.
  2928. Enter this example on one line:
  2929. (echo Data files %_date ^ dir *.dat ^ echo. ^ echo Text files %_date
  2930. ^ dir *.txt) > filelist
  2931. The redirection applies to all the commands within the parentheses. Because
  2932. the redirection is performed only once, the commands will run slightly
  2933. faster than if each command was entered separately. The same approach can
  2934. be used for input 051redirection and for 052piping.
  2935. You can also use command grouping in a batch file or at the prompt to split
  2936. commands over several lines. This last example is like the redirection
  2937. example above, but is entered at the prompt. Note the "More?" prompt after
  2938. each incomplete line. None of the commands are executed until the command
  2939. group is completed with the closing parenthesis. This example does not
  2940. have to be entered on one line:
  2941. c:\> (echo Data files %_date
  2942. More? dir *.dat
  2943. More? echo.
  2944. More? echo Text files %_date
  2945. More? dir *.txt) > filelist
  2946. c:\>
  2947. A group of commands in parentheses is like a long command line. The total
  2948. length of the group may not exceed 511 characters in 4DOS, whether the
  2949. commands are entered from the prompt, an alias, or a batch file. The limit
  2950. includes the space required to expand aliases and environment variables
  2951. used within the group. In addition, each line you type at the normal prompt
  2952. or the More? prompt, and each individual command within the line, must meet
  2953. the length limit of 511 characters.
  2954. ;---------------------------------------------------------------------------
  2955. !TOPIC 86 Escape Character
  2956. !NOINDEX
  2957. 4DOS recognizes a user-definable escape character. This character gives
  2958. the following character a special meaning; it is not the same as the
  2959. ASCII ESC that is often used in 915ANSI and printer control sequences.
  2960. The default escape character is Ctrl-X (ASCII 24), which will be displayed
  2961. here as an up arrow [].
  2962. If you don't like using the default escape character, you can pick another
  2963. character using the 664SETDOS /E command, the Options 1 page of the
  2964. 648OPTION dialogs, or the 426EscapeChar directive in 4DOS.INI. If you
  2965. plan to share aliases or batch files between 4DOS and 0204NT or 021Take
  2966. Command, see 054Special Character Compatibility for details about
  2967. choosing compatible escape characters for two or more products.
  2968. Ten special characters are recognized when they are preceded by the
  2969. escape character. The combination of the escape character and one of these
  2970. characters is translated to a single character, as shown below. These are
  2971. useful for redirecting codes to the printer; e is also useful to
  2972. generate 915ANSI escape sequences in your 652PROMPT, 619ECHO, or
  2973. other output commands. The special characters which can follow the escape
  2974. character are:
  2975. b backspace
  2976. c comma
  2977. e the ASCII ESC character (ASCII 27)
  2978. f form feed
  2979. k back quote
  2980. n line feed
  2981. q double quote
  2982. r carriage return
  2983. s space
  2984. t tab character
  2985. If you follow the escape character with any other character, the escape
  2986. character is removed and the second character is copied directly to the
  2987. command line. This allows you to suppress the normal meaning of special
  2988. characters (such as ? * / \ | " ` > < and &). For example, to display
  2989. a message containing a < symbol, which normally indicates redirection:
  2990. c:\> echo 2 is < 4
  2991. To send a form feed followed by the sequence ESC Y to the
  2992. printer, you can use this command:
  2993. c:\> echos feY > prn
  2994. The escape character has an additional use when it is the last character on
  2995. any line of a .BAT or .BTM batch file. 4DOS recognizes this use
  2996. of the escape character to signal line continuation: 4DOS removes the escape
  2997. character and appends the next line to the current line before executing it.
  2998. ;---------------------------------------------------------------------------
  2999. !TOPIC 101 Aliases
  3000. !NOINDEX
  3001. Much of the power of 4DOS comes together in aliases, which give you the
  3002. ability to create your own commands. An alias is a name that you
  3003. select for a command or group of commands. Simple aliases substitute a new
  3004. name for an existing command. More complex aliases can redefine the default
  3005. settings of internal or external commands, operate as very fast in-memory
  3006. batch files, and perform commands based on the results of other commands.
  3007. This topic will show you some examples of the power of aliases.
  3008. See the 595ALIAS command for complete details about writing your
  3009. own aliases.
  3010. The simplest type of alias gives a new name to an existing command. For
  3011. example, you could create a command called ROOT which uses 601CD
  3012. to switch to the root directory this way:
  3013. c:\> alias root = cd \
  3014. After the alias has been defined this way, every time you type the command
  3015. ROOT, you will actually execute the command CD \.
  3016. Aliases can also create customized versions of commands. For example, the
  3017. 612DIR command can sort a directory in various ways. You can create an
  3018. alias called DE that means "sort the directory by filename extension, and
  3019. pause after each page while displaying it" like this:
  3020. c:\> alias de = dir /oe /p
  3021. Aliases can be used to execute sequences of commands as well. The following
  3022. command creates an alias called W which saves the current drive and
  3023. directory, changes to the WP directory on drive C, runs the program
  3024. E:\WP60\WP.EXE, and, when the program terminates, returns to the original
  3025. drive and directory:
  3026. c:\> alias w = `pushd c:\wp ^ e:\wp60\wp.exe ^ popd`
  3027. This alias is enclosed in back-quotes because it contains multiple
  3028. commands. You must use the back-quotes whenever an alias contains multiple
  3029. commands, environment variables, parameters (see below), redirection, or
  3030. piping. See the 595ALIAS command for full details.
  3031. Aliases can be nested, that is, one alias can invoke another. For example,
  3032. the alias above could also be written as:
  3033. c:\> alias wp = e:\wp60\wp.exe
  3034. c:\> alias w = `pushd c:\wp ^ wp ^ popd`
  3035. If you enter W as a command, 4DOS will execute the
  3036. 653PUSHD command, detect that the next command (WP) is another alias, and
  3037. execute the program E:\WP60\WP.EXE, and - when the program exits - return
  3038. to the first alias, execute the 651POPD command, and return to the prompt.
  3039. You can use aliases to change the default options for both internal commands
  3040. and external commands. Suppose that you always want the 609DEL
  3041. command to prompt before it erases a file:
  3042. c:\> alias del = *del /p
  3043. An asterisk [*] is used in front of the second "del" to show that it is the
  3044. name of an internal command, not an alias. See the 595ALIAS command for
  3045. more information about this use of the asterisk.
  3046. You may have a program on your system that has the same name as an internal
  3047. command. Normally, if you type the command name, you will start the internal
  3048. command rather than the program you desire, unless you explicitly add its full
  3049. path on the command line. For example, if you have a program named
  3050. LIST.COM in the C:\UTIL directory, you could run it with the command
  3051. C:\UTIL\LIST.COM. However, if you simply type LIST, the internal
  3052. 640LIST command will be invoked instead. Aliases give you two ways to
  3053. get around this problem.
  3054. First, you could define an alias that runs the program in question, but with a
  3055. different name:
  3056. c:\> alias l = c:\util\list.com
  3057. Another approach is to rename the internal command and use the original name
  3058. for the external program. The following example renames the LIST command as
  3059. DISPLAY and then uses a second alias to run LIST.COM whenever you type LIST:
  3060. c:\> alias display = *list
  3061. c:\> alias list = c:\util\list.com
  3062. You can also assign an alias to a key, so that every time you press the key,
  3063. the command will be invoked. You do so by naming the alias with an at sign
  3064. [@] followed by a key name. After you enter this next example, you will
  3065. see a 2-column directory with paging whenever you press Shift-F5, then
  3066. Enter:
  3067. c:\> alias @Shift-F5 = *dir /2/p
  3068. This alias will put the 612DIR command on the command line when you press
  3069. Shift-F5, then wait for you to enter file names or additional switches. You
  3070. must press Enter when you are ready to execute the command. To execute the
  3071. command immediately, without displaying it on the command line or waiting for
  3072. you to press Enter, use two at signs at the start of the alias name:
  3073. c:\> alias @@Shift-F5 = *dir /2/p
  3074. The next example clears the screen whenever you press Alt-F1:
  3075. c:\> alias @@Alt-F1 = cls
  3076. Aliases have many other capabilities as well. This example creates a simple
  3077. command-line calculator using the 263@EVAL function. Once you have
  3078. entered the example, you can type CALC 4*19, for example, and you will see
  3079. the answer:
  3080. c:\> alias calc = `echo The answer is: %@eval[%&]`
  3081. Our last example in this section creates an alias called IN. It will
  3082. temporarily change directories, run an internal or external command, and then
  3083. return to the current directory when the command is finished:
  3084. c:\> alias in = `pushd %1 ^ %2& ^ popd`
  3085. Now if you type
  3086. c:\> in c:\letters wp letter.txt
  3087. you will change to the C:\LETTERS subdirectory, execute the command WP
  3088. LETTER.TXT and then return to the current directory.
  3089. The above example uses two parameters: %1 means the first argument on the
  3090. command line, and %2& means the second and all subsequent
  3091. arguments. Parameters are explained in detail under the 595ALIAS command.
  3092. See the 595ALIAS and 678UNALIAS commands for more information and
  3093. examples, and also 111Using Aliases in Batch Files.
  3094. ;---------------------------------------------------------------------------
  3095. !TOPIC 102 Batch Files
  3096. !NOINDEX
  3097. A batch file is a file that contains a list of commands to execute. 4DOS
  3098. reads and interprets each line as if it had been typed at the keyboard. Like
  3099. 595aliases, batch files are handy for automating computing
  3100. tasks. Unlike aliases, batch files can be as long as you wish. Batch
  3101. files take up separate disk space for each file, and can't usually execute
  3102. quite as quickly as aliases, since they must be read from the disk.
  3103. The topics included in this section are:
  3104. 103.BAT and .BTM Files
  3105. 104Echoing in Batch Files
  3106. 105Parameters
  3107. 106Using Environment Variables
  3108. 107Batch File Commands
  3109. 108Interrupting a Batch File
  3110. 109Automatic Batch Files (4START and 4EXIT)
  3111. 110Detecting 4DOS and other JP Software shells
  3112. 111Using Aliases in Batch Files
  3113. 112Debugging Batch Files
  3114. 113String Processing
  3115. 114Line Continuation
  3116. 115Batch File Compression
  3117. 054Special Character Compatibility
  3118. 117Command Parsing
  3119. 118Argument Quoting
  3120. 116REXX Support
  3121. ;---------------------------------------------------------------------------
  3122. !TOPIC 103 .BAT and .BTM Files
  3123. !NOINDEX
  3124. A batch file can run in two different modes. In the first, traditional
  3125. mode, each line of the batch file is read and executed individually. In
  3126. the second mode, the entire batch file is read into memory at once. The
  3127. second mode can be 5 to 10 times faster, especially if most of the commands
  3128. in the batch file are internal commands. However, only the first mode can
  3129. be used for self-modifying batch files (which are rare), or for batch files
  3130. which install memory-resident utilities.
  3131. The batch file's extension determines its mode. Files with a .BAT
  3132. extension are run in the slower, traditional mode. Files with a .BTM
  3133. extension are run in the faster, more efficient mode. You can change the
  3134. execution mode inside a batch file with the 641LOADBTM command.
  3135. Under 4DOS, .BTM files must be less than 64K (65536) bytes long.
  3136. ;---------------------------------------------------------------------------
  3137. !TOPIC 104 Echoing in Batch Files
  3138. !NOINDEX
  3139. By default, each line in a batch file is displayed or "echoed" as it is
  3140. executed. You can change this behavior, if you want, in several different
  3141. ways:
  3142. !INDENT 5 5 5 5
  3143. Any batch file line that begins with an [@] symbol will not be
  3144. displayed.
  3145. The display can be turned off and on within a batch file with the
  3146. 619ECHO OFF and ECHO ON commands.
  3147. The default setting can be changed with the 664SETDOS /V command,
  3148. on the Options 1 page of the 648OPTION dialogs, or the
  3149. 414BatchEcho directive in 4DOS.INI.
  3150. !INDENT 0
  3151. For example, the following line turns off echoing inside a batch file. The
  3152. [@] symbol keeps the batch file from displaying the ECHO OFF command:
  3153. @echo off
  3154. 4DOS also has a command line echo that is unrelated to the batch file echo
  3155. setting. See 619ECHO for details about both settings.
  3156. ;---------------------------------------------------------------------------
  3157. !TOPIC 105 Batch File Parameters
  3158. !NOINDEX
  3159. Like aliases and application programs, batch files can examine the command
  3160. line that is used to invoke them. The command tail (everything on the
  3161. command line after the batch file name) is separated into individual
  3162. parameters (also called arguments or batch variables) by scanning for
  3163. the spaces, tabs, and commas that separate the parameters. A batch file can
  3164. work with the individual parameters or with the command tail as a whole.
  3165. Batch file parameters are numbered from %1 to %255. %1 refers to the
  3166. first parameter on the command line, %2 to the second, and so on. You
  3167. can use quotation marks to pass spaces, tabs, commas, and other special
  3168. characters in a batch file parameter; see 118Argument Quoting for
  3169. details.
  3170. Parameters that are referred to in a batch file, but which are missing on
  3171. the command line, appear as empty strings inside the batch file. For
  3172. example, if you start a batch file and put two parameters on the command
  3173. line, any reference in the batch file to %3, or any higher-numbered
  3174. parameter, will be interpreted as an empty string.
  3175. A batch file can also work with three special parameters: %0 contains
  3176. the name of the batch file as it was entered on the command line, %#
  3177. contains the number of command line arguments, and %n& contains the
  3178. complete command-line tail starting with argument number n (for example,
  3179. %3& means the third parameter and all those after it). %& contains the
  3180. entire command tail. The values of these special parameters will change if
  3181. you use the 666SHIFT command. If you wish to use a symbol other than
  3182. the ampersand [&] to refer to multiple arguments, you can use the
  3183. 439ParameterChar directive in 4DOS.INI or the 664SETDOS /P command
  3184. to define a different parameter character.
  3185. For example, if your batch file interprets the first argument as a
  3186. subdirectory name then the following line would move to the specified
  3187. directory:
  3188. cd %1
  3189. A friendlier batch file would check to make sure the directory exists and take
  3190. some special action if it doesn't:
  3191. iff isdir %1 then ^ cd %1
  3192. else ^ echo Subdirectory %1 does not exist! ^ quit
  3193. endiff
  3194. (see the 633IF and 634IFF commands).
  3195. For compatibility with CMD.EXE, you may also use %* to refer to the entire
  3196. command tail; %* is mostly equivalent to %&. You cannot, however,
  3197. specify a number between the percent sign and the asterisk. %4* represents
  3198. the fourth word in the command tail (%4) followed by a literal asterisk
  3199. (*), but %4& represents the fourth and all following arguments. Unlike
  3200. %&, the %* parameter is not affected by the 666SHIFT command.
  3201. Batch files can also use 131environment variables, 161internal
  3202. variables, and 241variable functions.
  3203. ;---------------------------------------------------------------------------
  3204. !TOPIC 106 Using Environment Variables
  3205. !NOINDEX
  3206. Batch files can also use 131environment variables, 161internal
  3207. variables, and 241variable functions. You can use these variables and
  3208. functions to determine system status (e.g., the type of CPU in the system),
  3209. resource levels (e.g., the amount of free disk space), file information
  3210. (e.g., the date and time a file was last modified), and other information
  3211. (e.g., the current date and time). You can also perform arithmetic
  3212. operations (including date and time arithmetic), manipulate strings and
  3213. substrings, extract parts of a filename, and read and write files.
  3214. To create temporary variables for use inside a batch file, just use the
  3215. 663SET command to store the information you want in an environment
  3216. variable. Pick a variable name that isn't likely to be in use by some other
  3217. program (for example, 138PATH would be a bad choice), and use the
  3218. 680UNSET command to remove these variables from the environment at
  3219. the end of your batch file. You can use 665SETLOCAL and 621ENDLOCAL
  3220. to create a "local" environment so that the original environment will be
  3221. restored when your batch file is finished.
  3222. Environment variables used in a batch file may contain either numbers or
  3223. text. It is up to you to keep track of what's in each variable and use it
  3224. appropriately; if you don't (for example, if you use %263@EVAL to add a
  3225. number to a text string), you'll get an error message.
  3226. ;---------------------------------------------------------------------------
  3227. !TOPIC 107 Batch File Commands
  3228. !NOINDEX
  3229. Several commands are particularly suited to batch file processing. Here is
  3230. a list of some of the commands you might find most useful:
  3231. !INDENT 5 5 5 5
  3232. 597BEEP produces a sound of any pitch and duration through the
  3233. computer's speaker.
  3234. 599CALL executes one batch file from within another.
  3235. 600CANCEL terminates all batch file processing.
  3236. 604CLS and 605COLOR set the screen display colors.
  3237. 615DO starts a loop. The loop can be based on a counter, or on a
  3238. conditional test like those used in IF and IFF.
  3239. 616DRAWBOX draws a box on the screen.
  3240. 617DRAWHLINE and 618DRAWVLINE draw horizontal and vertical
  3241. lines on the screen.
  3242. 619ECHO and 620ECHOS print text on the screen (the text can
  3243. also be redirected to a file or device). 689ECHOERR and
  3244. 690ECHOSERR print text to the standard error device.
  3245. 629GOSUB executes a subroutine inside a batch file. The
  3246. 659RETURN command terminates the subroutine.
  3247. 630GOTO branches to a different location in the batch file.
  3248. 626FOR executes commands for each file that matches a set of
  3249. wildcards, or each entry in a list.
  3250. 633IF and 634IFF execute commands based on a test of string
  3251. or numeric values, program exit codes, or other conditions.
  3252. 635INKEY and 636INPUT collect keyboard input from the user
  3253. and store it in environment variables.
  3254. 638KEYSTACK sends keystrokes to applications.
  3255. 641LOADBTM changes the batch file operating mode.
  3256. 647ON initializes error handling for Ctrl-C / Ctrl-Break, or for
  3257. program and command errors.
  3258. 650PAUSE displays a message and waits for the user to press a key.
  3259. 654QUIT ends the current batch file and optionally returns an exit
  3260. code.
  3261. 657REM places a remark in a batch file.
  3262. 660SCREEN positions the cursor on the screen and optionally prints a
  3263. message at the new location.
  3264. 661SCRPUT displays a message in color.
  3265. 665SETLOCAL saves the current disk drive, default directory,
  3266. environment, alias list, and special character settings. 621ENDLOCAL
  3267. restores the settings that were saved.
  3268. 666SHIFT changes the numbering of the batch file parameters.
  3269. 669SWITCH selects a group of statements to execute based on the value
  3270. of a variable.
  3271. 671TEXT displays a block of text. 671ENDTEXT ends the block.
  3272. 673TIMER starts or reads a stopwatch.
  3273. 684VSCRPUT displays a vertical message in color.
  3274. !INDENT 0
  3275. These commands, along with the internal variables and variable functions,
  3276. make the enhanced batch file language extremely powerful. Your copy of 4DOS
  3277. includes a sample batch file, in the file EXAMPLES.BTM, that demonstrates some
  3278. of the things you can do with batch files.
  3279. ;---------------------------------------------------------------------------
  3280. !TOPIC 108 Interrupting a Batch File
  3281. !NOINDEX
  3282. You can usually interrupt a batch file by pressing Ctrl-C or
  3283. Ctrl-Break. Whether and when these keystrokes are recognized will depend
  3284. on whether 4DOS or an application program is running, how
  3285. the application (if any) was written, whether 598BREAK is ON or OFF, and
  3286. whether the 647ON BREAK command is in use.
  3287. If 4DOS detects a Ctrl-C or Ctrl-Break (and ON BREAK is not in use), it will
  3288. display a prompt, for example:
  3289. Cancel batch job C:\CHARGE.BTM ? (Y/N/A) :
  3290. Enter N to continue, Y to terminate the current batch file and continue
  3291. with any batch file which called it, or A to end all batch file processing
  3292. regardless of the batch file nesting level. Answering Y is similar to the
  3293. 654QUIT command; answering A is similar to the 600CANCEL command.
  3294. ;---------------------------------------------------------------------------
  3295. !TOPIC 109 Automatic Batch Files
  3296. !NOINDEX
  3297. 4DOS supports "automatic" batch files, files that run without your
  3298. intervention, as long as 4DOS can find them.
  3299. Each time 4DOS starts as either a primary or a secondary shell, it looks
  3300. for an automatic batch file called 4START.BTM or 4START.BAT. If the 4START
  3301. batch file is not in the same directory as 4DOS itself (as specified in the
  3302. 134COMSPEC variable, you should use the Startup page of the 648OPTION
  3303. dialogs or the 3724StartPath directive in 4DOS.INI to specify its
  3304. location. 4START is optional, so 4DOS will not display an error message if
  3305. it cannot find the file.
  3306. 4START is a convenient place to change the color or content of the prompt
  3307. for each shell, 643LOG the start of a shell, or put other special startup
  3308. or configuration commands.
  3309. With the exception of some 4DOS initialization switches, the entire startup
  3310. command line passed to 4DOS is available to 4START via
  3311. 105batch file parameters (%1, %2, etc.). This can be useful if you
  3312. want to see the command line passed to a secondary shell by an
  3313. application. For example, to pause if any parameters are passed to a
  3314. secondary shell you could include this command in 4START (enter this on one
  3315. line):
  3316. if "%1" != "" .and. "%_shell" gt 0 pause Starting shell %_shell
  3317. with parameters [%&]
  3318. Normally, AUTOEXEC.BAT (.TXT) must be in the Start in folder of vDosPlus.
  3319. You can store it in a different location (and even give it a different name)
  3320. by using the 4DOS.INI directive 375AutoExecPath. You can also pass
  3321. parameters to AUTOEXEC.BAT using the 374AutoExecParms directive in
  3322. 4DOS.INI.
  3323. Whenever a 4DOS shell ends, it runs an automatic batch file called
  3324. 4EXIT.BTM or 4EXIT.BAT. This file, if you use it, should be in the same
  3325. directory as your 4START batch file. Like 4START, 4EXIT is optional. It
  3326. is not necessary in most circumstances, but it is a convenient place to put
  3327. commands to save information such as a history list before a shell ends, or
  3328. 643LOG the end of the shell.
  3329. 4START and 4EXIT should not load any memory resident programs
  3330. (TSRs). Otherwise, these files can include any commands that could be part of
  3331. any batch file or any commands which you could type from the command line.
  3332. Pipes, Transient Sessions, and 4START
  3333. When you set up the 4START file, remember that it is executed every time
  3334. 4DOS starts, including when running a transient copy of 4DOS started with
  3335. the /C 352startup option. This could result in your 4DOS sessions
  3336. executing in the directory set by 4START, not the directory in which 4DOS
  3337. was originally started.
  3338. Similarly, any changes to environment variables or other settings in 4START
  3339. will affect all copies of 4DOS, including those used for
  3340. pipes and transient sessions.
  3341. You can work around these potential problems with the 633IF or 634IFF
  3342. command and the internal variable 220_TRANSIENT. For example, to skip
  3343. all 4START processing when running in a transient session, you could
  3344. use a command like this at the beginning of 4START:
  3345. if %_transient != 0 quit
  3346. ;---------------------------------------------------------------------------
  3347. !TOPIC 110 Detecting 4DOS
  3348. !NOINDEX
  3349. A batch file can test whether it is running in a JP Software shell by
  3350. attempting a numeric comparison:
  3351. if 01 == 1.0 echo Running in 4DOS, 4NT or Take Command!
  3352. This syntax is legal in COMMAND.COM and all compatible shells, including
  3353. 4DOS, 0204NT, Take Command, and CMD.EXE. In JP Software shells,
  3354. this is a numeric comparison and true; in COMMAND.COM and CMD.EXE, it is
  3355. a string comparison and false.
  3356. ;---------------------------------------------------------------------------
  3357. !TOPIC 111 Using Aliases in Batch Files
  3358. !NOINDEX
  3359. One way to simplify batch file programming is to use 101aliases to hide
  3360. unnecessary detail inside a batch file (see the 595ALIAS command
  3361. for more details on how to define aliases). For example, suppose you
  3362. want a batch file to check for certain errors, and display a message
  3363. and exit if one is encountered. This example shows one way to do so:
  3364. setlocal
  3365. unalias *
  3366. alias error `echo. ^ echo ERROR: %& ^ goto dispmenu`
  3367. alias fatalerror `echo. ^ echo FATAL ERROR: %& ^ quit`
  3368. alias in `pushd %1 ^ %2& ^ popd`
  3369. if not exist setup.btm fatalerror Missing setup file!
  3370. call setup.btm
  3371. cls
  3372. :dispmenu
  3373. text
  3374. 1. Word Processing
  3375. 2. Spreadsheet
  3376. 3. Communications
  3377. 4. Exit
  3378. endtext
  3379. echo.
  3380. inkey Enter your choice: %%userchoice
  3381. switch %userchoice
  3382. case 1
  3383. input Enter the file name: %%fname
  3384. if not exist fname error File does not exist
  3385. in d:\letters c:\wp60\wp.exe
  3386. case 2
  3387. in d:\finance c:\quattro\q.exe
  3388. case 3
  3389. in d:\comm c:\comsw\pcplus.exe
  3390. case 4
  3391. goto done
  3392. default
  3393. error Invalid choice, try again
  3394. endswitch
  3395. goto dispmenu
  3396. :done
  3397. endlocal
  3398. The first alias, ERROR, simply displays an error message and jumps to the
  3399. label DISPMENU to redisplay the menu. The "%&" in the second 619ECHO
  3400. command displays all the text passed to ERROR as the content of the
  3401. message. The similar FATALERROR alias displays the message, then exits the
  3402. batch file.
  3403. The last alias, IN, expects 2 or more command-line arguments. It uses the
  3404. first as a new working directory and changes to that directory with a
  3405. 653PUSHD command. The rest of the command line is interpreted as another
  3406. command plus possible command line parameters, which the alias executes. This
  3407. alias is used here to switch to a directory, run an application, and switch
  3408. back. It could also be used from the command line.
  3409. The following lines print a menu on the screen and then get a keystroke from
  3410. the user and store the keystroke in an environment variable called
  3411. 'userchoice'. Then the 669SWITCH command is used to test the user's
  3412. keystroke and decide what action to take.
  3413. There's another side to aliases in batch files. If you're going to distribute
  3414. your batch files to others, you need to remember that they may have aliases
  3415. defined for the commands you're going to use. For example if the user has
  3416. aliased 601CD to 602CDD and you aren't expecting this, your file
  3417. may not work as you intended. There are two ways to address this problem.
  3418. First, you can use 665SETLOCAL, 621ENDLOCAL, and 678UNALIAS to
  3419. clear out aliases before your batch file starts and restore them at the end,
  3420. as we did in the previous example. Remember that SETLOCAL and ENDLOCAL will
  3421. save and restore not only the aliases but also the environment, the current
  3422. drive and directory, and various special characters.
  3423. If this method isn't appropriate or necessary for the batch file you're
  3424. working on, you can also use an asterisk [*] before the name of any
  3425. command. The asterisk means the command that follows it should not be
  3426. interpreted as an alias. For example the following command redirects a list
  3427. of file names to the file FILELIST:
  3428. dir /b > filelist
  3429. However, if the user has redefined 612DIR with an alias this command may
  3430. not do what you want. To get around this just use:
  3431. *dir /b > filelist
  3432. The same can be done for any command in your batch file. If you use the
  3433. asterisk, it will disable alias processing, and the rest of the command will
  3434. be processed normally as an internal command, external command, or batch
  3435. file. Using an asterisk before a command will work whether or not there is
  3436. actually an alias defined with the same name as the command. If there is no
  3437. alias with that name, the asterisk will be ignored and the command will be
  3438. processed as if the asterisk wasn't there.
  3439. ;---------------------------------------------------------------------------
  3440. !TOPIC 112 Debugging Batch Files
  3441. !NOINDEX
  3442. 4DOS includes a built-in batch file debugger, invoked with the 664SETDOS
  3443. /Y1 command. The debugger allows you to "single-step" through a batch file
  3444. line by line, with the file displayed in a popup window as it executes. You
  3445. can execute or skip the current line, continue execution with the debugger
  3446. turned off, view the fully-expanded version of the command line, or exit the
  3447. batch file. The batch debugger can also pop up a separate window to view
  3448. current environment variables or aliases so you can check their values during
  3449. execution, and can pop up the 640LIST command to display the contents of
  3450. any file.
  3451. To start the debugger, insert a 664SETDOS /Y1 command at the beginning of
  3452. the portion of the batch file you want to debug, and a SETDOS /Y0 command at
  3453. the end. You can also invoke SETDOS /Y1 from the prompt, but because the
  3454. debugger is automatically turned off whenever 4DOS returns
  3455. to the prompt, you must enter the SETDOS command and the batch file name on
  3456. the same line, for example:
  3457. c:\> setdos /y1 ^ mybatch.btm
  3458. If you use the debugger regularly you may want to define a simple alias to
  3459. invoke it, for example:
  3460. c:\> alias trace `setdos /y1 ^ %&`
  3461. This alias simply enables the debugger, then runs whatever command is passed
  3462. to it. You can use the alias to debug a batch file with a command like this:
  3463. c:\> trace mybatch.btm
  3464. You can also start or stop the debugger by pressing Ctrl-F5 while a
  3465. batch file is waiting for input, such as in an 636INPUT or
  3466. 635INKEY statement. You must complete the input (press Enter
  3467. during INPUT, or any other key during INKEY) before the keystroke
  3468. will be recognized and the debugger will start.
  3469. When the debugger is running you can control its behavior with
  3470. keystrokes. Debugging continues after each keystroke unless
  3471. otherwise noted:
  3472. !INDENT 30 5 5 5
  3473. T(race), Enter, or F8 Execute the current command. If it
  3474. calls a subroutine with 629GOSUB, or another batch file with
  3475. 599CALL, single-step into the called subroutine or batch file.
  3476. S(tep) or F10 Execute the current command, but
  3477. execute any subroutine or 599CALLed batch file without
  3478. single-stepping.
  3479. J(ump) Skip the current command and proceed to
  3480. the next command.
  3481. X (Expand) Display the next command to be
  3482. executed, after expansion of aliases and environment variables.
  3483. L(ist) Prompt for a file name and then view
  3484. the file with the 640LIST command.
  3485. V(ariables) Open a popup window to display the
  3486. current environment, in alphabetical order.
  3487. A(liases) Open a popup window to display the
  3488. current aliases, in alphabetical order.
  3489. O(ff) or Esc Turn off the debugger and continue with
  3490. the remainder of the batch file.
  3491. Q(uit) Quit the debugger and the current batch
  3492. file, without executing the remainder of the file.
  3493. !INDENT 0
  3494. The debugger highlights each line of the batch file as it is executed. It
  3495. executes the commands on the line one at a time, so when a line contains more
  3496. than one command, the highlight will not move as each command is
  3497. executed. To see the individual commands, use the X key to expand each
  3498. command before it is executed.
  3499. If you use a "prefix" command like 623EXCEPT, 626FOR, 628GLOBAL, or
  3500. 662SELECT, the prefix command is considered one command, and each command
  3501. it invokes is another. For example, this command line executes four commands
  3502. -- the 626FOR and three 619ECHO commands:
  3503. for %x in (a b c) do echo %x
  3504. You cannot use the batch debugger with 116REXX files; it can only be used
  3505. with normal 4DOS batch files.
  3506. The debugger gives you a detailed, step-by-step view of batch file execution,
  3507. and will help solve particularly difficult batch file problems. However, in
  3508. some cases you will find it easier to diagnose these problems with techniques
  3509. that allow you to review what is happening at specific points in the batch
  3510. file without stepping through each line individually.
  3511. There are several tricks you can use for this purpose. Probably the simplest
  3512. is to turn 619ECHO on at the beginning of the file while you're testing
  3513. it, or use 664SETDOS /V2 to force ECHO on even if an ECHO OFF command is used in the batch
  3514. file. This will give you a picture of what is happening as the file is
  3515. executed, without stopping at each line. It will make your output look messy
  3516. of course, so just turn it off once things are working. You can also turn ECHO
  3517. on at the beginning of a group of commands you want to "watch", and off at the
  3518. end, just by adding ECHO commands at the appropriate spots in your file.
  3519. If an error occurs in a batch file, the error message will display the name of
  3520. the file, the number of the line that contained the error, and the error
  3521. itself. For example:
  3522. e:\test.bat [3] Invalid parameter "/d"
  3523. tells you that the file E:\TEST.BAT contains an error on line 3. The first
  3524. line of the batch file is numbered 1.
  3525. Another trick, especially useful in a fast-moving batch file or one where the
  3526. screen is cleared before you can read messages, is to insert 650PAUSE
  3527. commands wherever you need them in order to be able to watch what's
  3528. happening. You can also use an 647ON ERRORMSG command to pause if an
  3529. error occurs, then continue with the rest of the file (the first command
  3530. below), or to quit if an error occurs (the second command):
  3531. on errormsg pause
  3532. on errormsg quit
  3533. If you can't figure out how your aliases and variables are expanded, try
  3534. turning 643LOG on at the start of the batch file. LOG keeps track of all
  3535. commands after alias and variable expansion are completed, and gives you a
  3536. record in a file that you can examine after the batch file is done. You
  3537. must use a standard LOG command; LOG /H (the history log) does not work in
  3538. batch files.
  3539. You may also want to consider using 050redirection to capture your batch
  3540. file output. Simply type the batch file name followed by the redirection
  3541. symbols, for example:
  3542. c:\> mybatch >& testout
  3543. This records all batch file output, including error messages, in the file
  3544. TESTOUT, so you can go back and examine it. If you have 619ECHO ON in
  3545. the batch file you'll get the batch commands intermingled with the output,
  3546. which can provide a very useful trace of what's happening. Of course,
  3547. output from full-screen commands and programs that don't write to the
  3548. standard output devices can't be recorded, but you can still gain a lot of
  3549. useful information if your batch file produces any output.
  3550. If you're using 050redirection to see the output, remember that any
  3551. prompts for input will probably go to the output file and not to the screen,
  3552. so you need to know in advance the sequence of keystrokes required to get
  3553. through the entire batch file, and enter them by hand or with 638KEYSTACK.
  3554. ;---------------------------------------------------------------------------
  3555. !TOPIC 113 Batch File String Processing
  3556. !NOINDEX
  3557. As you gain experience with batch files, you're likely to find that you need
  3558. to manipulate text strings. You may need to prompt a user for a name or
  3559. password, process a list of files, or find a name in a phone list. All of
  3560. these are examples of string processing -- the manipulation of lines of
  3561. readable text.
  3562. 4DOS includes several features that make string processing easier. For
  3563. example, you can use the 635INKEY and 636INPUT commands for user input;
  3564. the 619ECHO, 660SCREEN, 661SCRPUT, and 684VSCRPUT commands for
  3565. output; and the 626FOR command or the 274@FILEREAD function to scan
  3566. through the lines of a file. In addition, 241variable functions offer a
  3567. wide range of string handling capabilities.
  3568. For example, suppose you need a batch file that will prompt a user for a name,
  3569. break the name into a first name and a last name, and then run a hypothetical
  3570. LOGIN program. LOGIN expects the syntax /F:first /L:last with both the
  3571. first and last names in upper case and neither name longer than 8
  3572. characters. Here is one way to write such a program:
  3573. @echo off
  3574. setlocal
  3575. unalias *
  3576. input Enter your name (no initials): %%name
  3577. set first=%@word[0,%name]
  3578. set flen=%@len[%first]
  3579. set last=%@word[1,%name]
  3580. set llen=%@len[%last]
  3581. iff %flen gt 8 .or. %llen gt 8 then
  3582. echo First or last name too long
  3583. quit
  3584. endiff
  3585. login /F:%@upper[%first] /L:%@upper[%last]
  3586. endlocal
  3587. The 665SETLOCAL command at the beginning of this batch file saves the
  3588. environment and aliases. Then the 678UNALIAS * command removes any
  3589. existing aliases so they won't interfere with the behavior of the commands
  3590. in the remainder of the batch file. The first block of lines ends with an
  3591. 636INPUT command which asks the user to enter a name. The user's input
  3592. is stored in the environment variable NAME.
  3593. The second block of lines extracts the user's first and last names from the
  3594. NAME variable and calculates the length of each. It stores the first and
  3595. last name, along with the length of each, in additional environment
  3596. variables. Note that the 329@WORD function numbers the first word as 0,
  3597. not as 1.
  3598. The 634IFF command in the third block of lines tests the length of both
  3599. the first and last names. If either is longer than 8 characters, the batch
  3600. file displays an error message and ends. Finally, in the last block, the
  3601. batch file executes the LOGIN program with the appropriate parameters, then
  3602. uses the 621ENDLOCAL command to restore the original environment and alias
  3603. list. At the same time, ENDLOCAL discards the temporary variables that the
  3604. batch file used (NAME, FIRST, FLEN, etc.).
  3605. When you're processing strings, you also need to avoid some common traps. The
  3606. biggest one is handling special characters.
  3607. Suppose you have a batch file with these two commands, which simply accept a
  3608. string and display it:
  3609. input Enter a string: %%str
  3610. echo %str
  3611. Those lines look safe, but what happens if the user enters the string "some >
  3612. none" (without the quotes). After the string is placed in the variable STR,
  3613. the second line becomes:
  3614. echo some > none
  3615. The ">" is a 050redirection symbol, so the line echoes the string "some"
  3616. and redirects it to a file called NONE - probably not what you expected. You
  3617. could try using quotation marks to avoid this kind of problem
  3618. (see 118Argument Quoting), but that won't quite work. If you use
  3619. back-quotes (ECHO `%STR`), the command will echo the four-character string
  3620. %STR. Environment variable names are not expanded (replaced by their
  3621. contents) when they are inside back-quotes.
  3622. If you use double quotes (ECHO "%STR"), the string entered by the user will
  3623. be displayed properly, and so will the quotation marks. With double quotes,
  3624. the output would look like this:
  3625. "some > none"
  3626. As you can imagine, this kind of problem becomes much more difficult if you
  3627. try to process text from a file. Special characters in the text can cause
  3628. all kinds of confusion in your batch files. Text containing back-quotes,
  3629. double quotes, or 050redirection symbols can be virtually impossible to
  3630. handle correctly.
  3631. One way to overcome these potential problems is to use the 664SETDOS /X
  3632. command to temporarily disable redirection symbols and other special
  3633. characters. The two-line batch file above would be a lot more likely to
  3634. produce the expected results if it were rewritten this way:
  3635. setdos /x-15678
  3636. input Enter a string: %%str
  3637. echo %str
  3638. setdos /x0
  3639. The first line turns off 101alias processing and disables several special
  3640. symbols, including the command separator (see 041Multiple Commands) and
  3641. all 050redirection symbols. Once the string has been processed, the last
  3642. line re-enables the features that were turned off in the first line.
  3643. If you need advanced string processing capabilities beyond those provided by
  3644. 4DOS, you may want to consider using the 116REXX language. Our products
  3645. support external REXX programs for this purpose.
  3646. ;---------------------------------------------------------------------------
  3647. !TOPIC 114 Batch File Line Continuation
  3648. !NOINDEX
  3649. 4DOS will combine multiple lines in the batch file into a single line for
  3650. processing when you include the 086escape character as the very last
  3651. character of each line to be combined (except the last). The default escape
  3652. character is Ctrl-X (ASCII 24, which appears on screen as an up-arrow
  3653. [].) For example:
  3654. echo The quick brown fox jumped over the lazy
  3655. sleeping
  3656. dog. > alphabet
  3657. You cannot use this technique to extend a batch file line beyond the normal
  3658. line length limit of 511 characters.
  3659. ;---------------------------------------------------------------------------
  3660. !TOPIC 115 Batch File Compression
  3661. !NOINDEX
  3662. You can compress your batch files with a program called BATCOMP.EXE, which
  3663. is distributed with 4DOS. This program condenses batch files by about a
  3664. third and makes them unreadable with the 640LIST command and similar
  3665. utilities. Compressed batch files run at approximately the same speed as
  3666. regular .BTM files.
  3667. You may want to consider compressing batch files if you need to distribute
  3668. them to others and keep your original code secret or prevent your users
  3669. from altering them.
  3670. The syntax for the batch compression program is
  3671. BATCOMP [/Ekkkk /K /O /Q] InputFile [OutputFile]
  3672. For example, to compress MYBATCH.BAT and save the result as MYBATCH.BTM:
  3673. c:\> batcomp mybatch.bat mybatch.btm
  3674. You must specify the full name of the input file, including its extension,
  3675. on the BATCOMP command line. If you do not specify the output file,
  3676. BATCOMP will use the same base name as the input file and add a .BTM
  3677. extension. If you do specify a output file name, you must give an
  3678. extension or the output file will not have one. See 704BATCOMP for
  3679. more information on options and usage.
  3680. Under 4DOS, compressed .BTMs must be less than 64K bytes long. You
  3681. can usually work around this limitation by breaking a very long batch file
  3682. into two or more smaller files that CALL or chain to each other, and then
  3683. compiling the shorter files separately.
  3684. JP Software does not provide a decompression utility to decompress batch
  3685. files. If you use BATCOMP.EXE, make sure that you also keep a copy of the
  3686. original batch file for future inspection or modification.
  3687. You can adopt one of two strategies for keeping track of your original source
  3688. files and compressed batch files. First, you may want to create the source
  3689. files with a traditional .BAT extension and reserve the .BTM extension for
  3690. compressed batch files. The advantage of this approach is that you can
  3691. modify and test the uncompressed versions at any time, although they will run
  3692. in the slower, traditional mode unless they begin with a 641LOADBTM
  3693. command.
  3694. If you prefer, you can use a .BTM extension for both the source and
  3695. compressed files. In this case you will have to use a different directory or
  3696. a different base name for each file. For example, you might use
  3697. SOURCE\MYBATCH.BTM for the source file and COMP\MYBATCH.BTM for the
  3698. compressed version, or use MYBATCHS.BTM for the source file and MYBATCH.BTM
  3699. for the compressed file (however, the latter approach may make it more
  3700. difficult to keep track of the correspondence between the source file and
  3701. the compressed file).
  3702. ;---------------------------------------------------------------------------
  3703. !TOPIC 116 REXX Support
  3704. !NOINDEX
  3705. REXX is a file and text processing language developed by IBM, and available
  3706. on many PC and other platforms. You can invoke REXX programs from 4DOS
  3707. using executable extensions. REXX is an ideal extension to the 4DOS batch
  3708. language, especially if you need advanced string processing capabilities.
  3709. The REXX language is not built into 4DOS, and requires a separate REXX
  3710. processor.
  3711. REXX programs are stored in either .BAT or .REX files. .REX files are used
  3712. for Quercus's Personal REXX; .BAT files are used for REXX programs under
  3713. IBM PC DOS 7.0 and above, and can also be used with Personal REXX as
  3714. described below.
  3715. To enable support for .REX files, you must define an 082executable
  3716. extension that tells 4DOS to load Personal REXX when you invoke a .REX
  3717. file. For example:
  3718. set .rex=c:\prexx\rexx.exe
  3719. INDENT 0
  3720. Once you have enabled REXX execution of .BAT files by setting REXXPath or
  3721. using PC DOS 7.0 or later, 4DOS checks the first 2 characters of the first
  3722. line of each .BAT file. If the first 2 characters are [/*], the beginning
  3723. of a REXX comment, 4DOS calls your REXX interpreter to execute the .BAT file.
  3724. All of the REXX processors described above (Enterprise REXX, Personal REXX
  3725. and PC DOS's built in REXX) extend the interface between REXX and 4DOS
  3726. by allowing you to invoke 4DOS commands from within a REXX program.
  3727. For details on communication between REXX and 4DOS, or for
  3728. more information on any aspect of REXX, see your REXX documentation.
  3729. ;---------------------------------------------------------------------------
  3730. !TOPIC 117 Command Parsing
  3731. !NOINDEX
  3732. !TTY
  3733. Whenever you type something at the command line and press the Enter
  3734. key, or include a command in a batch file, you have given a command to
  3735. 4DOS, which must figure out how to execute your command. If you
  3736. understand the general process that is used, you will be able to make the
  3737. best use of the commands. Understanding these steps can be especially
  3738. helpful when working with complex aliases or batch file commands.
  3739. To decide what activity to perform, 4DOS goes through several steps.
  3740. Before it starts, it writes the entire command line (which may contain
  3741. multiple commands) to the history log file if history logging has been
  3742. enabled with the LOG /H command (see 643LOG), and the command did
  3743. not come from a batch file. Then, if the line contains multiple
  3744. commands, the first command is isolated for processing.
  3745. 4DOS begins by dividing the command into a command name and a command
  3746. tail. The command name is the first word in the command; the tail is
  3747. everything that follows the command name. For example, in the command line
  3748. dir *.txt /2/p/v
  3749. the command name is "dir", and the command tail is " *.txt /2/p/v".
  3750. Next 4DOS tries to match the command name against its list
  3751. of aliases. If it finds a match between the command name and one of the
  3752. aliases you've defined, it replaces the command name with the contents of the
  3753. alias. This substitution is done internally and is not normally visible to
  3754. you; however, you can view a command line with aliases expanded by pressing
  3755. Ctrl-F after entering the command at the prompt.
  3756. If the alias included parameters (%1, %2, etc.), the parameter values are
  3757. filled in from the text on the command line, and any parameters used in this
  3758. process are removed from the command line. The process of replacing a
  3759. command name that refers to an alias with the contents of the alias, and
  3760. filling in the alias parameters, is called alias expansion.
  3761. This expansion of an alias creates a new command name: the first word of the
  3762. alias. This new command name is again tested against the list of aliases,
  3763. and if a match is found the contents of the new alias is expanded just like
  3764. the first alias. This process, called nested alias expansion, continues
  3765. until the command name no longer refers to an alias.
  3766. Once it has finished with the aliases, 4DOS next tries to match the command
  3767. name with its list of internal commands. If it is unsuccessful, 4DOS knows
  3768. that it will have to search for a batch file or external program to execute
  3769. your command.
  3770. The next step is to locate any batch file or alias parameters, environment
  3771. variables, internal variables, or variable functions in the command, and
  3772. replace each one with its value. This process is called variable expansion.
  3773. The variable expansion process is modified for certain internal commands,
  3774. like EXCEPT, IF, and GLOBAL. These commands are always followed by another
  3775. command, so variable expansion takes place separately for the original
  3776. command and the command that follows it.
  3777. Once all of the aliases and environment variables have been expanded, 4DOS
  3778. will echo the complete command to the screen (if command-line echo has been
  3779. enabled) and write it to the log file (if command logging has been turned on).
  3780. Before it can actually execute your command, 4DOS must scan the command tail
  3781. to see if it includes 051redirection or 052piping. If so, the proper
  3782. internal switches are set to send output to an alternate device or to a file,
  3783. instead of to the screen.
  3784. Finally, it is time to execute the command. If the command name matches an
  3785. internal command, 4DOS will perform the activities you have
  3786. requested. Otherwise, 4DOS searches for an executable (.COM or .EXE) file,
  3787. a batch file, or a file with an executable extension that matches the command
  3788. name (see the detailed description of this search on page
  3789. 895Executable Files and File Searches).
  3790. Once the internal command or external program has terminated, 4DOS saves the
  3791. result or exit code that the command generated, cleans up any redirection
  3792. that you specified, and then returns to the original command line to retrieve
  3793. the next command. When all of the commands in a command line are finished,
  3794. the next line is read from the current batch file, or if no batch file is
  3795. active, the prompt is displayed.
  3796. You can disable and re-enable several parts of command parsing (for example
  3797. alias expansion, variable expansion, and redirection) with the SETDOS /X
  3798. command (see 664SETDOS).
  3799. ;---------------------------------------------------------------------------
  3800. !TOPIC 118 Argument Quoting
  3801. !NOINDEX
  3802. As it parses the command line, 4DOS looks for command separators [^],
  3803. conditional commands (|| or &&), white space (spaces, tabs, and
  3804. commas), percent signs [%] which indicate variables to be expanded, and
  3805. redirection and piping characters (>, <, or |).
  3806. Normally, these special characters cannot be passed to a command as part of
  3807. an argument. However, you can include any of the special characters in an
  3808. argument by enclosing the entire argument in back-quotes [`] or double
  3809. quotes ["]. Although both back-quotes and double quotes will let you
  3810. build arguments that include special characters, they do not work the same
  3811. way.
  3812. No alias or variable expansion is performed on an argument enclosed in
  3813. back-quotes. Redirection symbols inside the back-quotes are ignored. The
  3814. back-quotes are removed from the command line before the command is executed.
  3815. No alias expansion is performed on expressions enclosed in double
  3816. quotes. Redirection symbols inside double quotes are ignored. However,
  3817. variable expansion is performed on expressions inside double quotes. The
  3818. double quotes themselves will be passed to the command as part of the
  3819. argument.
  3820. For example, suppose you have a batch file CHKNAME.BTM which expects a name
  3821. as its first parameter (%1). Normally the name is a single word. If you
  3822. need to pass a two-word name with a space in it to this batch file you
  3823. could use the command:
  3824. c:\> chkname `MY NAME`
  3825. Inside the batch file, %1 will have the value MY NAME, including the
  3826. space. The back-quotes caused 4DOS to pass the string to the batch file as a
  3827. single argument, rather than as the two separate parameters MY and NAME.
  3828. The quotes keep characters together and reduce the number of arguments in
  3829. the line.
  3830. When an alias is defined in a batch file or from the command line, its
  3831. argument can be enclosed in back-quotes to prevent the expansion of
  3832. replaceable parameters, variables, and multiple commands until the alias is
  3833. invoked. See 595ALIAS for details.
  3834. You can disable and re-enable back-quotes and double quotes with the
  3835. 664SETDOS /X command.
  3836. ;---------------------------------------------------------------------------
  3837. !TOPIC 131 Using the Environment
  3838. !NOINDEX
  3839. The environment is a collection of information about your computer that
  3840. every program receives. Each entry in the environment consists of a
  3841. variable name, followed by an equal sign and a string of text. You can
  3842. automatically substitute the text for the variable name in any command. To
  3843. create the substitution, include a percent sign [%] and a variable name
  3844. on the command line or in an alias or batch file.
  3845. The following standard environment variables have special meanings in 4DOS:
  3846. 049CDPATH / _CDPATH Directory change path
  3847. 132CMDLINE Current command line
  3848. 133COLORDIR Directory colors
  3849. 134COMSPEC Name of the command processor
  3850. 135COPYCMD Default COPY/MOVE options (Compatibility only)
  3851. 136DIRCMD Default DIR options (Compatibility only)
  3852. 145DOSHELP Path to external DOS help system
  3853. 137FILECOMPLETION Filename completion customization
  3854. 147LOGINNAME User login name
  3855. 823NO_SEP Removes the thousands separators from numbers
  3856. 138PATH Executable file search path
  3857. 143PATHEXT Extensions to search for in the PATH
  3858. 139PROMPT Command prompt
  3859. 140TEMP Directory for temporary files
  3860. 141TEMP4DOS Directory for temporary files
  3861. 142TMP Directory for temporary files
  3862. ; TMPDIR
  3863. ; TEMPDIR
  3864. ; OPTKEYS
  3865. ; OPTHELP
  3866. 4DOS also supports two special types of variables, which are documented
  3867. separately:
  3868. !INDENT 5 5 5 5
  3869. 161Internal Variables are similar to environment variables, but
  3870. are stored internally within 4DOS, and are not visible in the
  3871. environment. They provide information about your system for use in
  3872. batch files and aliases.
  3873. 241Variable Functions are referenced like environment variables, but
  3874. perform additional functions like file handling, string manipulation and
  3875. arithmetic calculations.
  3876. !INDENT 0
  3877. The 663SET command is used to create environment variables. For
  3878. example, you can create a variable named BACKUP like this:
  3879. c:\> set BACKUP=*.bak;*.bk!;*.bk
  3880. If you then type
  3881. c:\> del %BACKUP
  3882. it is equivalent to the command
  3883. DEL *.bak;*.bk!;*.bk
  3884. The size of the environment can be specified on the Startup page of the
  3885. 648OPTION dialogs, with the 377Environment and 378EnvFree
  3886. directives in 4DOS.INI, or by the /E: 352startup switch.
  3887. Environment variable names may contain any alphabetic or numeric
  3888. characters, the underscore character [_], and the dollar sign [$].
  3889. You can force acceptance of other characters by including the full
  3890. variable name in square brackets, like this: %[AB##2]. You can also
  3891. "nest" environment variables using square brackets. For example
  3892. %[%var1] means "the contents of the variable whose name is stored in
  3893. VAR1." A variable referenced with this technique cannot contain more
  3894. than 511 characters of information. Nested variable expansion can be
  3895. disabled with the 664SETDOS /X command.
  3896. Environment variables may contain alias names. 4DOS will substitute
  3897. the variable value for the name, then check for any
  3898. alias name which may have been included within the variable's value. For
  3899. example, the following commands would generate a 2-column directory of the
  3900. .TXT files:
  3901. c:\> alias d2 dir /2
  3902. c:\> set cmd=d2
  3903. c:\> %cmd *.txt
  3904. The trailing percent sign that was traditionally required for
  3905. environment variable names is not usually required in 4DOS, which accept
  3906. any character that cannot be part of a variable name (including a space)
  3907. as the terminator. However, the trailing percent can be used to maintain
  3908. compatibility.
  3909. The trailing percent sign is needed if you want to join two variable
  3910. values. The following examples show the possible interactions between
  3911. variables and literal strings. First, create two environment variables
  3912. called ONE and TWO this way:
  3913. c:\> set ONE=abcd
  3914. c:\> set TWO=efgh
  3915. Now the following combinations produce the output text shown:
  3916. %ONE%TWO abcdTWO ("%ONE%" + "TWO")
  3917. %ONE%TWO% abcdTWO ("%ONE%" + "TWO%")
  3918. %ONE%%TWO abcdefgh ("%ONE%" + "%TWO")
  3919. %ONE%%TWO% abcdefgh ("%ONE%" + "%TWO%")
  3920. %ONE%[TWO] abcd[TWO] ("%ONE%" + "[TWO]")
  3921. %ONE%[TWO]% abcd[TWO] ("%ONE%" + "[TWO]%")
  3922. %[ONE]%TWO abcdefgh ("%[ONE]" + "%TWO")
  3923. %[ONE]%TWO% abcdefgh ("%[ONE]" + "%TWO%")
  3924. If you want to pass a percent sign to a command, or a string which
  3925. includes a percent sign, you must use two percent signs in a row. Otherwise,
  3926. the single percent sign will be seen as the beginning of a
  3927. variable name and will not be passed on to the command. For example, to
  3928. display the string "We're with you 100%" you would use the command:
  3929. echo We're with you 100%%
  3930. You can also use back-quotes around the text, rather than a double percent
  3931. sign. See 118Argument Quoting for details.
  3932. Each copy of 4DOS maintains its own copy of the environment. The copy of
  3933. the environment maintained by the primary shell is called the master
  3934. environment. When using a secondary shell, 4DOS will allow you to access
  3935. the master environment in the primary shell with the commands 663SET
  3936. /M, 680UNSET /M, and 622ESET /M, and with the 304%@MASTER
  3937. variable function.
  3938. ;---------------------------------------------------------------------------
  3939. !TOPIC 132 CMDLINE
  3940. !NOINDEX
  3941. !TTY
  3942. CMDLINE is the fully expanded text of the currently executing command
  3943. line. CMDLINE is set just before invoking any .COM, .EXE, .BTM or .BAT
  3944. file. If a command line is prefaced with an "@" to prevent echoing,
  3945. it will not be put in CMDLINE, and any previous CMDLINE variable will be
  3946. removed from the environment. This allows you to squeeze out the last few
  3947. bytes of environment space before loading TSRs by prefacing each TSR
  3948. command with an "@".
  3949. ;---------------------------------------------------------------------------
  3950. !TOPIC 133 COLORDIR
  3951. !NOINDEX
  3952. COLORDIR controls directory display colors used by 612DIR and
  3953. 662SELECT. See the discussion of color-coded directories under DIR
  3954. for a complete description.
  3955. ;---------------------------------------------------------------------------
  3956. !TOPIC 134 COMSPEC
  3957. !NOINDEX
  3958. !TTY
  3959. COMSPEC contains the full path to the command processor. Normally it's
  3960. c:\command.com, vDosPlus takes care that 4DOS is executed instead.
  3961. !TTY
  3962. You can set the COMSPEC variable with a 663SET command in the vDosPlus
  3963. AUTOEXEC.TXT. This method is not recommended, because it allows
  3964. applications to shell to DOS, but does not provide information that the
  3965. primary 4DOS shell needs to find its files during the startup process.
  3966. ;---------------------------------------------------------------------------
  3967. !TOPIC 135 COPYCMD
  3968. !NOINDEX
  3969. !TTY
  3970. COPYCMD is used by MS-DOS 6.20 and PC DOS 6.3 COMMAND.COM and above
  3971. to hold default options for the 606COPY, 646MOVE, and XCOPY
  3972. commands. 4DOS does not support this variable, but you can achieve
  3973. the same effect with an 101alias. For example, if you want the COPY and
  3974. MOVE commands to default to prompting you before overwriting an existing
  3975. file (see also the 4DOS.INI 450CopyPrompt directive), you could use
  3976. these aliases:
  3977. c:\> alias copy = `*copy /r`
  3978. c:\> alias move = `*move /r`
  3979. If you wish to use COPYCMD for compatibility with systems that do
  3980. not use 4DOS, you can define the aliases this way:
  3981. c:\> alias copy = `*copy %copycmd`
  3982. c:\> alias move = `*move %copycmd`
  3983. However, please note that there are a number of subtle differences
  3984. in regard to the available options and their usage between the DOS COPY
  3985. and MOVE commands and 4DOS' own implementation thereof, so that the above
  3986. recommendation may not always be applicable.
  3987. ;---------------------------------------------------------------------------
  3988. !TOPIC 136 DIRCMD
  3989. !NOINDEX
  3990. !TTY
  3991. DIRCMD is used by MS-DOS / PC DOS 5.0 COMMAND.COM and above, and some
  3992. versions of CMD.EXE to hold default options for the 612DIR command. 4DOS
  3993. does not support this variable, but you can achieve the same effect with
  3994. an 101alias. For example, if you want the DIR command to default to wide
  3995. column display with a vertical sort and a pause at the end of each page,
  3996. you could use this alias:
  3997. c:\> alias dir = `*dir /w/p/v`
  3998. If you wish to continue to use DIRCMD for compatibility with systems that
  3999. do not use 4DOS, you can define the alias this way:
  4000. c:\> alias dir = `*dir %dircmd`
  4001. ;---------------------------------------------------------------------------
  4002. !TOPIC 137 FILECOMPLETION
  4003. !NOINDEX
  4004. !TTY
  4005. FILECOMPLETION sets the files made available during filename completion for
  4006. selected commands. See 037Customizing Filename Completion for a complete
  4007. description of the format of this variable.
  4008. ;---------------------------------------------------------------------------
  4009. !TOPIC 823 NO_SEP
  4010. !NOINDEX
  4011. !TTY
  4012. NO_SEP removes the thousands separators from numbers shown or returned by
  4013. the 4DOS commands and functions. The exact value to which NO_SEP is set
  4014. does not matter (e.g. "SET NO_SEP=1"). Type "SET NO_SEP=" or "UNSET NO_SEP"
  4015. to turn thousands separators back on.
  4016. ;---------------------------------------------------------------------------
  4017. !TOPIC 138 PATH
  4018. !NOINDEX
  4019. PATH is a list of directories that 4DOS will search for executable
  4020. files that aren't in the current directory. PATH may also be used by some
  4021. application programs to find their own files. See the 649PATH
  4022. command for a full description of this variable.
  4023. ;---------------------------------------------------------------------------
  4024. !TOPIC 143 PATHEXT
  4025. !NOINDEX
  4026. PATHEXT can be used to select the extensions to look for when searching
  4027. the 138PATH for an executable file. It consists of a list of
  4028. extensions, separated by semicolons. For example, to replicate the
  4029. default extension list used by 4DOS:
  4030. set pathext=.com;.exe;.btm;.bat
  4031. PATHEXT is ignored unless the 477PathExt setting is set to Yes in
  4032. 4DOS.INI. Once PATHEXT is enabled the standard path search for .COM,
  4033. .EXE, .BTM, and .BAT, files is replaced by a search for files with the
  4034. extensions listed in PATHEXT, in the order listed there.
  4035. Enabling PATHEXT affects only the standard path search, it does not
  4036. affect the subsequent searches for files with 082executable
  4037. extensions. PATHEXT is supported for compatibility reasons but should
  4038. not generally be used as a substitute for executable extensions, which
  4039. are much more flexible. For more details on path searches, see the
  4040. 649PATH command.
  4041. CAUTION: If you set PathExt = Yes in 4DOS.INI and then fail to set the
  4042. PATHEXT variable, path searches will fail as there will be no extensions
  4043. for which to search!
  4044. ;---------------------------------------------------------------------------
  4045. !TOPIC 139 PROMPT
  4046. !NOINDEX
  4047. PROMPT defines the command-line prompt. It can be set or changed with
  4048. the 652PROMPT command.
  4049. ;---------------------------------------------------------------------------
  4050. !TOPIC 140 TEMP
  4051. !NOINDEX
  4052. !TTY
  4053. TEMP specifies the directory where 4DOS should store temporary
  4054. 050pipe and clipboard files if the 141TEMP4DOS variable doesn't
  4055. exist. Some other programs also use TEMP to define where they should
  4056. place their temporary files. See also 141TEMP4DOS and 142TMP.
  4057. ;---------------------------------------------------------------------------
  4058. !TOPIC 141 TEMP4DOS
  4059. !NOINDEX
  4060. !TTY
  4061. TEMP4DOS specifies where 4DOS should store temporary 050pipe
  4062. and clipboard files. Also see 140TEMP and 142TMP.
  4063. ;---------------------------------------------------------------------------
  4064. !TOPIC 142 TMP
  4065. !NOINDEX
  4066. !TTY
  4067. TMP specifies the directory where 4DOS should store temporary 050pipe
  4068. and clipboard files if the 140TEMP and 141TEMP4DOS variables
  4069. don't exist.
  4070. ;---------------------------------------------------------------------------
  4071. !TOPIC 145 DOSHELP
  4072. !NOINDEX
  4073. !TTY
  4074. DOSHELP specifies the full path to an external DOS help system, if
  4075. the executable file is not called HELP.COM or is not accessible via
  4076. the 138PATH on your system. See 16External Help for more details.
  4077. ;---------------------------------------------------------------------------
  4078. !TOPIC 147 LOGINNAME
  4079. !NOINDEX
  4080. !TTY
  4081. LOGINNAME specifies the name, the 4DOS 652PROMPT $U will display
  4082. as the current user.
  4083. ;---------------------------------------------------------------------------
  4084. !TOPIC 161 Internal Variables
  4085. !NOINDEX
  4086. Internal Variables are special environment variables built into 4DOS
  4087. to provide information about your system. They are not actually stored in
  4088. the environment and therefore are invisible to applications scanning the
  4089. environment, but they can be used in internal commands, aliases, and batch
  4090. files just like any other environment variable. The values of these
  4091. variables are stored internally in 4DOS, and cannot be changed with
  4092. the 663SET, 680UNSET, or 622ESET command. However, you can
  4093. override any of the internal variables by defining a new variable with
  4094. the same name.
  4095. The list below gives a one-line description of each variable, and a
  4096. cross-reference which selects a full screen help topic on that
  4097. variable. Most of the variables are simple enough that the one-line
  4098. description is sufficient. However, for those variables marked with an
  4099. asterisk [*], the cross-reference topic contains some additional
  4100. information you may wish to review. You can also obtain help on
  4101. any variable with a HELP _variablename command at the prompt.
  4102. See the discussion after the variable list for some additional
  4103. information, and examples of how these variables can be used. For a
  4104. more comprehensive set of examples see the EXAMPLES.BTM file which came
  4105. with 4DOS.
  4106. Note: The variables marked with an exclamation mark [!] are 4DOS-specific;
  4107. they are either not present in 0204NT, or their equivalents there have
  4108. different names. Take this into account when writing portable batch files.
  4109. The variables are grouped by category:
  4110. Hardware status
  4111. _ALT Alt key depressed (0 or 1)
  4112. _CAPSLOCK CapsLock on (0 or 1)
  4113. _CPU "NexGen Nx586" in vDosPlus
  4114. _CPUSPEED Will stall vDosPlus!!!
  4115. _CTRL Ctrl key depressed (0 or 1)
  4116. _KBHIT Keystroke waiting in buffer (0 or 1)
  4117. _LALT Left Alt key depressed (0 or 1)
  4118. _LCTRL Left Ctrl key depressed (0 or 1)
  4119. _LSHIFT Left Shift key depressed (0 or 1)
  4120. _MONITOR "color" in vDosPlus
  4121. _NDP "None" in vDosPlus
  4122. _NUMLOCK NumLock on (0 or 1)
  4123. _RALT Right Alt key depressed (0 or 1)
  4124. _RCTRL Right Ctrl key depressed (0 or 1)
  4125. _RSHIFT Right Shift key depressed (0 or 1)
  4126. _SBDSP "0" in vDosPlus
  4127. _SCROLLLOCK ScrollLock on (0 or 1)
  4128. _SHIFT Shift key depressed (0 or 1)
  4129. _SYSREQ SysReq key depressed (0 or 1)
  4130. _TSC "?" in vDosPlus
  4131. _V86 "0" in vDosPlus
  4132. _VIDEO "vga" in vDosPlus
  4133. Operating system and software status
  4134. _ANSI "1" in vDosPlus
  4135. _APPEND "0" in vDosPlus
  4136. _ASSIGN "0" in vDosPlus
  4137. _BOOT "C" in vDosPlus
  4138. _CODEPAGE Current code page number
  4139. _COUNTRY Current country code
  4140. _DISPLAY "0" in vDosPlus
  4141. _DOS "MS-DOS" in vDosPlus
  4142. _DOSVER Reported DOS version, default "7.10" in vDosPlus
  4143. _DPMI DPMI version, usually "0" in vDosPlus
  4144. _DRIVER "0" in vDosPlus
  4145. _DV DESQview loaded (0 or 1)
  4146. _EGA "0" in vDosPlus
  4147. _FONTPAGE "0" in vDosPlus
  4148. _GRAFTABL "0" in vDosPlus
  4149. _GRAPHICS "0" in vDosPlus
  4150. _MACHINE Machine name
  4151. _MOUSE Mouse enabled (0 or 1)
  4152. _MSCDEX "0" in vDosPlus
  4153. _NETWORK "8" in vDosPlus
  4154. _NLSFUNC "0" in vDosPlus
  4155. _POWER "0" in vDosPlus
  4156. _PRINT "0" in vDosPlus
  4157. _SHARE "1" in vDosPlus
  4158. _SMARTDRV "0" in vDosPlus
  4159. _TASKMAX "0" in vDosPlus
  4160. _TASKSWITCHER "0" in vDosPlus
  4161. _VCPI "0" in vDosPlus
  4162. _VDS "0" in vDosPlus
  4163. _WIN "0" in vDosPlus
  4164. 4DOS status
  4165. _4VER "8.00" in vDosPlus
  4166. 168_ALIAS ! Free alias space in bytes
  4167. 173_BATCH Batch nesting level
  4168. 174_BATCHLINE Current line number in current batch file
  4169. 175_BATCHNAME Name of current batch file
  4170. 500_BATCHTYPE Type of current batch file
  4171. 501_BDEBUGGER Batch debugger active (0 or 1)
  4172. _BUILD "200" in vDosPlus
  4173. 228_CMDLINE Contents of the command line
  4174. _CMDPROC "4DOS" in vDosPlus
  4175. 502_CMDSPEC Full pathname of command processor
  4176. 192_DNAME Name of file used to store file descriptions
  4177. 229_ECHO Echo state (0 or 1)
  4178. 404_EDITMODE Current line editing mode (0 or 1)
  4179. 200_ENV ! Free environment space in bytes
  4180. 405_EXPANSION Current expansion mode (SETDOS /X)
  4181. 202_HLOGFILE Current history log file name
  4182. 506_ININAME Full pathname of the current INI file
  4183. 779_KEYSTACKED ! Number of keystrokes in the KSTACK.COM buffer
  4184. 205_KSTACK ! KSTACK.COM load status (0 or 1)
  4185. 207_LOGFILE Current log file name
  4186. 216_SHELL Shell level (0, 1, 2, ...)
  4187. 737_STARTPATH Startup directory of current shell
  4188. 366_STDERR Standard error not redirected flag (0 or 1)
  4189. 367_STDIN Standard input not redirected flag (0 or 1)
  4190. 368_STDOUT Standard output not redirected flag (0 or 1)
  4191. 217_SWAPPING !* Swapping state (XMS, EMS, Disk, None, or off)
  4192. 220_TRANSIENT * Transient shell flag (0 or 1)
  4193. _VERMAJOR "8" in vDosPlus
  4194. _VERMINOR "0" in vDosPlus
  4195. _VERSION "8.00" in vDosPlus
  4196. Screen, color, and cursor
  4197. 176_BG Background color at cursor position
  4198. 178_CI Current cursor shape in insert mode
  4199. 179_CO Current cursor shape in overstrike mode
  4200. 181_COLUMN Current cursor column
  4201. 182_COLUMNS Screen width
  4202. 201_FG Foreground color at cursor position
  4203. 213_ROW Current cursor row
  4204. 214_ROWS Screen height
  4205. Drives and directories
  4206. 185_CWD Current drive and directory (d:\path)
  4207. 186_CWDS Current drive and directory with \ (d:\path\)
  4208. 187_CWP Current directory (\path)
  4209. 188_CWPS Current directory with \ (\path\)
  4210. 191_DISK Current drive (C, D, etc.)
  4211. 590_DRIVES List of all available drives
  4212. 830_LASTDIR Previous directory (from directory history)
  4213. 206_LASTDISK Last possible drive (E, F, etc.)
  4214. 716_READY List of ready (accessible) drives
  4215. Dates and times
  4216. 189_DATE * Current date (mm-dd-yy)
  4217. 370_DATETIME * Current date and time (yyyyMMddhhmmss)
  4218. 190_DAY Day of the month (1 - 31)
  4219. 195_DOW Day of the week (Mon, Tue, Wed, etc.)
  4220. 226_DOWF Day of the week (Monday, Tuesday, etc.)
  4221. 196_DOWI Numeric day of the week (Sun = 1, etc.)
  4222. 197_DOY Day of the year (1 - 366)
  4223. 738_DST Daylight saving time (0 or 1)
  4224. 203_HOUR Hour (0 - 23)
  4225. 230_ISODATE Current date (yyyy-mm-dd)
  4226. 454_ISODOWI ! Numeric day of the week (Mon = 1, etc.)
  4227. 736_ISORDATE ! Current ISO 8601 ordinal date (yyyy-ddd)
  4228. 460_ISOWDATE ! Current ISO 8601 week date (yyyy-Www-d)
  4229. 455_ISOWEEK ! Week of the year pursuant to ISO 8601
  4230. 591_ISOWYEAR ! Current ISO 8601 week date year
  4231. 208_MINUTE Minute (0 - 59)
  4232. 739_MJD ! Modified Julian Day
  4233. 210_MONTH Month of the year (1 - 12)
  4234. 240_MONTHF Month of the year (January, February, etc.)
  4235. 215_SECOND Second (0 - 59)
  4236. 740_STZN Name of time zone for standard time
  4237. 741_STZO Offset in minutes from UTC for standard time
  4238. 588_TICK ! BIOS clock tick since midnight
  4239. 219_TIME * Current time (hh:mm:ss)
  4240. 742_TZN Name of current time zone
  4241. 743_TZO Offset in minutes from UTC for current time zone
  4242. 744_UNIXTIME ! Current Unix time
  4243. 745_UTCDATE Current UTC date
  4244. 746_UTCDATETIME Current UTC date and time
  4245. 747_UTCHOUR Current UTC hour
  4246. 748_UTCISODATE Current UTC date in ISO format
  4247. 749_UTCMINUTE Current UTC minute
  4248. 750_UTCSECOND Current UTC second
  4249. 760_UTCTIME Current UTC time
  4250. _WINTICKS Milliseconds since midnight
  4251. _YEAR Current system year (1980 to 2099).
  4252. Error codes
  4253. 162? * Exit code, last external program
  4254. 163?? !* Reason for external program termination
  4255. 164_? * Exit code, last internal command
  4256. 365_EXECSTR * Last @EXECSTR return code
  4257. 218_SYSERR * Last DOS error
  4258. Compatibility
  4259. 166+ * Substitutes command separator
  4260. 165= * Substitutes escape character
  4261. Additional Notes
  4262. These internal variables are often used in batch files and aliases to examine
  4263. system resources and adjust to the current computer settings. You can examine
  4264. the contents of any internal variable (except %= and %+) from the command
  4265. line with a command like this:
  4266. c:\> echo %variablename
  4267. Some variables return values based on information provided by your operating
  4268. system. These variables will only return correct information if the operating
  4269. system provides it.
  4270. On disk volumes which do not support long filenames, variables which return a
  4271. path or file name will return their result in upper or lower case depending
  4272. on the value of the 664SETDOS /U switch or the 446UpperCase directive
  4273. in the .INI file. On volumes which do support long filenames, these variables
  4274. will return names as they are stored on the disk and no case shifting will be
  4275. performed. Returned filename values which include long filenames are
  4276. not quoted automatically; you must add quotes yourself if they are required
  4277. for your use of the variable value (see 118Argument Quoting).
  4278. Examples
  4279. You can use these variables in a wide variety of ways depending on your
  4280. needs. Here are just a few examples. For a more comprehensive set of
  4281. examples see the EXAMPLES.BTM file which came with 4DOS.
  4282. Some of these examples rely on the 633IF and 634IFF commands to
  4283. test the value of a variable and perform different actions based on that
  4284. value.
  4285. In a batch file, set the color based on the video card type:
  4286. iff "%_video"=="mono" then
  4287. color bright white on black
  4288. else
  4289. color bright white on blue
  4290. endiff
  4291. Call another batch file if 4DOS is running under DESQview:
  4292. if "%_dv" == "1" call dvstart
  4293. Store the current date and time in a file, then save the output of a 612DIR
  4294. command in the same file:
  4295. echo Directory as of %_date %_time > dirsave
  4296. dir >> dirsave
  4297. Set up a prompt for the primary shell which displays the time and current
  4298. directory, and a different one for secondary shells which includes the
  4299. shell level rather than the time (see 652PROMPT for details about
  4300. setting the prompt). Also set different background colors for the two
  4301. shells, without changing the foreground color. You might use a sequence
  4302. like this in your 4START file (see 109Automatic Batch Files):
  4303. iff %_shell==0 then
  4304. prompt $t $p$g
  4305. color %_fg on blue
  4306. else
  4307. prompt [$z] $p$g
  4308. color %_fg on cyan
  4309. endiff
  4310. ;---------------------------------------------------------------------------
  4311. !TOPIC 162 ?
  4312. !NOINDEX
  4313. !TTY
  4314. ? contains the exit code of the last external command. Many programs
  4315. return a "0" to indicate success and a non-zero value to signal an error.
  4316. However, not all programs return an exit code. If no explicit exit code is
  4317. returned, the value of %? is undefined.
  4318. ;---------------------------------------------------------------------------
  4319. !TOPIC 163 ??
  4320. !NOINDEX
  4321. !TTY
  4322. ?? returns a code which explains how the last program terminated:
  4323. 0 -- program terminated normally.
  4324. 1 -- program terminated by Ctrl-C or Ctrl-Break.
  4325. 2 -- program terminated due to a critical error.
  4326. 3 -- program terminated and stayed resident in memory (TSR).
  4327. ;---------------------------------------------------------------------------
  4328. !TOPIC 164 _?
  4329. !NOINDEX
  4330. !TTY
  4331. _? contains the exit code of the last internal command. It is set to
  4332. "0" if the command was successful, "1" if a usage error occurred, "2" if
  4333. another command processor error or an operating system error occurred, or
  4334. "3" if the command was interrupted by Ctrl-C or Ctrl-Break. You
  4335. must use or save this value immediately, because it is set by every
  4336. internal command.
  4337. ;---------------------------------------------------------------------------
  4338. !TOPIC 165 =
  4339. !NOINDEX
  4340. !TTY
  4341. = returns the current 086escape character. Use this variable, instead
  4342. of the actual escape character, if you want your batch files and aliases to
  4343. work regardless of how the escape character is defined. For example, if
  4344. the escape character is a Ctrl-X [], both of the commands below
  4345. will send a form feed to the printer. However, if the escape character has
  4346. been changed, the first command will send the string "^f" to the printer,
  4347. while the second command will continue to work as intended.
  4348. echos f > prn
  4349. echos %=f > prn
  4350. See 054Special Character Compatibility for further information.
  4351. ;---------------------------------------------------------------------------
  4352. !TOPIC 166 +
  4353. !NOINDEX
  4354. !TTY
  4355. + returns the current 041command separator. Use this variable, instead
  4356. of the actual command separator, if you want your batch files and aliases to
  4357. work regardless of how the command separator is defined. For example, if
  4358. the command separator is a caret [^], both of the commands below will
  4359. display "Hello" on one line and "World" on the next. However, if the
  4360. command separator has been changed the first command will display
  4361. "Hello ^ echo World", while the second command will continue to work as
  4362. intended.
  4363. echo Hello ^ echo World
  4364. echo Hello %+ echo World
  4365. See 054Special Character Compatibility for further information.
  4366. ;---------------------------------------------------------------------------
  4367. !TOPIC 168 _ALIAS
  4368. !NOINDEX
  4369. !TTY
  4370. _ALIAS contains the free space in the alias list, in bytes.
  4371. ;---------------------------------------------------------------------------
  4372. !TOPIC 173 _BATCH
  4373. !NOINDEX
  4374. !TTY
  4375. _BATCH is the current batch nesting level. It is "0" if no batch file
  4376. is currently being processed.
  4377. ;---------------------------------------------------------------------------
  4378. !TOPIC 174 _BATCHLINE
  4379. !NOINDEX
  4380. !TTY
  4381. _BATCHLINE is the current line number in the current batch file. It is
  4382. "-1" if no batch file is currently being processed.
  4383. ;---------------------------------------------------------------------------
  4384. !TOPIC 175 _BATCHNAME
  4385. !NOINDEX
  4386. !TTY
  4387. _BATCHNAME is the full path and file name of the current batch file. It
  4388. is an empty string if no batch file is currently being processed.
  4389. ;---------------------------------------------------------------------------
  4390. !TOPIC 500 _BATCHTYPE
  4391. !NOINDEX
  4392. !TTY
  4393. _BATCHTYPE is the file type of the current batch file, as follows:
  4394. !NOWRAP
  4395. Value Meaning
  4396. -1 not in a batch file
  4397. 0 normal
  4398. 1 compressed
  4399. 2 encrypted
  4400. !WRAP
  4401. ;---------------------------------------------------------------------------
  4402. !TOPIC 501 _BDEBUGGER
  4403. !NOINDEX
  4404. !TTY
  4405. _BDEBUGGER is "1" if the batch debugger is actively debugging a file, or
  4406. "0" if it is not.
  4407. ;---------------------------------------------------------------------------
  4408. !TOPIC 176 _BG
  4409. !NOINDEX
  4410. !TTY
  4411. _BG is a string containing the first three characters of the screen
  4412. background color at the current cursor location (for example, "Bla").
  4413. ;---------------------------------------------------------------------------
  4414. !TOPIC 178 _CI
  4415. !NOINDEX
  4416. !TTY
  4417. _CI returns the current shape of the cursor in insert mode, as a percentage
  4418. (see 664SETDOS /S and the 419CursorIns directive).
  4419. ;---------------------------------------------------------------------------
  4420. !TOPIC 228 _CMDLINE
  4421. !NOINDEX
  4422. !TTY
  4423. _CMDLINE is the current command line. (This is most useful inside key
  4424. aliases.) If specified on the command line, returns the contents of the
  4425. command line with the %_CMDLINE name removed.
  4426. ;---------------------------------------------------------------------------
  4427. !TOPIC 502 _CMDSPEC
  4428. !NOINDEX
  4429. !TTY
  4430. _CMDSPEC is the full pathname of the command processor.
  4431. ;---------------------------------------------------------------------------
  4432. !TOPIC 179 _CO
  4433. !NOINDEX
  4434. !TTY
  4435. _CO returns the current shape of the cursor in overstrike mode, as a
  4436. percentage (see 664SETDOS /S and the 420CursorOver directive).
  4437. ;---------------------------------------------------------------------------
  4438. !TOPIC 181 _COLUMN
  4439. !NOINDEX
  4440. !TTY
  4441. _COLUMN is the current cursor column (for example, "0" for the left
  4442. side of the screen).
  4443. ;---------------------------------------------------------------------------
  4444. !TOPIC 182 _COLUMNS
  4445. !NOINDEX
  4446. !TTY
  4447. _COLUMNS is the current number of screen columns (for example, "80").
  4448. ;---------------------------------------------------------------------------
  4449. !TOPIC 185 _CWD
  4450. !NOINDEX
  4451. !TTY
  4452. _CWD is the current working directory in the format d:\pathname.
  4453. ;---------------------------------------------------------------------------
  4454. !TOPIC 186 _CWDS
  4455. !NOINDEX
  4456. !TTY
  4457. _CWDS has the same value as CWD, except it ends the pathname with a
  4458. backslash [\].
  4459. ;---------------------------------------------------------------------------
  4460. !TOPIC 187 _CWP
  4461. !NOINDEX
  4462. !TTY
  4463. _CWP is the current working directory in the format \pathname.
  4464. ;---------------------------------------------------------------------------
  4465. !TOPIC 188 _CWPS
  4466. !NOINDEX
  4467. !TTY
  4468. _CWPS has the same value as CWP, except it ends the pathname with a
  4469. backslash [\].
  4470. ;---------------------------------------------------------------------------
  4471. !TOPIC 189 _DATE
  4472. !NOINDEX
  4473. !TTY
  4474. _DATE contains the current system date, in the format mm-dd-yy (U.S.),
  4475. dd-mm-yy (Europe), or yy-mm-dd (Japan). The separator character may vary
  4476. depending upon your country information.
  4477. ;---------------------------------------------------------------------------
  4478. !TOPIC 370 _DATETIME
  4479. !NOINDEX
  4480. !TTY
  4481. _DATETIME contains the current system date and time as 14-characters in
  4482. the format yyyyMMddhhmmss. The date part is the same as 230_ISODATE
  4483. without separators.
  4484. ;---------------------------------------------------------------------------
  4485. !TOPIC 190 _DAY
  4486. !NOINDEX
  4487. !TTY
  4488. _DAY is the current day of the month (1 to 31).
  4489. ;---------------------------------------------------------------------------
  4490. !TOPIC 191 _DISK
  4491. !NOINDEX
  4492. !TTY
  4493. _DISK is the current disk drive, without a colon (for example, "C").
  4494. ;---------------------------------------------------------------------------
  4495. !TOPIC 192 _DNAME
  4496. !NOINDEX
  4497. !TTY
  4498. _DNAME returns the name of the file used to store file descriptions. It
  4499. can be changed with the 423DescriptionName directive in 4DOS.INI or
  4500. the 664SETDOS /D command.
  4501. ;---------------------------------------------------------------------------
  4502. !TOPIC 195 _DOW
  4503. !NOINDEX
  4504. !TTY
  4505. _DOW is the first three characters of the current day of the week
  4506. ("Mon", "Tue", "Wed", etc.).
  4507. ;---------------------------------------------------------------------------
  4508. !TOPIC 226 _DOWF
  4509. !NOINDEX
  4510. !TTY
  4511. _DOWF is the full day of the week for the current date ("Monday",
  4512. "Tuesday", etc.).
  4513. ;---------------------------------------------------------------------------
  4514. !TOPIC 196 _DOWI
  4515. !NOINDEX
  4516. !TTY
  4517. _DOWI is the current day of the week as an integer (1 = Sunday, 2 = Monday,
  4518. etc.).
  4519. ;---------------------------------------------------------------------------
  4520. !TOPIC 197 _DOY
  4521. !NOINDEX
  4522. !TTY
  4523. _DOY is the day of the year (1 to 366).
  4524. ;---------------------------------------------------------------------------
  4525. !TOPIC 590 _DRIVES
  4526. !NOINDEX
  4527. !TTY
  4528. _DRIVES returns a space-delimited list of the existing drives on the system
  4529. (for example, "A: C: D: E:").
  4530. ;---------------------------------------------------------------------------
  4531. !TOPIC 738 _DST
  4532. !NOINDEX
  4533. !TTY
  4534. _DST is "1" if daylight saving time (a.k.a. "summer time") is in effect,
  4535. or "0" otherwise. See 759TZ for more information.
  4536. ;---------------------------------------------------------------------------
  4537. !TOPIC 229 _ECHO
  4538. !NOINDEX
  4539. !TTY
  4540. _ECHO is the current echo state. There are two echo states, one for
  4541. the command line and one for batch files.
  4542. ;---------------------------------------------------------------------------
  4543. !TOPIC 404 _EDITMODE
  4544. !NOINDEX
  4545. !TTY
  4546. _EDITMODE is "0" if the line editor is in overstrike mode, or "1" if it is
  4547. in insert mode.
  4548. ;---------------------------------------------------------------------------
  4549. !TOPIC 200 _ENV
  4550. !NOINDEX
  4551. !TTY
  4552. _ENV is the free space in the environment, in bytes.
  4553. ;---------------------------------------------------------------------------
  4554. !TOPIC 365 _EXECSTR
  4555. !NOINDEX
  4556. !TTY
  4557. _EXECSTR is the integer return code of the last 265@EXECSTR function.
  4558. ;---------------------------------------------------------------------------
  4559. !TOPIC 405 _EXPANSION
  4560. !NOINDEX
  4561. !TTY
  4562. _EXPANSION is the current expansion mode (i.e. 664SETDOS /X). It is "0"
  4563. if everything is enabled, or a string of up to 9 digits for the disabled
  4564. modes, e.g. "46" if nested variable expansion and redirection are disabled.
  4565. ;---------------------------------------------------------------------------
  4566. !TOPIC 201 _FG
  4567. !NOINDEX
  4568. !TTY
  4569. _FG is a string containing the first three letters of the screen
  4570. foreground color at the current cursor position (for example, "Whi").
  4571. ;---------------------------------------------------------------------------
  4572. !TOPIC 202 _HLOGFILE
  4573. !NOINDEX
  4574. !TTY
  4575. _HLOGFILE returns the name of the current history log file (or an
  4576. empty string if 643LOG /H is OFF).
  4577. ;---------------------------------------------------------------------------
  4578. !TOPIC 203 _HOUR
  4579. !NOINDEX
  4580. !TTY
  4581. _HOUR is the current hour (0 - 23).
  4582. ;---------------------------------------------------------------------------
  4583. !TOPIC 506 _ININAME
  4584. !NOINDEX
  4585. !TTY
  4586. _ININAME returns the full pathname of the INI file used by the current
  4587. shell.
  4588. ;---------------------------------------------------------------------------
  4589. !TOPIC 230 _ISODATE
  4590. !NOINDEX
  4591. !TTY
  4592. _ISODATE returns the current date in ISO 8601 international format
  4593. (yyyy-mm-dd).
  4594. ;---------------------------------------------------------------------------
  4595. !TOPIC 454 _ISODOWI
  4596. !NOINDEX
  4597. !TTY
  4598. _ISODOWI is the current day of the week as an integer (1 = Monday,
  4599. 2 = Tuesday, ... , 6 = Saturday, 7 = Sunday), pursuant to ISO 8601.
  4600. ;---------------------------------------------------------------------------
  4601. !TOPIC 736 _ISORDATE
  4602. !NOINDEX
  4603. !TTY
  4604. _ISORDATE returns the current ordinal date in ISO 8601 international format
  4605. (yyyy-ddd where ddd is the day of the year, 1 to 366).
  4606. ;---------------------------------------------------------------------------
  4607. !TOPIC 460 _ISOWDATE
  4608. !NOINDEX
  4609. !TTY
  4610. _ISOWDATE returns the current week date in ISO 8601 international format
  4611. (yyyy-Www-d where ww is the week and d is the week day). It is possible
  4612. that the year is one less or more than the current year because some partial
  4613. weeks at the beginning or the end of the year may belong to the last or next
  4614. year, according to ISO 8601.
  4615. ;---------------------------------------------------------------------------
  4616. !TOPIC 455 _ISOWEEK
  4617. !NOINDEX
  4618. !TTY
  4619. _ISOWEEK is the week of the year (1 to 53), pursuant to ISO 8601. Week 1
  4620. is the one that includes the first Thursday of the year, or equivalently,
  4621. the week which includes 4th of January. It is possible that a January week
  4622. is 52 or 53, or a December week is 1. This means that, according to
  4623. ISO 8601, it belongs to the last or the next calendar year, respectively.
  4624. ;---------------------------------------------------------------------------
  4625. !TOPIC 591 _ISOWYEAR
  4626. !NOINDEX
  4627. !TTY
  4628. _ISOWYEAR is the ISO 8601 week date year. It may not be the calendar
  4629. year but the last or next year. This means that, according to ISO 8601, the
  4630. week belongs to the last or the next calendar year, respectively.
  4631. ;---------------------------------------------------------------------------
  4632. !TOPIC 779 _KEYSTACKED
  4633. !NOINDEX
  4634. !TTY
  4635. _KEYSTACKED returns the number of the keystrokes left in the KSTACK.COM
  4636. buffer. If KSTACK.COM is not loaded, it returns "0".
  4637. ;---------------------------------------------------------------------------
  4638. !TOPIC 205 _KSTACK
  4639. !NOINDEX
  4640. !TTY
  4641. _KSTACK returns "1" if KSTACK.COM is loaded or "0" otherwise.
  4642. ;---------------------------------------------------------------------------
  4643. !TOPIC 830 _LASTDIR
  4644. !NOINDEX
  4645. !TTY
  4646. _LASTDIR is the previous directory (from the directory history).
  4647. ;---------------------------------------------------------------------------
  4648. !TOPIC 206 _LASTDISK
  4649. !NOINDEX
  4650. !TTY
  4651. _LASTDISK is the last valid drive letter, without a colon.
  4652. ;---------------------------------------------------------------------------
  4653. !TOPIC 207 _LOGFILE
  4654. !NOINDEX
  4655. !TTY
  4656. _LOGFILE returns the name of the current log file (or an empty string
  4657. if 643LOG is OFF).
  4658. ;---------------------------------------------------------------------------
  4659. !TOPIC 208 _MINUTE
  4660. !NOINDEX
  4661. !TTY
  4662. _MINUTE is the current minute (0 - 59).
  4663. ;---------------------------------------------------------------------------
  4664. !TOPIC 739 _MJD
  4665. !NOINDEX
  4666. !TTY
  4667. _MJD is the Modified Julian Day or the fractional number of days elapsed
  4668. since 17 November 1858, 00:00 UTC. See 759TZ for more information.
  4669. ;---------------------------------------------------------------------------
  4670. !TOPIC 210 _MONTH
  4671. !NOINDEX
  4672. !TTY
  4673. _MONTH is the current month of the year (1 to 12).
  4674. ;---------------------------------------------------------------------------
  4675. !TOPIC 240 _MONTHF
  4676. !NOINDEX
  4677. !TTY
  4678. _MONTHF is the full name of the current month ("January", "February",
  4679. etc.).
  4680. ;---------------------------------------------------------------------------
  4681. !TOPIC 716 _READY
  4682. !NOINDEX
  4683. !TTY
  4684. _READY returns a space-delimited list of the the currently ready
  4685. (accessible) drives on the system (for example, "C: D: E:").
  4686. ;---------------------------------------------------------------------------
  4687. !TOPIC 213 _ROW
  4688. !NOINDEX
  4689. _ROW is the current cursor row (for example, "0" for the top of the
  4690. screen).
  4691. ;---------------------------------------------------------------------------
  4692. !TOPIC 214 _ROWS
  4693. !NOINDEX
  4694. !TTY
  4695. _ROWS is the current number of screen rows (for example, "25").
  4696. ;---------------------------------------------------------------------------
  4697. !TOPIC 215 _SECOND
  4698. !NOINDEX
  4699. !TTY
  4700. _SECOND is the current second (0 - 59).
  4701. ;---------------------------------------------------------------------------
  4702. !TOPIC 216 _SHELL
  4703. !NOINDEX
  4704. !TTY
  4705. _SHELL is the current shell nesting level. The primary shell is level
  4706. "0", and each subsequent secondary shell increments the level by 1.
  4707. ;---------------------------------------------------------------------------
  4708. !TOPIC 737 _STARTPATH
  4709. !NOINDEX
  4710. !TTY
  4711. _STARTPATH is the startup directory for the current shell (not necessarily
  4712. the same as the location of the executable!).
  4713. ;---------------------------------------------------------------------------
  4714. !TOPIC 366 _STDERR
  4715. !NOINDEX
  4716. !TTY
  4717. _STDERR is "1" if the standard error points to the console, and "0" if it
  4718. has been redirected.
  4719. ;---------------------------------------------------------------------------
  4720. !TOPIC 367 _STDIN
  4721. !NOINDEX
  4722. !TTY
  4723. _STDIN is "1" if the standard input points to the console, and "0" if it
  4724. has been redirected.
  4725. ;---------------------------------------------------------------------------
  4726. !TOPIC 368 _STDOUT
  4727. !NOINDEX
  4728. !TTY
  4729. _STDOUT is "1" if the standard output points to the console, and "0" if it
  4730. has been redirected.
  4731. ;---------------------------------------------------------------------------
  4732. !TOPIC 740 _STZN
  4733. !NOINDEX
  4734. !TTY
  4735. _STZN is the name of standard time in the current time zone. See 759TZ
  4736. for more information.
  4737. ;---------------------------------------------------------------------------
  4738. !TOPIC 741 _STZO
  4739. !NOINDEX
  4740. !TTY
  4741. _STZO is the offset in minutes of UTC from standard time in the current
  4742. time zone. See 759TZ for more information.
  4743. ;---------------------------------------------------------------------------
  4744. !TOPIC 217 _SWAPPING
  4745. !NOINDEX
  4746. !TTY
  4747. _SWAPPING returns the current swapping state. The return value is
  4748. "OFF" if swapping has been disabled with the 668SWAPPING command,
  4749. "EMS" if expanded memory is being used, "XMS" if extended memory is being
  4750. used, or "Disk" if 4DOS is using disk swapping. The return value is "None"
  4751. if swapping has been disabled with the 4DOS.INI 391Swapping directive
  4752. or if 4DOS failed to initiate memory or disk swapping during initialization.
  4753. Note: If 4DOS reports swapping to XMS, 4DOS will actually be swapped
  4754. out of DOS completely by vDosPlus.
  4755. ;---------------------------------------------------------------------------
  4756. !TOPIC 218 _SYSERR
  4757. !NOINDEX
  4758. !TTY
  4759. _SYSERR is the error code of the last operating system error.
  4760. Some of the error codes are listed below. You will need a technical
  4761. or programmer's manual to understand these error values in detail, and
  4762. to check the meaning of codes not listed. The specific codes used and
  4763. the meaning of each may vary between operating systems or operating
  4764. system versions; the list below is based on DOS 6.xx and 7.xx.
  4765. !NOWRAP
  4766. Code Meaning Code Meaning
  4767. ---- ---------------------------------- ---- ------------------------------
  4768. 1 Bad function 40 Device not ready
  4769. 2 File not found 41 File allocation table bad
  4770. 3 Invalid path
  4771. 4 Too many open files 50 Invalid net request
  4772. 5 Access denied 51 Remote computer not listening
  4773. 6 Invalid handle 52 Duplicate name on net
  4774. 7 Memory destroyed 53 Net name not found
  4775. 8 Out of memory 54 Net busy
  4776. 9 Bad memory block 55 Net device no longer exists
  4777. 10 Bad environment 56 NetBIOS command limit exceeded
  4778. 11 Bad format 57 Net adapter hardware error
  4779. 12 Invalid access code 58 Bad response from net
  4780. 13 Invalid data 59 Unexpected net error
  4781. 14 Internal DOS error / Fixup overflow 60 Incompatible remote adapter
  4782. 15 Invalid drive 61 Print queue full
  4783. 16 Can't remove current directory 62 No room for print file
  4784. 17 Not same device 63 Print file was cancelled
  4785. 18 No more files 64 Net name was deleted
  4786. 65 Access denied
  4787. 19 Write protect error 66 Net device type incorrect
  4788. 20 Invalid unit 67 Network name not found
  4789. 21 Not ready 68 Net name limit exceeded
  4790. 22 Invalid device request 69 NetBIOS session limit exceeded
  4791. 23 Data error 70 Sharing temporarily paused
  4792. 24 Invalid device request parameters 71 Net request not accepted
  4793. 25 Seek error 72 Print or disk redirection paused
  4794. 26 Invalid media type 73 Invalid network version
  4795. 27 Sector not found 74 Adapter close / Account expired
  4796. 28 Printer out of paper error 75 Password expired
  4797. 29 Write fault error 76 Login currently not allowed
  4798. 30 Read fault error 77 Disk limit exceeded on node
  4799. 31 General failure 78 Not logged in to a net node
  4800. 32 Sharing violation
  4801. 33 Lock violation 80 File exists
  4802. 34 Invalid disk change 81 Duplicated FCB
  4803. 35 FCB unavailable 82 Can't make directory entry
  4804. 36 Sharing buffer overflow 83 Fail on INT 24
  4805. 37 Code page mismatch
  4806. 38 Out of input before end
  4807. 39 Out of disk space
  4808. Some of the less common error codes are listed below. Most of them
  4809. belong to redirector software (such as MSCDEX, NWCDEX, DRFAT32, etc.),
  4810. and networking software such as Novell NetWare, or LANtastic, but there are
  4811. also some codes related to JOIN/SUBST or DOS 7.xx volume locking problems.
  4812. Code Meaning
  4813. ---- -----------------------------------------------------------------------
  4814. 84 Too many redirections
  4815. 85 Duplicate redirection
  4816. 86 Invalid password
  4817. 87 Invalid parameter
  4818. 88 Net device fault
  4819. 89 Net function not supported / No process slots
  4820. 90 Required component not installed
  4821. 91 Timer server table overflow
  4822. 92 Duplicate in timer service table
  4823. 93 No items to work on
  4824. 95 Interrupted / Invalid system call
  4825. 100 Open net semaphore limit exceeded / CD-ROM unknown error
  4826. 101 Exclusive net semaphore is already owned / CD-ROM not ready
  4827. 102 Semaphore was set when close attempted / CD-ROM EMS memory bad
  4828. 103 Too many exclusive semaphore requests / CD not High Sierra or ISO-9660
  4829. 104 Operation invalid from interrupt handler / CD-ROM door open
  4830. 105 Semaphore owner died
  4831. 106 Semaphore limit exceeded
  4832. 107 Insert drive B: disk into A: / Disk changed
  4833. 108 Drive locked by another process
  4834. 109 Broken pipe
  4835. 110 Pipe open/create failed
  4836. 111 Pipe buffer overflowed
  4837. 112 Disk full
  4838. 113 No more search handles
  4839. 114 Invalid target handle for dup2
  4840. 115 Bad user virtual address / Protection violation
  4841. 116 VIOKBD request / Error on console I/O
  4842. 117 Unknown category code for IOCTL
  4843. 118 Invalid value for verify flag
  4844. 119 Level four driver not found by DOS IOCTL
  4845. 120 Invalid function number
  4846. 121 Semaphore timeout
  4847. 122 Buffer too small to hold return data
  4848. 123 Invalid character or bad file-system name
  4849. 124 Unimplemented information level
  4850. 125 No volume label found
  4851. 126 Module handle not found
  4852. 127 Procedure address not found
  4853. 128 CWait found no children
  4854. 129 CWait children still running
  4855. 130 Invalid operation for direct disk-access handle
  4856. 131 Attempted seek to negative offset
  4857. 132 Attempted to seek on device or pipe
  4858. 133 Drive already has JOINed drives
  4859. 134 Drive is already JOINed
  4860. 135 Drive is already SUBSTed
  4861. 136 Can not delete drive which is not JOINed
  4862. 137 Can not delete drive which is not SUBSTed
  4863. 138 Can not JOIN to a JOINed drive
  4864. 139 Can not SUBST to a SUBSTed drive
  4865. 140 Can not JOIN to a SUBSTed drive
  4866. 141 Can not SUBST to a JOINed drive
  4867. 142 Drive is busy
  4868. 143 Can not JOIN/SUBST to same drive
  4869. 144 Directory must not be root directory
  4870. 145 Can only JOIN to empty directory
  4871. 146 Path is already in use for SUBST
  4872. 147 Path is already in use for JOIN
  4873. 148 Path is in use by another process
  4874. 149 Directory previously SUBSTituted
  4875. 150 System trace error
  4876. 151 Invalid event count for DosMuxSemWait
  4877. 152 Too many waiting on mutex
  4878. 153 Invalid list format
  4879. 154 Volume label too large
  4880. 155 Unable to create another TCB
  4881. 156 Signal refused
  4882. 157 Segment discarded
  4883. 158 Segment not locked
  4884. 159 Invalid thread-ID address
  4885. 160 Bad arguments / Bad environment pointer
  4886. 161 Invalid pathname passed to EXEC
  4887. 162 Signal already pending
  4888. 163 Uncertain media / ERROR_124 mapping
  4889. 164 Maximum number of threads reached / No more process slots
  4890. 165 ERROR_124 mapping
  4891. 176 Volume is not locked
  4892. 177 Volume is locked in drive
  4893. 178 Volume is not removable
  4894. 180 Lock count has been exceeded / Invalid segment number
  4895. 181 A valid eject request failed / Invalid call gate
  4896. 182 Invalid ordinal
  4897. 183 Shared segment already exists
  4898. 184 No child process to wait for
  4899. 185 NoWait specified and child still running
  4900. 186 Invalid flag number
  4901. 187 Semaphore does not exist
  4902. 188 Invalid starting code segment
  4903. 189 Invalid stack segment
  4904. 190 Invalid module type (DLL can not be used as application)
  4905. 191 Invalid EXE signature
  4906. 192 EXE marked invalid
  4907. 193 Bad EXE format (e.g. DOS-mode program)
  4908. 194 Iterated data exceeds 64K
  4909. 195 Invalid minimum allocation size
  4910. 196 Dynamic link from invalid Ring
  4911. 197 IOPL not enabled
  4912. 198 Invalid segment descriptor privilege level
  4913. 199 Automatic data segment exceeds 64K
  4914. 200 Ring2 segment must be moveable
  4915. 201 Relocation chain exceeds segment limit
  4916. 202 Infinite loop in relocation chain
  4917. 203 Environment variable not found
  4918. 204 Not current country
  4919. 205 No signal sent
  4920. 206 File name not 8.3
  4921. 207 Ring2 stack in use
  4922. 208 Meta expansion is too long
  4923. 209 Invalid signal number
  4924. 210 Inactive thread
  4925. 211 File system information not available
  4926. 212 Locked error
  4927. 213 Attempted to execute non-family API call in DOS mode
  4928. 214 Too many modules
  4929. 215 Nesting not allowed
  4930. 230 Non-existent pipe, or bad operation
  4931. 231 Pipe is busy
  4932. 232 No data available for nonblocking read
  4933. 233 Pipe disconnected by server
  4934. 234 More data available
  4935. 255 Invalid drive
  4936. !WRAP
  4937. ;---------------------------------------------------------------------------
  4938. !TOPIC 588 _TICK
  4939. !NOINDEX
  4940. !TTY
  4941. _TICK contains the current BIOS clock tick since midnight. There are
  4942. approximately 18.2 ticks per second. The possible values are from 0 to
  4943. 1,573,039.
  4944. ;---------------------------------------------------------------------------
  4945. !TOPIC 219 _TIME
  4946. !NOINDEX
  4947. !TTY
  4948. _TIME contains the current system time in the format hh:mm:ss. The
  4949. separator character may vary depending upon your country information.
  4950. ;---------------------------------------------------------------------------
  4951. !TOPIC 220 _TRANSIENT
  4952. !NOINDEX
  4953. !TTY
  4954. _TRANSIENT is "1" if the current shell is transient (started with
  4955. a /C, see 352Startup), or "0" otherwise.
  4956. See also 109Automatic Batch Files for further uses of the _TRANSIENT
  4957. internal variable.
  4958. ;---------------------------------------------------------------------------
  4959. !TOPIC 742 _TZN
  4960. !NOINDEX
  4961. !TTY
  4962. _TZN is the name of the current time zone. See 759TZ for more
  4963. information.
  4964. ;---------------------------------------------------------------------------
  4965. !TOPIC 743 _TZO
  4966. !NOINDEX
  4967. !TTY
  4968. _TZO is the offset in minutes of UTC from the current time zone. See
  4969. 759TZ for more information.
  4970. ;---------------------------------------------------------------------------
  4971. !TOPIC 744 _UNIXTIME
  4972. !NOINDEX
  4973. !TTY
  4974. _UNIXTIME is the number of seconds elapsed since 1 January 1970, 00:00 UTC
  4975. (the Epoch) as defined by ISO/IEC 9945 (a.k.a. POSIX or IEEE Std 1003.1).
  4976. See 759TZ for more information.
  4977. ;---------------------------------------------------------------------------
  4978. !TOPIC 745 _UTCDATE
  4979. !NOINDEX
  4980. !TTY
  4981. _UTCDATE is the current UTC date in format mm-dd-yy (U.S.), dd-mm-yy
  4982. (Europe), or yy-mm-dd (Japan). The separator character may vary depending
  4983. upon your country information. See 759TZ for more information.
  4984. ;---------------------------------------------------------------------------
  4985. !TOPIC 746 _UTCDATETIME
  4986. !NOINDEX
  4987. !TTY
  4988. _UTCDATETIME is the current UTC date and time as 14-characters in the
  4989. format yyyyMMddhhmmss. The date part is the same as 748_UTCISODATE
  4990. without separators. See 759TZ for more information.
  4991. ;---------------------------------------------------------------------------
  4992. !TOPIC 747 _UTCHOUR
  4993. !NOINDEX
  4994. !TTY
  4995. _UTCHOUR is the current UTC hour. See 759TZ for more information.
  4996. ;---------------------------------------------------------------------------
  4997. !TOPIC 748 _UTCISODATE
  4998. !NOINDEX
  4999. !TTY
  5000. _UTCISODATE is the current UTC date in ISO 8601 international format
  5001. (yyyy-mm-dd). See 759TZ for more information.
  5002. ;---------------------------------------------------------------------------
  5003. !TOPIC 749 _UTCMINUTE
  5004. !NOINDEX
  5005. !TTY
  5006. _UTCMINUTE is the current UTC minute. See 759TZ for more information.
  5007. ;---------------------------------------------------------------------------
  5008. !TOPIC 750 _UTCSECOND
  5009. !NOINDEX
  5010. !TTY
  5011. _UTCSECOND is the current UTC second. See 759TZ for more information.
  5012. ;---------------------------------------------------------------------------
  5013. !TOPIC 760 _UTCTIME
  5014. !NOINDEX
  5015. !TTY
  5016. _UTCTIME is the current UTC time in the format hh:mm:ss. The separator
  5017. character may vary depending upon your country information. See 759TZ
  5018. for more information.
  5019. ;---------------------------------------------------------------------------
  5020. !TOPIC 350 Examples of Variable Functions
  5021. !NOINDEX
  5022. You can use variable functions in a wide variety of ways depending on your
  5023. needs. We've included a few examples below to give you an idea of what's
  5024. possible. For a more comprehensive set of examples see the EXAMPLES.BTM
  5025. file which came with 4DOS. For information on how to set up user-defined
  5026. variable functions, see the 696FUNCTION and 699UNFUNCTION commands.
  5027. To set the prompt to show the amount of free memory (see 652PROMPT
  5028. for details on including variable functions in your prompt):
  5029. c:\> prompt (%%@dosmem[K]K) $p$g
  5030. Set up a simple command-line calculator. The calculator is used with a
  5031. command like CALC 3 * (4 + 5):
  5032. c:\> alias calc `echo The answer is: %@eval[%&]`
  5033. The following batch file uses variable functions to implement "once a day"
  5034. execution of a group of commands. It works by constructing a 6-digit
  5035. number "yymmdd" from today's date, and comparing that to a number of the
  5036. same type stored in the file C:\ONCEADAY.DAT. If today's date is
  5037. numerically larger than the saved date, and the time is after 6:00 AM, then
  5038. the "once a day" commands are run, and today's date is saved in the file as
  5039. the new date for comparison. Otherwise, no action is taken. You can make
  5040. this file simpler using the %250@DATE and %322@TIME functions instead
  5041. of using %291@INSTR to extract substrings of the %189_DATE and
  5042. %219_TIME variables; we used the approach shown to demonstrate the use
  5043. of %@INSTR.
  5044. rem Temporary variables used to shorten example lines:
  5045. rem DD is _date, DY is yymmdd date, TM is _time
  5046. set dd=%_date
  5047. set dy=%@instr[6,2,%dd]%@instr[0,2,%dd]%@instr[3,2,%dd]
  5048. set lastdate=0
  5049. iff exist c:\onceaday.dat then
  5050. set lastdate=%@line[onceaday.dat,0]
  5051. endiff
  5052. iff %dy gt %lastdate then
  5053. set tm=%_time
  5054. iff "%@instr[0,2,%tm]%@instr[3,2,%tm]" gt "0600" then
  5055. rem Commands to be executed once a day go here
  5056. echo %dy > c:\onceaday.dat
  5057. endiff
  5058. endiff
  5059. ;---------------------------------------------------------------------------
  5060. !TOPIC 241 Variable Functions
  5061. !NOINDEX
  5062. Variable functions are like 161internal variables, but they take one or
  5063. more arguments (which can be environment variables or even other variable
  5064. functions) and they return a value.
  5065. There are two general types of variable functions, pre-defined variable
  5066. functions and user-defined ones.
  5067. The list below gives a one-line description of each pre-defined function,
  5068. and a cross-reference which selects a full screen help topic on that
  5069. function. A few of the variables are simple enough that the one-line
  5070. description is sufficient, but in most cases you should check for any
  5071. additional information in the cross-reference topic if you are not
  5072. already familiar with a function. You can also obtain help on any
  5073. function with a HELP @functionname command at the prompt.
  5074. See the discussion after the function list for some additional
  5075. information, and examples of how these functions can be used. For
  5076. a more comprehensive set of examples see the EXAMPLES.BTM file which
  5077. came with 4DOS.
  5078. For information on how to set up user-defined variable functions, refer
  5079. to the description of the 696FUNCTION and 699UNFUNCTION commands.
  5080. Note: The functions marked with an exclamation mark [!] are 4DOS-specific;
  5081. they are not present in 0204NT. Take this into account when writing
  5082. portable batch files.
  5083. The pre-defined variable functions are grouped by category:
  5084. System status
  5085. 258@DOSMEM[b|k|m] ! Free DOS memory
  5086. 262@EMS[b|k|m] ! Free EMS memory
  5087. 268@EXTENDED[b|k|m] ! Free extended memory
  5088. 304@MASTER[varname] Value from master environment
  5089. 310@READSCR[row,col,len] Character from the screen
  5090. 331@XMS[b|k|m] ! Free XMS memory
  5091. Drives and devices
  5092. @CDROM[d:] "0" in vDosPlus
  5093. 809@CLUSTSIZE[d:] ! Cluster size
  5094. @CODEPAGE[name] "0" in vDosPlus
  5095. 826@COM[n] ! Serial port ready status (0 or 1)
  5096. 359@CWD[d:] Current directory of specified drive
  5097. 360@CWDS[d:] Current directory with trailing \
  5098. 254@DEVICE[name] Character device detection
  5099. 255@DISKFREE[d:,b|k|m|g] Free disk space
  5100. 256@DISKTOTAL[d:,b|k|m|g] Total disk space
  5101. 257@DISKUSED[d:,b|k|m|g] Used disk space
  5102. 727@DRIVETYPE[d:] Type of drive (hard/remote drive, etc.)
  5103. @HDDSIZE[d:,b|k|m|g] "0" in vDosPlus
  5104. 293@LABEL[d:] Volume label
  5105. @LPT[n] "1" in vDosPlus
  5106. 311@READY[d:] Drive ready status (0 or 1)
  5107. 312@REMOTE[d:] Remote drive detection (0 or 1)
  5108. 313@REMOVABLE[d:] Removable drive detection (0 or 1)
  5109. 358@SERIAL[d:] Volume serial number
  5110. Files
  5111. 244@ATTRIB[filename,[nrhsad]] File attribute test (0 or 1)
  5112. 728@COMPARE[filename1,filename2] Compare two files
  5113. 346@CRC32[filename] CRC32 of a file
  5114. 253@DESCRIPT[filename] File description
  5115. 269@FILEAGE[filename[,acw]] File age (date and time)
  5116. 270@FILECLOSE[n] Close a file
  5117. 271@FILEDATE[filename[,[acw][,n]]] File date
  5118. 273@FILEOPEN[filename,mode] Open a file
  5119. 274@FILEREAD[n[,length]] Read line or bytes from a file
  5120. 478@FILEREADB[n,length] Read bytes from a file
  5121. 275@FILES[filename[,-nrhsad]] Count files matching a wildcard
  5122. 276@FILESEEK[n,offset,start] Move file pointer to an offset
  5123. 277@FILESEEKL[n,line] Move file pointer to a line number
  5124. 278@FILESIZE[filename,b|k|m|g] Size of files matching a wildcard
  5125. 279@FILETIME[filename[,[acw][,s]]] File time
  5126. 280@FILEWRITE[n,text] Write next line to a file
  5127. 281@FILEWRITEB[n,length,string] Write bytes to a file
  5128. 282@FINDCLOSE[filename] Close search handle
  5129. 283@FINDFIRST[filename[,-nrhsad]] Find first matching file
  5130. 284@FINDNEXT[filename[,-nrhsad]] Find next matching file
  5131. 297@LINE[filename,n] Read the specified line from a file
  5132. 298@LINES[filename] Count lines in a file
  5133. 402@MD5[filename] MD5 hash of a file
  5134. 317@SEARCH[filename] Path search
  5135. 403@SHA1[filename] SHA1 hash of a file
  5136. 325@TRUENAME[filename] True name of a file
  5137. 408@TRUNCATE[n] Truncate file at current position
  5138. 326@UNIQUE[d:\path] Create file with unique name
  5139. File names
  5140. 334@ALTNAME[filename] FAT filename
  5141. 266@EXPAND[filename,[nrhsad]] Wildcard expansion
  5142. 267@EXT[filename] File extension
  5143. 272@FILENAME[filename] File name and extension
  5144. 286@FULL[filename] Full file name with path
  5145. 296@LFN[filename] Long path and filename
  5146. 306@NAME[filename] File name without path or extension
  5147. 308@PATH[filename] File path without name
  5148. 503@QUOTE[filename] Double quote a filename
  5149. 319@SFN[filename] Short path and filename
  5150. 504@UNQUOTE[filename] Remove double quotes from a filename
  5151. 723@UNQUOTES[string] Remove leading & trailing double quotes
  5152. Strings and characters
  5153. 243@ASCII[c] Numeric ASCII value(s) for string
  5154. 345@CAPS["sep",c] Capitalize first letter of words
  5155. 246@CHAR[n] Character(s) for numeric ASCII
  5156. 507@COUNT[c,string] Occurrences of a character in a string
  5157. 347@FIELD[["sep",]n,string] Returns a field from a string
  5158. 449@FIELDS[["sep",]string] Counts number of fields in a string
  5159. 285@FORMAT[[-][x][.y],string] Formats (justifies) a string
  5160. 289@INDEX[string1,string2[,n]] Position of one string in another
  5161. 290@INSERT[n,string1,string2] Insert one string into another
  5162. 291@INSTR[start,length,string] Extract a substring
  5163. 508@ISALNUM[string] Test for alphanumeric characters
  5164. 509@ISALPHA[string] Test for alphabetic characters
  5165. 510@ISASCII[string] Test for ASCII characters
  5166. 528@ISCNTRL[string] Test for control characters
  5167. 529@ISDIGIT[string] Test for decimal digits
  5168. 828@ISLOWER[string] Test for lower-case letters
  5169. 530@ISPRINT[string] Test for printable characters
  5170. 558@ISPUNCT[string] Test for punctuation characters
  5171. 559@ISSPACE[string] Test for white space characters
  5172. 829@ISUPPER[string] Test for upper-case letters
  5173. 560@ISXDIGIT[string] Test for hexadecimal digits
  5174. 730@LCS[str1,str2] Longest Common Subsequence in strings
  5175. 294@LEFT[n,string] Leftmost characters of a string
  5176. 295@LEN[string] Length of a string
  5177. 299@LOWER[string] Convert string to lower case
  5178. 406@LTRIM[chars,string] Trims specified leading characters
  5179. 314@REPEAT[c,n] Repeat a character
  5180. 315@REPLACE[str1,str2,str3] Replace within a string
  5181. 729@REVERSE[string] Reverse a string
  5182. 316@RIGHT[n,string] Rightmost characters of a string
  5183. 407@RTRIM[chars,string] Trims specified trailing characters
  5184. 733@SIMILAR[str1,str2] Similarity (0 - 100%) between 2 strings
  5185. 320@STRIP[chars,string] Strip characters from a string
  5186. 722@SUBST[n,str1,str2] Substitute a string in another string
  5187. 321@SUBSTR[string,start,length] Extract a substring
  5188. 324@TRIM[string] Remove blanks from a string
  5189. 327@UPPER[string] Convert string to upper case
  5190. 328@WILD[str1,str2] Wildcard comparison
  5191. 329@WORD[["sep",]n,string] Extract a word from a string
  5192. 330@WORDS[["sep",]string] Counts number of words in a string
  5193. Numbers and arithmetic
  5194. 333@ABS[n] Absolute value of a number
  5195. 452@AVERAGE[a,b,...] Average of a list of integers
  5196. 725@CEILING[n] Smallest integer not less than n
  5197. 248@COMMA[n] Inserts commas in a number
  5198. 249@CONVERT[in,out,value] Base conversion
  5199. 252@DEC[expression] Decrements an expression
  5200. 336@DECIMAL[n] Decimal portion of a number
  5201. 337@DIGITS[string] Test if a string is only digits
  5202. 263@EVAL[expression] Arithmetic calculations
  5203. 726@FLOOR[n] Largest integer not larger than n
  5204. 288@INC[expression] Increments an expression
  5205. 292@INT[n] Integer part of a number
  5206. 342@MAX[a,b,...] Largest integer in list
  5207. 343@MIN[a,b,...] Smallest integer in list
  5208. 307@NUMERIC[string] Test if a string is numeric
  5209. 309@RANDOM[min,max] Generate a random integer
  5210. Dates and times
  5211. 401@AGEDATE[n[,format]] Converts an age into date and time
  5212. 250@DATE[date] Convert date to number of days
  5213. 717@DATECONV[date[,format]] Convert date from one format to another
  5214. 251@DAY[date] Day of the month
  5215. 259@DOW[date] Day of the week
  5216. 338@DOWF[date] Day of the week (full name)
  5217. 260@DOWI[date] Numeric day of the week (Sun = 1, etc.)
  5218. 261@DOY[date] Numeric day of the year
  5219. 458@ISODOWI[date] ! Numeric day of the week (Mon = 1, etc.)
  5220. 459@ISOWEEK[date] ! Week of the year pursuant to ISO 8601
  5221. 721@ISOWYEAR[date] ! ISO 8601 week date year
  5222. 301@MAKEAGE[date[,time]] Convert date/time to file date/time
  5223. 302@MAKEDATE[n[,format]] Convert number of days to date
  5224. 303@MAKETIME[n] Convert number of seconds to time
  5225. 305@MONTH[date] Month of the year
  5226. 369@MONTHF[date] ! Month of the year (full name)
  5227. 322@TIME[time] Convert time to number of seconds
  5228. 332@YEAR[date] Year number
  5229. Utility
  5230. 242@ALIAS[name] Value of an alias
  5231. 247@CLIP[n] Line from the clipboard
  5232. 335@CLIPW[n] Write line to clipboard
  5233. 734@DIRSTACK[n] Display directory stack entry
  5234. 339@ERRTEXT[n] DOS error text for specified code
  5235. 264@EXEC[command] Execute a command
  5236. 265@EXECSTR[command] Execute, return string
  5237. 348@FUNCTION[name] Value of a user-defined function
  5238. 718@HISTORY[x[,y]] A line or word from the command history
  5239. 287@IF[condition,true,false] Evaluates a test condition
  5240. 340@INIREAD[file,sect,key] Read from .INI file
  5241. 341@INIWRITE[file,sect,key,val] Write to .INI file
  5242. 318@SELECT[file,t,l,b,r,title] Menu selection
  5243. 323@TIMER[n] Elapsed time of specified timer
  5244. Additional Notes
  5245. Like all environment variables, these variable functions must be preceded
  5246. by a percent sign in normal use (%@EVAL, %@LEN, etc.). All variable
  5247. functions must have square brackets enclosing their argument(s). The
  5248. argument(s) to a variable function cannot exceed 255 characters in length
  5249. for all arguments taken as a group.
  5250. Specific Functions and Arguments
  5251. Some variable functions, like 255@DISKFREE, are shown with "b|k|m|g" as
  5252. one of their arguments. Those functions return a number of bytes, kilobytes,
  5253. megabytes or gigabytes based on the "b|k|m|g" argument:
  5254. b return the number of bytes
  5255. K return the number of kilobytes (bytes / 1,024)
  5256. k return the number of thousands of bytes (bytes / 1,000)
  5257. M return the number of megabytes (bytes / 1,048,576)
  5258. m return the number of millions of bytes (bytes / 1,000,000)
  5259. G return the number of gigabytes (bytes / 1,073,741,824)
  5260. g return the number of billions of bytes (bytes / 1,000,000,000)
  5261. You can include commas (or the "thousands separator" character for your
  5262. system) in the results from a "b|k|m|g" function by appending a "c" to
  5263. the argument. For example, to add commas to a "b" or number of bytes
  5264. result, enter "bc" as the argument. To set the thousands separator, see
  5265. the 445ThousandsChar directive.
  5266. Several functions return filenames or parts of filenames. It is possible,
  5267. and on LFN drives very likely, that the strings returned by these functions
  5268. may contain whitespace or other special characters. To avoid problems which
  5269. could be caused by these characters, quote the returned name before you pass
  5270. it to other commands, for example (either of these methods would work):
  5271. set fname="%@findfirst[pro*.*]"
  5272. echo First PRO file contains:
  5273. type %fname
  5274. .....
  5275. set fname=%@findfirst[pro*.*]
  5276. echo First PRO file contains:
  5277. type "%fname"
  5278. .....
  5279. If you don't use the quotes in the 663SET or 677TYPE command in this
  5280. example, TYPE will not interpret any whitespace or special characters in
  5281. the name properly.
  5282. In variable functions which take a drive letter as an argument, like
  5283. 255@DISKFREE or 311@READY, the drive letter must be followed by a
  5284. colon. The function will not work properly if you use the drive letter
  5285. without the colon.
  5286. The 274@FILEREAD, 478@FILEREADB, 280@FILEWRITE, 281@FILEWRITEB,
  5287. 276@FILESEEK, 277@FILESEEKL, 408@TRUNCATE and 270@FILECLOSE
  5288. functions allow you to access files based on their file handle. These
  5289. functions should only be used with file handles returned by 273@FILEOPEN!
  5290. If you use them with any other file handle you may damage other files opened
  5291. by 4DOS (or, in a secondary shell, the program which started 4DOS), or hang
  5292. your system.
  5293. Many functions return values based on information provided by your operating
  5294. system. Such functions will only return correct information if the operating
  5295. system provides it. For example, 311@READY will not return accurate
  5296. results if your operating system does not provide correct disk drive status
  5297. information to 4DOS.
  5298. See also some 350examples of functions used at the prompt, in aliases
  5299. and batch files.
  5300. ;---------------------------------------------------------------------------
  5301. !TOPIC 344 Date Formats
  5302. !NOINDEX
  5303. Variable function date arguments use the date format and separators
  5304. mandated by your country code (for example dd.mm.yy in Germany, or
  5305. yy-mm-dd in Japan). The year can be entered as a 4-digit or 2-digit
  5306. value. Two-digit years between 80 and 99 are interpreted as 1980 -
  5307. 1999; values between 00 and 79 are interpreted as 2000 - 2079.
  5308. If the date begins with a four digit year greater than 1900, it is
  5309. assumed to be in the ISO 8601 international format yyyy-mm-dd. If the
  5310. date contains the letter "W", it is assumed to be in the ISO 8601 week date
  5311. format yyyy-Www-d, where yyyy = year, ww = week, d = week day. If the
  5312. date is entered as two numbers in the format yyyy-ddd, it is assumed to be
  5313. in the ISO 8601 ordinal date format, where yyyy = year, ddd = day of the
  5314. year.
  5315. ;---------------------------------------------------------------------------
  5316. !TOPIC 242 @ALIAS
  5317. !NOINDEX
  5318. !TTY
  5319. @ALIAS[name]: Returns the contents of the specified alias as a string,
  5320. or a null string if the alias doesn't exist. When manipulating strings
  5321. returned by @ALIAS you may need to disable certain special characters with
  5322. the 664SETDOS /X command. Otherwise, command separators, redirection
  5323. characters, and other similar "punctuation" in the alias may be interpreted
  5324. as part of the current command, rather than part of a simple text string.
  5325. ;---------------------------------------------------------------------------
  5326. !TOPIC 333 @ABS
  5327. !NOINDEX
  5328. !TTY
  5329. @ABS[n]: Returns the absolute value of the number.
  5330. ;---------------------------------------------------------------------------
  5331. !TOPIC 401 @AGEDATE
  5332. !NOINDEX
  5333. !TTY
  5334. @AGEDATE[n[,format]]: Converts n (an age) into a date and time pair
  5335. (formatted according to the current country settings). Time is separated
  5336. from date by a comma, and is always in 24-hour format. n is the file date
  5337. and time (age), as returned by 269@FILEAGE and 301@MAKEAGE. @AGEDATE
  5338. takes an optional second argument for the date format:
  5339. 0 - system default format
  5340. 1 - U.S. format (mm-dd-yy)
  5341. 2 - European format (dd-mm-yy)
  5342. 3 - Japanese format (yy-mm-dd)
  5343. 4 - ISO 8601 international format (yyyy-mm-dd)
  5344. 5 - ISO 8601 international format (yyyy-Www-d) week date
  5345. 6 - ISO 8601 international format (yyyy-ddd) ordinal date
  5346. The separator used in the return string depends on the current country
  5347. settings of the system, except for in the ISO 8601 international format,
  5348. where it will always by a hyphen ('-') as per spec.
  5349. ;---------------------------------------------------------------------------
  5350. !TOPIC 334 @ALTNAME
  5351. !NOINDEX
  5352. !TTY
  5353. @ALTNAME[filename]: Returns the alternate (short, "8.3" FAT-format) name
  5354. for the specified file. If the filename is already in 8.3 format, or if it
  5355. does not exist, returns the filename as entered. @ALTNAME will also return
  5356. the shortened pathname if you provide a path in place of the filename. The
  5357. filename must be in quotes if it contains whitespace or special characters.
  5358. ;---------------------------------------------------------------------------
  5359. !TOPIC 243 @ASCII
  5360. !NOINDEX
  5361. !TTY
  5362. @ASCII[c]: Returns the numeric value of the specified ASCII character or
  5363. string as a string. For example %@ASCII[A] returns 65. You can put an
  5364. escape character [] before the actual character to process. This
  5365. allows quotes and other special characters as the argument (e.g.,
  5366. %@ASCII[`]). If the argument is a string, @ASCII returns a space
  5367. delimited string with the ASCII values of each character.
  5368. ;---------------------------------------------------------------------------
  5369. !TOPIC 244 @ATTRIB
  5370. !NOINDEX
  5371. !TTY
  5372. @ATTRIB[filename[,-nrhsad[,p]]]: Returns a "1" if the specified file has
  5373. the matching attribute(s); otherwise returns a "0". The attributes are:
  5374. N Normal (no attributes set) S System
  5375. R Read-only A Archive
  5376. H Hidden D subDirectory
  5377. The attributes (other than N) can be combined (for example
  5378. %@ATTRIB[MYFILE,HS]). You can prefix an attribute with - to mean
  5379. "everything except files with this attribute."
  5380. Without the optional p as a third argument, ATTRIB will only return a 1
  5381. if all of the attributes match. With the p, ATTRIB will return a 1 if
  5382. there is a partial match. For example, if MYFILE.DAT has R, H, and A
  5383. attributes set:
  5384. %@attrib[myfile.dat,r] returns 0 because there is not an exact match
  5385. %@attrib[myfile.dat,r,p] returns 1 because there is a partial match
  5386. If you do not specify any attributes, @ATTRIB will return the attributes of
  5387. the specified file in the format RHSAD, rather than a "0" or
  5388. "1". Attributes which are not set will be replaced with an underscore. For
  5389. example, if SECURE.DAT has the read-only, hidden, and archive attributes
  5390. set, %@ATTRIB[SECURE.DAT] would return "RH_A_" (without the quotes).
  5391. ;---------------------------------------------------------------------------
  5392. !TOPIC 452 @AVERAGE
  5393. !NOINDEX
  5394. !TTY
  5395. @AVERAGE[a,b,c,...]: Returns the average of a list of integer numbers.
  5396. ;---------------------------------------------------------------------------
  5397. !TOPIC 345 @CAPS
  5398. !NOINDEX
  5399. !TTY
  5400. @CAPS["sep",string]: Capitalizes the first letter of each word in the
  5401. string. Word delimiters are defined by the first argument, which must
  5402. be enclosed in double quotes.
  5403. ;---------------------------------------------------------------------------
  5404. !TOPIC 725 @CEILING
  5405. !NOINDEX
  5406. !TTY
  5407. @CEILING[n]: Returns the value of the smallest integer that is not less
  5408. than n.
  5409. ;---------------------------------------------------------------------------
  5410. !TOPIC 246 @CHAR
  5411. !NOINDEX
  5412. !TTY
  5413. @CHAR[n]: Returns the character(s) corresponding to an ASCII numeric
  5414. value. For example %@CHAR[65] returns A. %@CHAR[65 66 67] returns ABC.
  5415. The ASCII code of each byte may be entered in either decimal (1 to 3 decimal
  5416. digits 0-9), or hexadecimal format ("0x" followed by 1 or 2 hex digits 0-F).
  5417. ;---------------------------------------------------------------------------
  5418. !TOPIC 507 @COUNT
  5419. !NOINDEX
  5420. !TTY
  5421. @COUNT[c,string]: Returns the number of times the character c appears in
  5422. string.
  5423. ;---------------------------------------------------------------------------
  5424. !TOPIC 247 @CLIP
  5425. !NOINDEX
  5426. !TTY
  5427. @CLIP[n]: Returns line n from the clipboard. The first line is
  5428. numbered 0. "**EOC**" is returned for all line numbers beyond the end of
  5429. the clipboard.
  5430. ;---------------------------------------------------------------------------
  5431. !TOPIC 335 @CLIPW
  5432. !NOINDEX
  5433. !TTY
  5434. @CLIPW[string]: Writes a string to the clipboard.
  5435. ;---------------------------------------------------------------------------
  5436. !TOPIC 809 @CLUSTSIZE
  5437. !NOINDEX
  5438. !TTY
  5439. @CLUSTSIZE[d:]: Returns the size in bytes of a cluster of the specified
  5440. drive.
  5441. ;---------------------------------------------------------------------------
  5442. !TOPIC 826 @COM
  5443. !NOINDEX
  5444. !TTY
  5445. @COM[n]: Returns a "1" if the specified serial port is ready; otherwise,
  5446. returns "0". n=1 checks COM1, n=2 checks COM2, n=3 checks COM3, and
  5447. n=4 checks COM4.
  5448. The value returned from @COM reflects the status of the Data Set Ready (DSR)
  5449. line, which depends also on the cable and the device connected to its other
  5450. end. You may need to check both for troubleshooting eventual problems.
  5451. ;---------------------------------------------------------------------------
  5452. !TOPIC 248 @COMMA
  5453. !NOINDEX
  5454. !TTY
  5455. @COMMA[n]: Inserts commas, or the "thousands separator" character for
  5456. your system, into a numeric string. To set the thousands separator see the
  5457. 445ThousandsChar directive.
  5458. See also the 285@FORMAT function, which can be useful for aligning or
  5459. zero-padding numbers.
  5460. NOTE: If the 823NO_SEP environment variable is set, @COMMA has no
  5461. effect.
  5462. ;---------------------------------------------------------------------------
  5463. !TOPIC 728 @COMPARE
  5464. !NOINDEX
  5465. !TTY
  5466. @COMPARE[filename1,filename2]: Returns 1 if the two files are identical,
  5467. or 0 if they differ.
  5468. ;---------------------------------------------------------------------------
  5469. !TOPIC 249 @CONVERT
  5470. !NOINDEX
  5471. !TTY
  5472. @CONVERT[input, output, value]: Converts a numeric string (value) from
  5473. one number base (input) to another (output). Valid bases range from 2
  5474. to 36. The value must be a positive number between 0 and 2**32-1
  5475. (4,294,967,295). No error is returned if value is outside that range.
  5476. For example, to convert "1010101" from binary to decimal, use this syntax:
  5477. %@convert[2,10,1010101]
  5478. ;---------------------------------------------------------------------------
  5479. !TOPIC 346 @CRC32
  5480. !NOINDEX
  5481. !TTY
  5482. @CRC32[filename]: Returns the CRC32 for the specified file, or "-1" if the
  5483. file doesn't exist.
  5484. ;---------------------------------------------------------------------------
  5485. !TOPIC 359 @CWD
  5486. !NOINDEX
  5487. !TTY
  5488. @CWD[d:]: Returns the Current Working Directory of the specified drive,
  5489. in the format "d:\pathname".
  5490. ;---------------------------------------------------------------------------
  5491. !TOPIC 360 @CWDS
  5492. !NOINDEX
  5493. !TTY
  5494. @CWDS[d:]: Returns the Current Working Directory of the specified drive,
  5495. in the format "d:\pathname\".
  5496. ;---------------------------------------------------------------------------
  5497. !TOPIC 250 @DATE
  5498. !NOINDEX
  5499. !TTY
  5500. @DATE[date]: Returns the number of days since January 1, 1980 for
  5501. the specified date. The date may be in either the local date format, or
  5502. in ISO format with a four-digit year; see 344date formats for more
  5503. information.
  5504. ;---------------------------------------------------------------------------
  5505. !TOPIC 717 @DATECONV
  5506. !NOINDEX
  5507. !TTY
  5508. @DATECONV[date[,format]]: Converts a date from one format to another. The
  5509. input date may be in either the local date format, or in ISO format with a
  5510. four-digit year; see 344date formats for more information. By default, the
  5511. output date is formatted according to the current country settings, but
  5512. @DATECONV takes an optional second argument for the output date format:
  5513. 0 - system default format
  5514. 1 - U.S. format (mm-dd-yy)
  5515. 2 - European format (dd-mm-yy)
  5516. 3 - Japanese format (yy-mm-dd)
  5517. 4 - ISO 8601 international format (yyyy-mm-dd)
  5518. 5 - ISO 8601 international format (yyyy-Www-d) week date
  5519. 6 - ISO 8601 international format (yyyy-ddd) ordinal date
  5520. The separator used in the return string depends on the current country
  5521. settings of the system, except for in the ISO 8601 international format,
  5522. where it will always by a hyphen ('-') as per spec.
  5523. ;---------------------------------------------------------------------------
  5524. !TOPIC 251 @DAY
  5525. !NOINDEX
  5526. !TTY
  5527. @DAY[date]: Returns the numeric day of the month for the specified
  5528. date. The date may be in either the local date format, or in ISO format
  5529. with a four-digit year; see 344date formats for more information.
  5530. ;---------------------------------------------------------------------------
  5531. !TOPIC 252 @DEC
  5532. !NOINDEX
  5533. !TTY
  5534. @DEC[expression]: Returns the same value as
  5535. 263@EVAL[(expression) - 1]. That is, it subtracts one from the value of
  5536. the expression. Note that the function returns a value that has been
  5537. decremented; any variable used in the expression will not be changed. To
  5538. decrement the value of a variable, use a command like this:
  5539. set var=%@dec[%var]
  5540. See also 288@INC.
  5541. ;---------------------------------------------------------------------------
  5542. !TOPIC 336 @DECIMAL
  5543. !NOINDEX
  5544. !TTY
  5545. @DECIMAL[n]: Returns the decimal portion of the number.
  5546. ;---------------------------------------------------------------------------
  5547. !TOPIC 253 @DESCRIPT
  5548. !NOINDEX
  5549. !TTY
  5550. @DESCRIPT[filename]: Returns the file description for the specified
  5551. filename (see 611DESCRIBE).
  5552. ;---------------------------------------------------------------------------
  5553. !TOPIC 254 @DEVICE
  5554. !NOINDEX
  5555. !TTY
  5556. @DEVICE[name]: Returns "1" if the name is a character device
  5557. (such as a printer or serial port), or "0" if not.
  5558. ;---------------------------------------------------------------------------
  5559. !TOPIC 337 @DIGITS
  5560. !NOINDEX
  5561. !TTY
  5562. @DIGITS[n]: Returns 1 if the string is digits only (no decimal
  5563. point, sign character, or thousands separator).
  5564. ;---------------------------------------------------------------------------
  5565. !TOPIC 734 @DIRSTACK
  5566. !NOINDEX
  5567. !TTY
  5568. @DIRSTACK[n]: Returns the name of the nth entry in the directory stack.
  5569. The oldest is number 0. If no n parameter is specified, returns the total
  5570. number of entries in the stack. The directory stack is set by calls to
  5571. 653PUSHD / 651POPD.
  5572. ;---------------------------------------------------------------------------
  5573. !TOPIC 255 @DISKFREE
  5574. !NOINDEX
  5575. !TTY
  5576. @DISKFREE[d:,b|k|m|g]: Returns the amount of free disk space on the
  5577. specified drive. DOS networks with large server disk drives (over 2 GB) may
  5578. report disk space values that are too small when @DISKFREE is used. If this
  5579. occurs, it is because the network software does not report the proper values
  5580. to 4DOS.
  5581. ;---------------------------------------------------------------------------
  5582. !TOPIC 256 @DISKTOTAL
  5583. !NOINDEX
  5584. !TTY
  5585. @DISKTOTAL[d:,b|k|m|g]: Returns the total disk space on the specified
  5586. drive. DOS networks with large server disk drives (over 2 GB) may
  5587. report disk space values that are too small when @DISKTOTAL is used. If this
  5588. occurs, it is because the network software does not report the proper values
  5589. to 4DOS.
  5590. ;---------------------------------------------------------------------------
  5591. !TOPIC 257 @DISKUSED
  5592. !NOINDEX
  5593. !TTY
  5594. @DISKUSED[d:,b|k|m|g]: Returns the amount of disk space in use by files
  5595. and directories on the specified drive. DOS networks with large server disk
  5596. drives (over 2 GB) may report disk space values that are too small when
  5597. @DISKUSED is used. If this occurs, it is because the network software does
  5598. not report the proper values to 4DOS.
  5599. ;---------------------------------------------------------------------------
  5600. !TOPIC 258 @DOSMEM
  5601. !NOINDEX
  5602. !TTY
  5603. @DOSMEM[b|k|m]: Returns the amount of free base memory.
  5604. ;---------------------------------------------------------------------------
  5605. !TOPIC 259 @DOW
  5606. !NOINDEX
  5607. !TTY
  5608. @DOW[date]: Returns the first three characters of the day of the week
  5609. for the specified date ("Mon", "Tue", "Wed", etc.) The date may be in either
  5610. the local date format, or in ISO format with a four-digit year; see
  5611. 344date formats for more information.
  5612. ;---------------------------------------------------------------------------
  5613. !TOPIC 338 @DOWF
  5614. !NOINDEX
  5615. !TTY
  5616. @DOWF[date]: Returns the day of the week for the specified date ("Monday",
  5617. "Tuesday", "Wednesday", etc.) The date may be in either the local date
  5618. format, or in ISO format with a four-digit year; see 344date formats for
  5619. more information.
  5620. ;---------------------------------------------------------------------------
  5621. !TOPIC 260 @DOWI
  5622. !NOINDEX
  5623. !TTY
  5624. @DOWI[date]: Returns the day of the week for the specified date as an
  5625. integer (1 = Sunday, 2 = Monday, etc). The date may be in either the local
  5626. date format, or in ISO format with a four-digit year; see 344date formats
  5627. for more information.
  5628. ;---------------------------------------------------------------------------
  5629. !TOPIC 261 @DOY
  5630. !NOINDEX
  5631. !TTY
  5632. @DOY[date]: Returns the day of the year for the specified date
  5633. (1-366). The date may be in either the local date format, or in ISO format
  5634. with a four-digit year; see 344date formats for more information.
  5635. ;---------------------------------------------------------------------------
  5636. !TOPIC 727 @DRIVETYPE
  5637. !NOINDEX
  5638. !TTY
  5639. @DRIVETYPE[d:]: Returns the type for the specified drive:
  5640. 0 - The drive type cannot be determined
  5641. 1 - The drive does not exist
  5642. 2 - Removable disk
  5643. 3 - Fixed disk
  5644. 4 - Remote (network) drive
  5645. ;---------------------------------------------------------------------------
  5646. !TOPIC 262 @EMS
  5647. !NOINDEX
  5648. !TTY
  5649. @EMS[b|k|m]: Returns the amount of free EMS memory.
  5650. ;---------------------------------------------------------------------------
  5651. !TOPIC 339 @ERRTEXT
  5652. !NOINDEX
  5653. !TTY
  5654. @ERRTEXT[n]: Returns the DOS error text for the specified code.
  5655. ;---------------------------------------------------------------------------
  5656. !TOPIC 263 @EVAL
  5657. !NOINDEX
  5658. !TTY
  5659. @EVAL[expression]: Evaluates an arithmetic expression. The expression
  5660. can contain environment variables and other variable functions, and may
  5661. use any of the operators listed below. @EVAL also supports parentheses,
  5662. commas, and decimals. Parentheses can be nested. @EVAL will strip
  5663. leading and trailing zeros from the result. The valid operators are:
  5664. +/- (with one value) numeric sign (e.g. -1, +3)
  5665. + (with two values) addition
  5666. - (with two values) subtraction
  5667. * multiplication
  5668. / division
  5669. \ integer division (the integer part of the quotient)
  5670. MOD modulo (the remainder when the first value is divided
  5671. by the second)
  5672. %% same as MOD
  5673. ** exponentiation (the exponent must be a non-negative
  5674. decimal integer)
  5675. AND bitwise and (returns a 1 for each bit where the
  5676. corresponding bits in both values are 1)
  5677. & same as AND
  5678. OR bitwise or (returns a 1 for each bit where the
  5679. corresponding bit in either value is 1)
  5680. | same as OR
  5681. XOR bitwise exclusive or (returns a 1 for each bit where
  5682. the corresponding bit in one value is 1, and in the other
  5683. value is 0)
  5684. ^ same as XOR
  5685. The order of precedence from highest to lowest is:
  5686. Parentheses
  5687. Unary + and -
  5688. **
  5689. *, /, \, MOD
  5690. +, -
  5691. AND, OR, XOR
  5692. For example, 3 + 4 * 2 will be interpreted as 3 + 8, not as 7 * 2. To
  5693. change this order of evaluation, use parentheses to specify the order you
  5694. want.
  5695. To ensure that your @EVAL expressions are interpreted correctly, spaces
  5696. should be placed on both sides of each operator, for example:
  5697. %@eval[(20 %% 3) + 4]
  5698. You can enter hexadecimal numbers up to 8 digits long by preceding
  5699. the number with 0x. For example:
  5700. c:\> echo %@eval[0x10 + 0x10]
  5701. 32
  5702. c:\> echo %@convert[10, 16, %@eval[0x10 + 0x10]]
  5703. 20
  5704. You can specify hexadecimal output with the special syntax
  5705. @eval[...=H], in which case a leading 0x is not included in the output,
  5706. or @eval[...=X], in which case a leading 0x is included in the output.
  5707. For example:
  5708. c:\> echo %@eval[3*6=H]
  5709. 12
  5710. The default is decimal output. To convert between decimal and hexadecimal
  5711. formats, see the 249@CONVERT function.
  5712. The maximum precision is 20 digits to the left of the decimal point and
  5713. 10 digits to the right of the decimal point. You can alter the default
  5714. precision on the Options 2 page of the 648OPTION dialogs, or with the
  5715. 427EvalMax and 428EvalMin directives in 4DOS.INI, and with the
  5716. 664SETDOS /F command. You can alter the decimal character from the
  5717. Options 1 page of the OPTION dialogs, with the 421DecimalChar directive,
  5718. or the SETDOS /G command.
  5719. You can alter the precision for a single evaluation with the construct
  5720. @EVAL[expression=x.y]. The x value specifies the minimum decimal precision
  5721. (i.e., the minimum number of decimal places displayed); the y value sets the
  5722. maximum decimal precision. You can use =x,y instead of =x.y if the comma
  5723. is your decimal separator. You can specify either or both values.
  5724. If x is greater than y, it is ignored; if only x is specified, y is
  5725. set to the same value (e.g. =2 is equivalent to =2.2). For
  5726. example:
  5727. @eval[3 / 6=2.4] returns 0.50
  5728. @eval[3 / 6=4.4] returns 0.5000
  5729. @eval[3 / 7] returns 0.4285714286
  5730. @eval[3 / 7=.4] returns 0.4286
  5731. @eval[3 / 7=2.2] returns 0.43
  5732. @eval[3 / 7=2] also returns 0.43
  5733. Also see 252@DEC and 288@INC.
  5734. ;---------------------------------------------------------------------------
  5735. !TOPIC 264 @EXEC
  5736. !NOINDEX
  5737. !TTY
  5738. @EXEC[[@]command]: Execute the command. The command can be an alias,
  5739. internal command, external command, .BTM file, .BAT file, .CMD file.
  5740. @EXEC is primarily intended for running a program from within the
  5741. PROMPT. It is a "back-door" entry into command processing and should
  5742. be used with extreme caution. Incorrect or recursive use of @EXEC may
  5743. cause stack overflows or hang your system. While you may be able to use
  5744. complex commands involving pipes, command groups, etc. as its argument, you
  5745. should test carefully first as the results may not be what you expect. We
  5746. recommend that you only use a single command as the argument to @EXEC.
  5747. By default, @EXEC returns the result code from the command; if you
  5748. preface the command name with an '@' then @EXEC will return an empty
  5749. string.
  5750. ;---------------------------------------------------------------------------
  5751. !TOPIC 265 @EXECSTR
  5752. !NOINDEX
  5753. !TTY
  5754. @EXECSTR[command]: Runs the specified command and returns the first line
  5755. written to stdout by that command. @EXECSTR is useful for retrieving a
  5756. result from an external utility. For example, if you have a program called
  5757. NETTIME.EXE which retrieves the time of day from your network server and
  5758. writes it to standard output, you could save it in an environment variable
  5759. using a command like this:
  5760. c:\> set server_time=%@execstr[d:\path\nettime.exe]
  5761. If the same utility returned a result properly formatted for the 672TIME
  5762. command you could also use it to set the time on your system:
  5763. c:\> time %@execstr[d:\path\nettime.exe]
  5764. @EXECSTR is a "back-door" entry into command processing and should
  5765. be used with extreme caution. Incorrect or recursive use of @EXECSTR may
  5766. cause stack overflows or hang your system. While you may be able to use
  5767. complex commands involving pipes, command groups, etc. as its argument, you
  5768. should test carefully first as the results may not be what you expect. We
  5769. recommend that you only use a single command as the argument to @EXECSTR.
  5770. ;---------------------------------------------------------------------------
  5771. !TOPIC 266 @EXPAND
  5772. !NOINDEX
  5773. !TTY
  5774. @EXPAND[filename[,-nrhsad]]: Returns, on a single line, the names of all
  5775. files and directories that match the filename specification, which may
  5776. contain wildcards and include lists. Returns an empty string if no files
  5777. match. If the file list is longer than the allowed command line length, it
  5778. will be truncated without an error message.
  5779. The second argument, if included, defines the attributes of the files that
  5780. will be included in the search. The attributes are:
  5781. N Normal (no attributes set) S System
  5782. R Read-only A Archive
  5783. H Hidden D subDirectory
  5784. The attributes (other than N) can be combined (for example
  5785. %@EXPAND[MYFILE,HS]). You can prefix an attribute with - to mean
  5786. "everything except files with this attribute."
  5787. If the attribute argument is not used, all matching files and directories
  5788. will be returned.
  5789. ;---------------------------------------------------------------------------
  5790. !TOPIC 267 @EXT
  5791. !NOINDEX
  5792. !TTY
  5793. @EXT[filename]: Returns the extension from a filename, without a
  5794. leading period. On LFN drives, the extension can be up to 64 characters
  5795. long. On traditional FAT drives, it can be up to 3 characters long.
  5796. ;---------------------------------------------------------------------------
  5797. !TOPIC 268 @EXTENDED
  5798. !NOINDEX
  5799. !TTY
  5800. @EXTENDED[b|k|m]: Returns the amount of extended memory. Most memory
  5801. managers convert extended memory to XMS and / or EMS memory, and make it
  5802. unavailable as extended memory. Even if so, this function will return the
  5803. correct amount of extended memory for informational purposes.
  5804. ;---------------------------------------------------------------------------
  5805. !TOPIC 347 @FIELD
  5806. !NOINDEX
  5807. !TTY
  5808. @FIELD[["xxx",]n,string]: Returns the nth field in the string. Like
  5809. 329@WORD, except it will not scan past multiple delimiters. The first
  5810. field is numbered 0. If n is negative, fields are returned from the end of
  5811. the string. The first argument is a list of field separators you want to
  5812. use; if you don't specify it, only spaces, tabs, and commas are considered
  5813. to be field separators.
  5814. If you want to use a double quote as a separator, prefix it with an
  5815. 086escape character. If the string argument is enclosed in quotation
  5816. marks, you must enter a list of separators.
  5817. ;---------------------------------------------------------------------------
  5818. !TOPIC 449 @FIELDS
  5819. !NOINDEX
  5820. !TTY
  5821. @FIELDS[["xxx",]string]: Returns the number of fields in the string.
  5822. Like 330@WORDS, except it will not scan past multiple delimiters (it
  5823. counts each occurrence of a separator individually to allow processing empty
  5824. fields in a string). The first argument is a list of field separators you
  5825. want to use; if you don't specify it, only spaces, tabs, and commas are
  5826. considered to be field separators. See also 330@WORDS.
  5827. If you want to use a double quote as a separator, prefix it with an
  5828. 086escape character. If the string argument is enclosed in quotation
  5829. marks, you must enter a list of separators.
  5830. ;---------------------------------------------------------------------------
  5831. !TOPIC 269 @FILEAGE
  5832. !NOINDEX
  5833. !TTY
  5834. @FILEAGE[filename[,acw]]: Returns the date and time of the file as a single
  5835. numeric value. The number can be used to compare the relative ages of two
  5836. or more files, but can not be used for date and time calculations as it is
  5837. not returned in identifiable units.
  5838. The optional second argument selects which date field is returned for files
  5839. on an LFN drive: a means the last access date, c means the creation
  5840. date, and w means the last modification (write) date, which is the default.
  5841. Also see 301@MAKEAGE.
  5842. ;---------------------------------------------------------------------------
  5843. !TOPIC 270 @FILECLOSE
  5844. !NOINDEX
  5845. !TTY
  5846. @FILECLOSE[n]: Closes the file whose handle is n. You cannot
  5847. close handles 0, 1 or 2. Returns "0" if the file closed OK or "-1" if an
  5848. error occurs. Be sure to read the cautionary note about file functions
  5849. under 241Variable Functions.
  5850. ;---------------------------------------------------------------------------
  5851. !TOPIC 271 @FILEDATE
  5852. !NOINDEX
  5853. !TTY
  5854. @FILEDATE[filename[,[acw][,n]]]: Returns the date a file was last
  5855. modified, in the default country format (mm-dd-yy for the US). The optional
  5856. second argument selects which date field is returned for files on an LFN
  5857. drive: a means the last access date, c means the creation date, and w
  5858. means the last modification (write) date, which is the default. @FILEDATE
  5859. also takes an optional third argument for the date format:
  5860. 0 - System default format
  5861. 1 - U.S. format (mm-dd-yy)
  5862. 2 - European format (dd-mm-yy)
  5863. 3 - Japanese format (yy-mm-dd)
  5864. 4 - ISO 8601 international format (yyyy-mm-dd)
  5865. 5 - ISO 8601 international format (yyyy-Www-d) week date
  5866. 6 - ISO 8601 international format (yyyy-ddd) ordinal date
  5867. The separator used in the returned string depends on the current country
  5868. settings of the system, except for in the ISO 8601 international format,
  5869. where it will always by a hyphen ('-') as per spec.
  5870. ;---------------------------------------------------------------------------
  5871. !TOPIC 272 @FILENAME
  5872. !NOINDEX
  5873. !TTY
  5874. @FILETIME[filename[,[acw][,s]]]: Returns the time a file was last
  5875. modified, in hh:mm format. The optional second argument selects
  5876. which time field is returned for files on an LFN drive: a means
  5877. the last access time, c means the creation time, and w means the
  5878. last modification (write) time, which is the default. Times are
  5879. normally returned with hours and minutes only; to retrieve seconds
  5880. as well, add an s as the third argument. The last access time is
  5881. always returned as 00:00, and without a seconds field, on LFN
  5882. drives.
  5883. ;---------------------------------------------------------------------------
  5884. !TOPIC 273 @FILEOPEN
  5885. !NOINDEX
  5886. !TTY
  5887. @FILEOPEN[filename, r | w | a, [b|t]]: Opens the file in the
  5888. specified mode: r(ead), w(rite) or a(ppend), and returns the file handle
  5889. as an integer. Returns "-1" if the file cannot be opened.
  5890. The optional third parameter controls whether the file is opened in binary
  5891. mode (b) or text mode (t). Text mode (the default) should be used to
  5892. read text using 274@FILEREAD without a length parameter, and to
  5893. write text using 280@FILEWRITE. Binary mode should be used to read
  5894. binary data with 478@FILEREADB or @FILEREAD with a length parameter,
  5895. and to write binary data with 281@FILEWRITEB.
  5896. To open a file for both reading and writing, open it in append mode,
  5897. then use 276@FILESEEK to seek to the start of the file (or any
  5898. other desired location) before performing additional operations.
  5899. Be sure to read the cautionary note about file functions under
  5900. 241Variable Functions.
  5901. ;---------------------------------------------------------------------------
  5902. !TOPIC 274 @FILEREAD
  5903. !NOINDEX
  5904. !TTY
  5905. @FILEREAD[n[,length]]: Reads data from the file whose handle is n.
  5906. Returns "**EOF**" if you attempt to read past the end of the file. If
  5907. length is not specified @FILEREAD will read until the next CR or LF (end of
  5908. line) character. If length is specified, @FILEREAD will read length
  5909. bytes regardless of any end of line characters.
  5910. If you plan to read text a line at a time, without using length, you
  5911. should open the file in text mode. If you plan to read binary data using
  5912. length, you should open the file in binary mode. See
  5913. 273@FILEOPEN for details on opening the file in the proper mode.
  5914. Be sure to read the cautionary note about file functions under
  5915. 241Variable Functions.
  5916. ;---------------------------------------------------------------------------
  5917. !TOPIC 478 @FILEREADB
  5918. !NOINDEX
  5919. !TTY
  5920. @FILEREADB[n,length]: Reads length bytes from the file whose handle is
  5921. n. Returns "**EOF**" if you attempt to read past the end of the file.
  5922. The data will be returned as a string of space-separated numeric digits
  5923. representing the ASCII value of each character.
  5924. If you plan to read binary data with @FILEREADB you should open the file
  5925. in binary mode (see 273@FILEOPEN). If you want to read text a line at a
  5926. time you may want to use the 274@FILEREAD function instead, and open the
  5927. file in text mode.
  5928. Be sure to read the cautionary note about file functions under
  5929. 241Variable Functions.
  5930. ;---------------------------------------------------------------------------
  5931. !TOPIC 275 @FILES
  5932. !NOINDEX
  5933. !TTY
  5934. @FILES[filename,[-nrhsad]]: Returns the number of files that
  5935. match the filename, which may contain wildcards and include lists.
  5936. Returns "0" if no files match. The filename must consist of a
  5937. single file or directory name (with wildcards if desired); to check
  5938. several directories or filenames use @FILES once for each, and add
  5939. the results together with 263@EVAL.
  5940. !TTY
  5941. The second argument is a list of file attributes. If it is included, only
  5942. those files matching all the specified attributes are counted. The
  5943. attributes are:
  5944. N Normal (no attributes set) S System
  5945. R Read-only A Archive
  5946. H Hidden D subDirectory
  5947. The attributes (other than N) can be combined (for example
  5948. %@FILES[MYFILE,HS]). You can prefix an attribute with - to mean
  5949. "everything except files with this attribute."
  5950. ;---------------------------------------------------------------------------
  5951. !TOPIC 276 @FILESEEK
  5952. !NOINDEX
  5953. !TTY
  5954. @FILESEEK[n,offset,start]: Moves the file pointer offset bytes in
  5955. the file whose handle is n. Returns the new position of the pointer, in
  5956. bytes from the start of the file. Set start to 0 to seek relative to the
  5957. beginning of the file, 1 to seek relative to the current file pointer, or 2
  5958. to seek relative to the end of the file. The offset value may be negative
  5959. (seek backward), positive (seek forward), or zero (return current position,
  5960. but do not change it). Be sure to read the cautionary note about file
  5961. functions under 241Variable Functions.
  5962. ;---------------------------------------------------------------------------
  5963. !TOPIC 277 @FILESEEKL
  5964. !NOINDEX
  5965. !TTY
  5966. @FILESEEKL[n,line]: Moves the file pointer to the specified line in the
  5967. file whose handle is n. The first line in the file is numbered 0.
  5968. Returns the new position of the pointer, in bytes from the start of the
  5969. file.
  5970. @FILESEEKL must read each line of the file up to the target line in order
  5971. to position the pointer, and will therefore cause significant delays if
  5972. used in a long loop or on a large file.
  5973. Be sure to read the cautionary note about file functions under
  5974. 241Variable Functions.
  5975. ;---------------------------------------------------------------------------
  5976. !TOPIC 278 @FILESIZE
  5977. !NOINDEX
  5978. !TTY
  5979. @FILESIZE[filename,b|k|m|g[,a]]: Returns the size of a file, or "-1" if
  5980. the file does not exist. If the filename includes wildcards or an include
  5981. list, returns the combined size of all matching files.
  5982. The optional third argument a (allocated), if used, instructs @FILESIZE
  5983. to return the amount of space allocated for the file(s) on the disk, rather
  5984. than the amount of data in the file. Network drives and compressed drives
  5985. may not always report allocated sizes accurately, depending on the way the
  5986. network or disk compression software is implemented.
  5987. ;---------------------------------------------------------------------------
  5988. !TOPIC 279 @FILETIME
  5989. !NOINDEX
  5990. !TTY
  5991. @FILETIME[filename[,[acw][,s]]]: Returns the time a file was last
  5992. modified, in hh:mm format. The optional second argument selects
  5993. which time field is returned for files on an LFN drive: a means
  5994. the last access time, c means the creation time, and w means the
  5995. last modification (write) time, which is the default. Times are
  5996. normally returned with hours and minutes only; to retrieve seconds
  5997. as well, add an s as the third argument. The last access time is
  5998. always returned as 00:00, and without a seconds field, on LFN
  5999. drives.
  6000. ;---------------------------------------------------------------------------
  6001. !TOPIC 280 @FILEWRITE
  6002. !NOINDEX
  6003. !TTY
  6004. @FILEWRITE[n,text]: Writes a line to the file whose handle is n. Returns
  6005. the number of bytes written, or "-1" if an error occurred. n must be a
  6006. handle returned by 273FILEOPEN; or 1 (for standard output) or 2 (for
  6007. standard error).
  6008. If you plan to write text a line at a time with @FILEWRITE, you should
  6009. open the file in text mode (see 273@FILEOPEN). If you want to write
  6010. binary data you should use 281@FILEWRITEB instead, and open the file
  6011. in binary mode.
  6012. Be sure to read the cautionary note about file functions under
  6013. 241Variable Functions.
  6014. ;---------------------------------------------------------------------------
  6015. !TOPIC 281 @FILEWRITEB
  6016. !NOINDEX
  6017. !TTY
  6018. @FILEWRITEB[n,length,string]: Writes the specified number of bytes from
  6019. the string to the file whose handle is n. Returns the number of bytes
  6020. written, or "-1" if an error occurred.
  6021. If the length argument is -1, @FILEWRITEB will read the string argument as
  6022. a series of ASCII values to write to the file. For example:
  6023. echo %@filewriteb[%file,-1,224 242 169]
  6024. The ASCII code of each byte may be entered in either decimal (1 to 3 decimal
  6025. digits 0-9), or hexadecimal format ("0x" followed by 1 or 2 hex digits 0-F).
  6026. If you plan to write binary data with @FILEWRITEB you should open the file
  6027. in binary mode (see 273@FILEOPEN). If you want to write text a line at a
  6028. time you may want to use the 280@FILEWRITE function instead, and open the
  6029. file in text mode.
  6030. Be sure to read the cautionary note about file functions under
  6031. 241Variable Functions.
  6032. ;---------------------------------------------------------------------------
  6033. !TOPIC 282 @FINDCLOSE
  6034. !NOINDEX
  6035. !TTY
  6036. @FINDCLOSE[filename]: Signals the end of a 283@FINDFIRST /
  6037. 284@FINDNEXT sequence. When LFN support is available, you must use
  6038. this function to release the directory search handle used for
  6039. @FINDFIRST / @FINDNEXT.
  6040. ;---------------------------------------------------------------------------
  6041. !TOPIC 283 @FINDFIRST
  6042. !NOINDEX
  6043. !TTY
  6044. @FINDFIRST[filename [,-nrhsad]]: Returns the name of the first file that
  6045. matches the filename, which may contain wildcards and "include lists." The
  6046. second argument, if included, defines the attributes of the files that will
  6047. be included in the search. Returns an empty string if no files match. The
  6048. attributes are:
  6049. N Normal (no attributes set) S System
  6050. R Read-only A Archive
  6051. H Hidden D subDirectory
  6052. The attributes (other than N) can be combined (for example
  6053. %@FINDFIRST[MYFILE,HS]). @FINDFIRST will only find a file if all of the
  6054. attributes match. You can prefix an attribute with - to mean "everything
  6055. except files with this attribute."
  6056. @FINDFIRST always skips the "." and ".." entries when processing directory
  6057. names.
  6058. To search for additional files after the first which match a wildcard or
  6059. include list see 284@FINDNEXT.
  6060. ;---------------------------------------------------------------------------
  6061. !TOPIC 284 @FINDNEXT
  6062. !NOINDEX
  6063. !TTY
  6064. @FINDNEXT[[filename [,-nrhsad]]]: Returns the name of the next file that
  6065. matches the filename passed to 283@FINDFIRST. Returns an empty string
  6066. when no more files match. @FINDNEXT should only be used after a successful
  6067. call to @FINDFIRST. The first argument is included for compatibility with
  6068. previous versions, but is ignored; it can be omitted if the second argument
  6069. is not used (e.g. %@FINDNEXT[]). The second argument, if included,
  6070. defines the attributes of the files that will be included in the search.
  6071. N Normal (no attributes set) S System
  6072. R Read-only A Archive
  6073. H Hidden D subDirectory
  6074. The attributes (other than N) can be combined (for example
  6075. %@FINDNEXT[MYFILE,HS]). @FINDNEXT will only find a file if all of the
  6076. attributes match. You can prefix an attribute with - to mean "everything
  6077. except files with this attribute."
  6078. @FINDNEXT always skips the "." and ".." entries when processing directory
  6079. names.
  6080. When running 4DOS in an LFN environment you must use @FINDCLOSE after
  6081. 283@FINDFIRST or the last @FINDNEXT to avoid running out of directory
  6082. search handles.
  6083. See the notes under 241Variable Functions about quoting returned
  6084. long filenames.
  6085. ;---------------------------------------------------------------------------
  6086. !TOPIC 726 @FLOOR
  6087. !NOINDEX
  6088. !TTY
  6089. @FLOOR[n]: Returns the value of the smallest integer that is not less than
  6090. n.
  6091. ;---------------------------------------------------------------------------
  6092. !TOPIC 285 @FORMAT
  6093. !NOINDEX
  6094. !TTY
  6095. @FORMAT[[-][[0]x][.y],string]: Reformats a string, truncating it or padding
  6096. it with spaces as necessary. If you use the minus [-], the string is
  6097. left-justified; otherwise, it is right-justified. The x value is the
  6098. minimum number of characters in the result. The y value is the maximum
  6099. number of characters in the result. You can combine the options as
  6100. necessary. For example:
  6101. "%@format[12,JPSoftware]" returns " JPSoftware"
  6102. "%@format[.3,JPSoftware]" returns "JPS"
  6103. @FORMAT will add leading or trailing spaces if necessary to pad the
  6104. result to the minimum width specified by x. If a leading zero is
  6105. used before x, the padding will be with 0's instead, for example:
  6106. "%@format[4,5]" returns " 5"
  6107. "%@format[04,5]" returns "0005"
  6108. "%@format[-04,5]" returns "5000"
  6109. See also the 248@COMMA function, which can make numeric values easier
  6110. to read by inserting thousands separators.
  6111. ;---------------------------------------------------------------------------
  6112. !TOPIC 286 @FULL
  6113. !NOINDEX
  6114. !TTY
  6115. @FULL[filename]: Returns the fully qualified path and filename of a file.
  6116. ;---------------------------------------------------------------------------
  6117. !TOPIC 348 @FUNCTION
  6118. !NOINDEX
  6119. !TTY
  6120. @FUNCTION[name]: Returns the contents of the specified user-defined function
  6121. as a string, or a null string if the function doesn't exist. When manipulating
  6122. strings returned by @FUNCTION you may need to disable certain special characters
  6123. with the 664SETDOS /X command. Otherwise, command separators, redirection
  6124. characters, and other similar "punctuation" in the function may be interpreted
  6125. as part of the current command, rather than part of a simple text string.
  6126. ;---------------------------------------------------------------------------
  6127. !TOPIC 718 @HISTORY
  6128. !NOINDEX
  6129. !TTY
  6130. @HISTORY[x[,y]]: Returns a line or word from the command history. (This
  6131. function will prove most useful in keystroke aliases). x is the line to
  6132. retrieve (current line = 0), and y is the specific word (first word = 0)
  6133. desired within that line. If y is omitted, @HISTORY returns the entire
  6134. line.
  6135. See 033Command History and Recall for more information about the command
  6136. history.
  6137. ;---------------------------------------------------------------------------
  6138. !TOPIC 287 @IF
  6139. !NOINDEX
  6140. !TTY
  6141. @IF[condition,true-value,false-value]: Evaluates the condition and
  6142. returns a string based on the result. The condition can include any of
  6143. the tests allowed in the 633IF command. If the condition is true, @IF
  6144. returns the first result string; if it is false, @IF returns the second
  6145. string. For example, echo %@if[2 == 2,Correct!,Oops!] displays "Correct!"
  6146. Be aware that both true-value and false-value will be evaluated even though
  6147. only one is to be returned! Whether the condition is true or false, both
  6148. arguments are expanded. For this reason, you should avoid using "action"
  6149. functions like 335@CLIPW, 264@EXEC, 265@EXECSTR, 273@FILEOPEN,
  6150. 270@FILECLOSE, 274@FILEREAD, 280@FILEWRITE, 283@FINDFIRST,
  6151. 340@INIREAD, 341@INIWRITE, 326@UNIQUE, and so on in either the
  6152. true-value or the false-value.
  6153. ;---------------------------------------------------------------------------
  6154. !TOPIC 288 @INC
  6155. !NOINDEX
  6156. !TTY
  6157. @INC[expression]: Returns the same value as
  6158. 263@EVAL[(expression) + 1]. That is, it adds one to the value of the
  6159. expression. Note that the function returns a value that has been
  6160. incremented; any variable used in the expression will not be changed. To
  6161. increment the value of a variable, use a command like this:
  6162. set var=%@inc[%var]
  6163. See also 252@DEC.
  6164. ;---------------------------------------------------------------------------
  6165. !TOPIC 289 @INDEX
  6166. !NOINDEX
  6167. !TTY
  6168. @INDEX[string1,string2[,n]]: Returns the position of string2 within
  6169. string1, or "-1" if string2 is not found. The first position in
  6170. string1 is numbered 0. The optional third parameter n specifies the
  6171. offset of additional matches. For example, to return the offset of the
  6172. second match:
  6173. %@index[abcdeabcde,cd,2]
  6174. An offset of 0 will return the total number of matches. A negative offset
  6175. will search from right to left.
  6176. ;---------------------------------------------------------------------------
  6177. !TOPIC 340 @INIREAD
  6178. !NOINDEX
  6179. !TTY
  6180. @INIREAD[filename,section,key]: Returns an entry from the specified .INI
  6181. file or an empty string if the entry does not exist. For example,
  6182. %@iniread[c:\4DOS\4DOS.ini,PRIMARY,history]
  6183. returns the size of the command history if it is specified in the [PRIMARY]
  6184. section of 4DOS.INI. The filename must be in quotes if it contains
  6185. whitespace or special characters. The section name and key name are
  6186. each limited to 255 characters.
  6187. ;---------------------------------------------------------------------------
  6188. !TOPIC 341 @INIWRITE
  6189. !NOINDEX
  6190. !TTY
  6191. @INIWRITE[filename,section,key,value]: Creates or updates an entry in
  6192. the specified .INI file. For example,
  6193. %@iniwrite[c:\4dos\4dos.ini,4dos,history,2048]
  6194. will set the size of the command history to 2,048 bytes the next time 4DOS
  6195. is started. @INIWRITE returns "0" for success or "-1" for failure. The
  6196. filename must be in quotes if it contains whitespace or special
  6197. characters. The section name and key name are each limited to 255
  6198. characters
  6199. ;---------------------------------------------------------------------------
  6200. !TOPIC 290 @INSERT
  6201. !NOINDEX
  6202. !TTY
  6203. @INSERT[n,string1,string2]: Inserts string1 into string2 starting at
  6204. position n. The first position in the string is postion 0. For example,
  6205. %@insert[1,arm,wing] returns the string "warming".
  6206. ;---------------------------------------------------------------------------
  6207. !TOPIC 291 @INSTR
  6208. !NOINDEX
  6209. !TTY
  6210. @INSTR[start,length,string]: Returns a substring, starting at the
  6211. position start and continuing for length characters. If the length
  6212. is omitted, it will default to the remainder of the string. If the
  6213. length is negative, the start is relative to the right side of the
  6214. string. The first character in the string is numbered 0; if the
  6215. length is negative, the last character is numbered 0.
  6216. For example, %@INSTR[0,2,%_TIME] gets the current time and extracts the
  6217. hour; %@INSTR[1,-2,%_TIME] extracts the seconds.
  6218. 321@SUBSTR is an older version of the same function.
  6219. ;---------------------------------------------------------------------------
  6220. !TOPIC 292 @INT
  6221. !NOINDEX
  6222. !TTY
  6223. @INT[n]: Returns the integer part of the number n.
  6224. ;---------------------------------------------------------------------------
  6225. !TOPIC 508 @ISALNUM
  6226. !NOINDEX
  6227. !TTY
  6228. @ISALNUM[string]: Returns "1" if string is entirely composed of alphabetic
  6229. (a-z, A-Z) and/or numeric (0-9) characters; "0" otherwise.
  6230. ;---------------------------------------------------------------------------
  6231. !TOPIC 509 @ISALPHA
  6232. !NOINDEX
  6233. !TTY
  6234. @ISALPHA[string]: Returns "1" if string is entirely composed of alphabetic
  6235. (a-z, A-Z) characters; "0" otherwise.
  6236. ;---------------------------------------------------------------------------
  6237. !TOPIC 510 @ISASCII
  6238. !NOINDEX
  6239. !TTY
  6240. @ISASCII[string]: Returns "1" if string is entirely composed of 7-bit ASCII
  6241. characters (0-7Fh); "0" otherwise.
  6242. ;---------------------------------------------------------------------------
  6243. !TOPIC 528 @ISCNTRL
  6244. !NOINDEX
  6245. !TTY
  6246. @ISCNTRL[string]: Returns "1" if string is entirely composed of ASCII
  6247. control characters (0-1Fh or 7Fh); "0" otherwise.
  6248. ;---------------------------------------------------------------------------
  6249. !TOPIC 529 @ISDIGIT
  6250. !NOINDEX
  6251. !TTY
  6252. @ISDIGIT[string]: Returns "1" if string is entirely composed of decimal
  6253. digits (0-9); "0" otherwise.
  6254. ;---------------------------------------------------------------------------
  6255. !TOPIC 828 @ISLOWER
  6256. !NOINDEX
  6257. !TTY
  6258. @ISLOWER[string]: Returns "1" if string is entirely composed of
  6259. lower-case letters (a-z); "0" otherwise.
  6260. ;---------------------------------------------------------------------------
  6261. !TOPIC 458 @ISODOWI
  6262. !NOINDEX
  6263. !TTY
  6264. @ISODOWI[date]: Returns the day of the week for the specified date as an
  6265. integer (1 = Monday, 2 = Tuesday, ... , 6 = Saturday, 7 = Sunday), pursuant
  6266. to ISO 8601. The date may be in either the local date format, or in ISO
  6267. format with a four-digit year; see 344date formats for more information.
  6268. ;---------------------------------------------------------------------------
  6269. !TOPIC 459 @ISOWEEK
  6270. !NOINDEX
  6271. !TTY
  6272. @ISOWEEK[date] is the week of the year (1 to 53), pursuant to ISO 8601.
  6273. Week 1 is the one that includes the first Thursday of the year, or
  6274. equivalently, the week which includes 4th of January. It is possible that
  6275. a January week is 52 or 53, or a December week is 1. This means that,
  6276. according to ISO 8601, it belongs to the previous or the following calendar
  6277. year, respectively. The date may be in either the local date format, or in
  6278. ISO format with a four-digit year; see 344date formats for more
  6279. information.
  6280. ;---------------------------------------------------------------------------
  6281. !TOPIC 721 @ISOWYEAR
  6282. !NOINDEX
  6283. !TTY
  6284. @ISOWYEAR[date] is the year of the ISO 8601 week date. It may not be
  6285. the calendar year of the entered date but the previous or the following one.
  6286. This means that, according to ISO 8601, the week of the entered date belongs
  6287. to the previous or the following calendar year, respectively. The date may
  6288. be in either the local date format, or in ISO format with a four-digit year;
  6289. see 344date formats for more information.
  6290. ;---------------------------------------------------------------------------
  6291. !TOPIC 530 @ISPRINT
  6292. !NOINDEX
  6293. !TTY
  6294. @ISPRINT[string]: Returns "1" if string is entirely composed of printable
  6295. characters; "0" otherwise.
  6296. ;---------------------------------------------------------------------------
  6297. !TOPIC 558 @ISPUNCT
  6298. !NOINDEX
  6299. !TTY
  6300. @ISPUNCT[string]: Returns "1" if string is entirely composed of punctuation
  6301. characters, i.e. printable characters which are not alphanumeric or space;
  6302. "0" otherwise.
  6303. ;---------------------------------------------------------------------------
  6304. !TOPIC 559 @ISSPACE
  6305. !NOINDEX
  6306. !TTY
  6307. @ISSPACE[string]: Returns "1" if string is entirely composed of white space
  6308. characters (9-0Dh or 20h); "0" otherwise.
  6309. ;---------------------------------------------------------------------------
  6310. !TOPIC 829 @ISUPPER
  6311. !NOINDEX
  6312. !TTY
  6313. @ISUPPER[string]: Returns "1" if string is entirely composed of
  6314. upper-case letters (A-Z); "0" otherwise.
  6315. ;---------------------------------------------------------------------------
  6316. !TOPIC 560 @ISXDIGIT
  6317. !NOINDEX
  6318. !TTY
  6319. @ISXDIGIT[string]: Returns "1" if string is entirely composed of hexadecimal
  6320. digits (0-9, A-F, a-f); "0" otherwise.
  6321. ;---------------------------------------------------------------------------
  6322. !TOPIC 293 @LABEL
  6323. !NOINDEX
  6324. !TTY
  6325. @LABEL[d:]: Returns the volume label of the specified disk drive.
  6326. ;---------------------------------------------------------------------------
  6327. !TOPIC 730 @LCS
  6328. !NOINDEX
  6329. !TTY
  6330. @LCS[string1,string2]: Returns the Longest Common Subsequence in string1
  6331. and string2. For example, for the strings "XMJYAUZ" and "MZJAWXU", it is
  6332. "MJAU".
  6333. ;---------------------------------------------------------------------------
  6334. !TOPIC 294 @LEFT
  6335. !NOINDEX
  6336. !TTY
  6337. @LEFT[n,string]: Returns the leftmost n characters from the
  6338. string. If n is greater than the length of the string, returns the
  6339. entire string. For example, %@left[2,jpsoft] returns the string
  6340. "jp". If n is negative, returns all but the rightmost n characters.
  6341. ;---------------------------------------------------------------------------
  6342. !TOPIC 295 @LEN
  6343. !NOINDEX
  6344. !TTY
  6345. @LEN[string]: Returns the length of a string.
  6346. ;---------------------------------------------------------------------------
  6347. !TOPIC 296 @LFN
  6348. !NOINDEX
  6349. !TTY
  6350. @LFN[filename]: Returns the long filename for a short ("8.3")
  6351. filename. The filename may contain any valid filename element
  6352. including drive letter, path, filename and extension; the entire name
  6353. including all intermediate paths will be returned in long name format.
  6354. Be sure to read the notes under 241Variable Functions about quoting
  6355. returned long filenames.
  6356. ;---------------------------------------------------------------------------
  6357. !TOPIC 297 @LINE
  6358. !NOINDEX
  6359. !TTY
  6360. @LINE[filename,n]: Returns line n from the specified file. The
  6361. first line in the file is numbered 0. "**EOF**" is returned for all line
  6362. numbers beyond the end of the file.
  6363. @LINE works with files having lines of no more than 511 characters; longer
  6364. lines will not be counted accurately.
  6365. The @LINE function must read each line of the file to find the line you
  6366. request, and will therefore cause significant delays if used in a long loop
  6367. or on a large file. For a more effective method of processing each line of
  6368. a file in sequence use the FOR command, or 273@FILEOPEN and a sequence of
  6369. @FILEREADs.
  6370. You can retrieve input from standard input if you specify CON as the
  6371. filename. If you are 051redirecting input to @LINE using this feature,
  6372. you must use 085command grouping or the redirection will not work
  6373. properly (you can 052pipe to @LINE without a command group; this
  6374. restriction applies only to input redirection). For example:
  6375. (echo %@line[con,0]) < myfile.dat
  6376. ;---------------------------------------------------------------------------
  6377. !TOPIC 298 @LINES
  6378. !NOINDEX
  6379. !TTY
  6380. @LINES[filename]: Returns the line number of the last line in the
  6381. file, or "-1" if the file is empty. The first line in the file is numbered
  6382. 0, so (for example) @LINES will return 0 for a file containing one line.
  6383. To get the actual number of lines, use %@INC[%@LINES[filename]].
  6384. @LINES works with files having lines of no more than 511 characters; longer
  6385. lines will not be counted accurately.
  6386. @LINES must read each line of the file in order to count it, and will
  6387. therefore cause significant delays if used in a long loop or on a large file.
  6388. ;---------------------------------------------------------------------------
  6389. !TOPIC 299 @LOWER
  6390. !NOINDEX
  6391. !TTY
  6392. @LOWER[string]: Returns the string converted to lower case.
  6393. ;---------------------------------------------------------------------------
  6394. !TOPIC 406 @LTRIM
  6395. !NOINDEX
  6396. !TTY
  6397. @LTRIM[chars,string]: Returns string with all the leading characters in
  6398. chars removed. For example, %@LTRIM[IJMPX,JP Software] returns " Software".
  6399. The test is case sensitive. To include a comma in the chars string,
  6400. enclose the entire first argument in double quotes. @LTRIM will remove the
  6401. quotes before processing the string.
  6402. ;---------------------------------------------------------------------------
  6403. !TOPIC 301 @MAKEAGE
  6404. !NOINDEX
  6405. !TTY
  6406. @MAKEAGE[date[,time]]: Returns the date and time (if included) as a
  6407. single value in the same format as 269@FILEAGE. Can be used to compare the
  6408. time stamp of a file with a specific date and time, for example:
  6409. if %@fileage[myfile] lt %@makeage[1/1/85] echo OLD!
  6410. The value returned by @MAKEAGE can be used for comparisons, but can not be
  6411. used for date and time calculations because it is not in identifiable units.
  6412. The @MAKEAGE value changes every two seconds, so, for example,
  6413. %@MAKEAGE[01-06-2003,12:00:00] and %@MAKEAGE[01-06-2003,12:00:01]
  6414. will return the same result.
  6415. The date may be in either the local date format, or in ISO format with a
  6416. four-digit year; see 344date formats for more information. The time
  6417. must be in 24-hour format; "am" and "pm" cannot be used. If the time is
  6418. not specified, it defaults to midnight.
  6419. ;---------------------------------------------------------------------------
  6420. !TOPIC 302 @MAKEDATE
  6421. !NOINDEX
  6422. !TTY
  6423. @MAKEDATE[n[,format]]: Returns a date (formatted according to the current
  6424. country settings). n is the integer number of days since 1980-01-01. This
  6425. is the inverse of 250@DATE. @MAKEDATE takes an optional second argument
  6426. for the date format:
  6427. 0 - system default format
  6428. 1 - U.S. format (mm-dd-yy)
  6429. 2 - European format (dd-mm-yy)
  6430. 3 - Japanese format (yy-mm-dd)
  6431. 4 - ISO 8601 international format (yyyy-mm-dd)
  6432. 5 - ISO 8601 international format (yyyy-Www-d) week date
  6433. 6 - ISO 8601 international format (yyyy-ddd) ordinal date
  6434. The separator used in the return string depends on the current country
  6435. settings of the system, except for in the ISO 8601 international format,
  6436. where it will always by a hyphen ('-') as per spec.
  6437. ;---------------------------------------------------------------------------
  6438. !TOPIC 303 @MAKETIME
  6439. !NOINDEX
  6440. !TTY
  6441. @MAKETIME[n]: Returns a time (formatted according to the current
  6442. country settings). n is the number of seconds since midnight. This is
  6443. the inverse of 322@TIME.
  6444. ;---------------------------------------------------------------------------
  6445. !TOPIC 304 @MASTER
  6446. !NOINDEX
  6447. !TTY
  6448. @MASTER[varname]: Returns the value of a variable from the master
  6449. environment.
  6450. ;---------------------------------------------------------------------------
  6451. !TOPIC 342 @MAX
  6452. !NOINDEX
  6453. !TTY
  6454. @MAX[a,b,c,...]: Returns the largest integer in the list.
  6455. ;---------------------------------------------------------------------------
  6456. !TOPIC 402 @MD5
  6457. !NOINDEX
  6458. !TTY
  6459. @MD5[filename]: Returns the 32 hexadecimal digit MD5 hash of the contents
  6460. of the specified file, or "-1" if the file doesn't exist. The RSA Data
  6461. Security Inc. MD5 message-digest algorithm described in RFC 1321 is used to
  6462. compute the hash value.
  6463. ;---------------------------------------------------------------------------
  6464. !TOPIC 343 @MIN
  6465. !NOINDEX
  6466. !TTY
  6467. @MIN[a,b,c,...]: Returns the smallest integer in the list.
  6468. ;---------------------------------------------------------------------------
  6469. !TOPIC 305 @MONTH
  6470. !NOINDEX
  6471. !TTY
  6472. @MONTH[date]: Returns the month number for the specified date (1-12). The
  6473. date may be in either the local date format, or in ISO format with a
  6474. four-digit year; see 344date formats for more information.
  6475. ;---------------------------------------------------------------------------
  6476. !TOPIC 369 @MONTHF
  6477. !NOINDEX
  6478. !TTY
  6479. @MONTHF[date]: Returns the full month name for the specified date
  6480. ("January, "February", etc.). The date may be in either the local date
  6481. format, or in ISO format with a four-digit year; see 344date formats for
  6482. more information.
  6483. ;---------------------------------------------------------------------------
  6484. !TOPIC 306 @NAME
  6485. !NOINDEX
  6486. !TTY
  6487. @NAME[filename]: Returns the base name of a file, without the path or
  6488. extension.
  6489. See the notes under 241Variable Functions about quoting returned
  6490. long filenames.
  6491. ;---------------------------------------------------------------------------
  6492. !TOPIC 307 @NUMERIC
  6493. !NOINDEX
  6494. !TTY
  6495. @NUMERIC[string]: Returns "1" if string is composed entirely of
  6496. digits (0 to 9), signs (+ or -), and the thousands and decimals
  6497. separators. Otherwise, returns "0".
  6498. If the string begins with a decimal separator it is not considered numeric
  6499. unless the next character is a digit, and there are no more decimal
  6500. separators within the string. For example, ".07" is numeric, but ".a" and
  6501. ".07.50" are not.
  6502. ;---------------------------------------------------------------------------
  6503. !TOPIC 308 @PATH
  6504. !NOINDEX
  6505. !TTY
  6506. @PATH[filename]: Returns the path from a filename, including the
  6507. drive letter and a trailing backslash but not including the base name or
  6508. extension.
  6509. See the notes under 241Variable Functions about quoting returned
  6510. long filenames.
  6511. ;---------------------------------------------------------------------------
  6512. !TOPIC 503 @QUOTE
  6513. !NOINDEX
  6514. !TTY
  6515. @QUOTE[filename]: Returns a double quoted argument, if it contains any
  6516. whitespace characters.
  6517. ;---------------------------------------------------------------------------
  6518. !TOPIC 309 @RANDOM
  6519. !NOINDEX
  6520. !TTY
  6521. @RANDOM[min, max]: Returns a "pseudo-random" value between min and max,
  6522. inclusive. Min, max, and the returned value are all integers.
  6523. The pseudo-random number generator is initialized from the system clock the
  6524. first time it is used after 4DOS starts, so it will produce a different
  6525. sequence of random numbers each time you use it. It can be called up to
  6526. 115,792,089,237,316,195,423,570,985,008,687,907,853,269,984,665,640,564,039,
  6527. 457,584,007,913,129,639,935 (2^256-1) times before repeating the sequence of
  6528. pseudo-random numbers it produces. The Xorshift7 generator proposed in the
  6529. paper "On the Xorshift Random Number Generators" by Francois Panneton and
  6530. Pierre L'Ecuyer is used to generate the pseudo-random numbers.
  6531. ;---------------------------------------------------------------------------
  6532. !TOPIC 310 @READSCR
  6533. !NOINDEX
  6534. !TTY
  6535. @READSCR[row,col,length]: Returns the text displayed on the screen at
  6536. the specified location. The upper left corner of the screen is location
  6537. 0,0.
  6538. The row and col can be specified as an offset from the current
  6539. cursor location by preceding either value with a [+] or [-]. For example:
  6540. %@readscr[-2,+2,10]
  6541. returns 10 characters from the screen, starting 2 rows above and 2 columns to
  6542. the right of the current cursor position.
  6543. You can also specify the row and column as offsets from the current cursor
  6544. position. Begin the value with a plus sign [+] to read the screen the
  6545. specified number of rows below (or columns to the right of) the current
  6546. position, or with a minus sign [-] to read the screen above (or to the
  6547. left of) the current position.
  6548. ;---------------------------------------------------------------------------
  6549. !TOPIC 311 @READY
  6550. !NOINDEX
  6551. !TTY
  6552. @READY[d:]: Returns "1" if the specified drive is ready; otherwise
  6553. returns "0".
  6554. Warning: Some CD-ROM drivers may report an incorrect status to 4DOS.
  6555. ;---------------------------------------------------------------------------
  6556. !TOPIC 312 @REMOTE
  6557. !NOINDEX
  6558. !TTY
  6559. @REMOTE[d:]: Returns "1" if the specified drive is a remote (network)
  6560. drive; otherwise returns "0".
  6561. ;---------------------------------------------------------------------------
  6562. !TOPIC 313 @REMOVABLE
  6563. !NOINDEX
  6564. !TTY
  6565. @REMOVABLE[d:]: Returns "1" if the specified drive is removable (i.e.,
  6566. a floppy disk or removable hard disk); otherwise returns "0".
  6567. ;---------------------------------------------------------------------------
  6568. !TOPIC 314 @REPEAT
  6569. !NOINDEX
  6570. !TTY
  6571. @REPEAT[c,n]: Returns the character c repeated n times.
  6572. ;---------------------------------------------------------------------------
  6573. !TOPIC 315 @REPLACE
  6574. !NOINDEX
  6575. !TTY
  6576. @REPLACE[string1,string2,text]: Replaces all occurrences of string1 in
  6577. the text string with string2. For example, %@replace[w,ch,warming]
  6578. returns the string "charming". The search is case-sensitive.
  6579. ;---------------------------------------------------------------------------
  6580. !TOPIC 729 @REVERSE
  6581. !NOINDEX
  6582. !TTY
  6583. @REVERSE[string]: Reverses the order of the characters in string.
  6584. ;---------------------------------------------------------------------------
  6585. !TOPIC 316 @RIGHT
  6586. !NOINDEX
  6587. !TTY
  6588. @RIGHT[n,string]: Returns the rightmost n characters from the
  6589. string. If n is greater than the length of the string, returns the
  6590. entire string. For example, %@right[4,jpsoft] returns the string "soft".
  6591. If n is negative, returns all but the leftmost n characters.
  6592. ;---------------------------------------------------------------------------
  6593. !TOPIC 407 @RTRIM
  6594. !NOINDEX
  6595. !TTY
  6596. @RTRIM[chars,string]: Returns string with all the trailing characters in
  6597. chars removed. For example, %@RTRIM[958NPTX,Windows XP] returns "Windows ".
  6598. The test is case sensitive. To include a comma in the chars string,
  6599. enclose the entire first argument in double quotes. @LTRIM will remove the
  6600. quotes before processing the string.
  6601. ;---------------------------------------------------------------------------
  6602. !TOPIC 317 @SEARCH
  6603. !NOINDEX
  6604. !TTY
  6605. @SEARCH[filename[,path]]: Searches for the filename using the 138PATH
  6606. environment variable or the specified path, appending an extension if one
  6607. isn't specified. Returns the fully-expanded name of the file including
  6608. drive, path, base name, and extension, or an empty string if a matching
  6609. file is not found. If wildcards are used in the filename, @SEARCH will
  6610. search for the first file that matches the wildcard specification, and
  6611. return the drive and path for that file plus the wildcard filename (e.g.,
  6612. E:\UTIL\*.COM).
  6613. ;---------------------------------------------------------------------------
  6614. !TOPIC 318 @SELECT
  6615. !NOINDEX
  6616. !TTY
  6617. @SELECT[filename,top,left,bottom,right,title[,1]]: Pops up a selection
  6618. window with the lines from the specified file, allowing you to display menus
  6619. or other selection lists from within a batch file. You can move through the
  6620. selection window with standard popup window navigation keystrokes, including
  6621. character matching (see 894Popup Windows for details; to change the
  6622. navigation keys see 481Key Mapping Directives).
  6623. @SELECT returns the text of the line the scrollbar is on if you press
  6624. Enter, or an empty string if you press Esc. The file size is
  6625. limited only by available memory. To select from lines passed through input
  6626. redirection or a pipe, use CON as the filename. To select from lines
  6627. on the Windows clipboard, use CLIP: as the filename. If you use the
  6628. optional 1 argument after the window title, the list will be sorted
  6629. alphabetically.
  6630. ;---------------------------------------------------------------------------
  6631. !TOPIC 358 @SERIAL
  6632. !NOINDEX
  6633. !TTY
  6634. @SERIAL[d:]: Returns the serial number of the specified disk drive
  6635. (in hex, i.e.: ABCD:1234).
  6636. ;---------------------------------------------------------------------------
  6637. !TOPIC 319 @SFN
  6638. !NOINDEX
  6639. !TTY
  6640. @SFN[filename]: Returns the fully expanded short ("8.3") filename for a
  6641. long filename. The filename may contain any valid filename element
  6642. including drive letter, path, filename and extension; the entire name
  6643. including all intermediate paths will be returned in short name format.
  6644. The filename should not be quoted.
  6645. ;---------------------------------------------------------------------------
  6646. !TOPIC 403 @SHA1
  6647. !NOINDEX
  6648. !TTY
  6649. @SHA1[filename]: Returns the 40 hexadecimal digit SHA1 hash of the contents
  6650. of the specified file, or "-1" if the file doesn't exist. The Secure Hash
  6651. Algorithm 1 (SHA1) described in RFC 4634 is used to compute the hash value.
  6652. ;---------------------------------------------------------------------------
  6653. !TOPIC 733 @SIMILAR
  6654. !NOINDEX
  6655. !TTY
  6656. @SIMILAR[string1,string2]: Returns a percentage value (0 - 100) reflecting
  6657. the similarity between string1 and string2. 0 means the two strings have
  6658. nothing in common; 100 means the strings are identical. Using the longer
  6659. string as the first parameter usually results in lower similarity values and
  6660. using the shorter results in higher values. The algorithm is the same as in
  6661. the PHP similar_text() function and was derived from the paper "Decision
  6662. Graphs - An Extension of Decision Trees" by Jonathan Oliver.
  6663. ;---------------------------------------------------------------------------
  6664. !TOPIC 320 @STRIP
  6665. !NOINDEX
  6666. !TTY
  6667. @STRIP[chars,string]: Removes the characters in chars from the
  6668. string and returns the result. For example, %@STRIP[AaEe,All Good Men]
  6669. returns "ll Good Mn". The test is case sensitive. To include a comma in
  6670. the chars string, enclose the entire first argument in double quotes.
  6671. @STRIP will remove the quotes before processing the string.
  6672. ;---------------------------------------------------------------------------
  6673. !TOPIC 321 @SUBSTR
  6674. !NOINDEX
  6675. !TTY
  6676. @SUBSTR[string,start,length]: This is an older, deprecated version of
  6677. 291@INSTR. The string parameter is at the start of the @SUBSTR
  6678. argument list. If the string includes commas, it must be quoted with
  6679. quote marks ["] or back-quotes [`], or else the commas must be escaped
  6680. using the 086escape character. The quotes do count in calculating the
  6681. position of the substring. @INSTR, which has the string argument last,
  6682. does not have this limitation.
  6683. ;---------------------------------------------------------------------------
  6684. !TOPIC 722 @SUBST
  6685. !NOINDEX
  6686. !TTY
  6687. @SUBST[n,str1, str2]: Substitutes str1 starting at position n in str2.
  6688. ;---------------------------------------------------------------------------
  6689. !TOPIC 322 @TIME
  6690. !NOINDEX
  6691. !TTY
  6692. @TIME[time]: Returns the number of seconds since midnight for the
  6693. specified time. The time must be in 24-hour format; "am" and "pm" cannot
  6694. be used.
  6695. ;---------------------------------------------------------------------------
  6696. !TOPIC 323 @TIMER
  6697. !NOINDEX
  6698. !TTY
  6699. @TIMER[n]: Returns the current split time for a stopwatch started with the
  6700. 673TIMER command. The value of n specifies the timer to read and can be
  6701. 1, 2, or 3.
  6702. ;---------------------------------------------------------------------------
  6703. !TOPIC 324 @TRIM
  6704. !NOINDEX
  6705. !TTY
  6706. @TRIM[string]: Returns the string with the leading and trailing white
  6707. space (space and tab characters) removed.
  6708. ;---------------------------------------------------------------------------
  6709. !TOPIC 325 @TRUENAME
  6710. !NOINDEX
  6711. !TTY
  6712. @TRUENAME[filename]: Returns the fully-expanded name for a file.
  6713. ;---------------------------------------------------------------------------
  6714. !TOPIC 408 @TRUNCATE
  6715. !NOINDEX
  6716. !TTY
  6717. @TRUNCATE[n]: Truncate the file opened for write access by 273@FILEOPEN
  6718. at the current position of the file pointer, where n is the value returned
  6719. by 273@FILEOPEN. Be sure to read the cautionary note about file functions
  6720. under 241Variable Functions.
  6721. ;---------------------------------------------------------------------------
  6722. !TOPIC 326 @UNIQUE
  6723. !NOINDEX
  6724. !TTY
  6725. @UNIQUE[d:\path]: Creates a zero-length file with a unique name in the
  6726. specified directory, and returns the full name and path. If no path is
  6727. specified, the file will be created in the current directory. The file
  6728. name will be FAT-compatible (8 character name and 3 character extension)
  6729. regardless of whether the file is created on a FAT or LFN drive.
  6730. This function allows you to create a temporary file without overwriting an
  6731. existing file.
  6732. ;---------------------------------------------------------------------------
  6733. !TOPIC 504 @UNQUOTE
  6734. !NOINDEX
  6735. !TTY
  6736. @UNQUOTE[filename]: Returns the argument with all double quotes removed.
  6737. ;---------------------------------------------------------------------------
  6738. !TOPIC 723 @UNQUOTES
  6739. !NOINDEX
  6740. !TTY
  6741. @UNQUOTES[filename]: Returns the argument with leading and trailing double
  6742. quotes removed.
  6743. ;---------------------------------------------------------------------------
  6744. !TOPIC 327 @UPPER
  6745. !NOINDEX
  6746. !TTY
  6747. @UPPER[string]: Returns the string converted to upper case.
  6748. ;---------------------------------------------------------------------------
  6749. !TOPIC 328 @WILD
  6750. !NOINDEX
  6751. !TTY
  6752. @WILD[string1,string2]: Performs a comparison of the two strings, and
  6753. returns "1" if they match or "0" if they don't match. The second argument,
  6754. string2, may contain wildcards or extended wildcards; the first argument,
  6755. string1, may not. The test is not case sensitive. The following example
  6756. tests whether the \UTIL directory (or any directory that begins with the
  6757. characters UTIL) is included in the 138PATH:
  6758. if %@wild[%path,*\UTIL*] == 1 command
  6759. ;---------------------------------------------------------------------------
  6760. !TOPIC 329 @WORD
  6761. !NOINDEX
  6762. !TTY
  6763. @WORD[["xxx",]n,string]: Returns the nth word in the string. The first
  6764. word is numbered 0. If n is negative, words are returned from the end of
  6765. the string. The first argument is a list of word separators you want to
  6766. use; if you don't specify it, only spaces, tabs, and commas are considered
  6767. to be word separators. See also 347@FIELD.
  6768. If you want to use a double quote as a separator, prefix it with an
  6769. 086escape character. If the string argument is enclosed in quotation
  6770. marks, you must enter a list of separators.
  6771. For example:
  6772. %@WORD[2,NOW IS THE TIME] returns "THE"
  6773. %@WORD[-0,NOW IS THE TIME] returns "TIME"
  6774. %@WORD[-2,NOW IS THE TIME] returns "IS"
  6775. %@WORD["=",1,2 + 2=4] returns "4"
  6776. ;---------------------------------------------------------------------------
  6777. !TOPIC 330 @WORDS
  6778. !NOINDEX
  6779. !TTY
  6780. @WORDS[["xxx",]string]: Returns the number of words in the string. The
  6781. first argument is a list of word separators you want to use; if you don't
  6782. specify it, only spaces, tabs, and commas are considered to be word
  6783. separators. See also 449@FIELDS.
  6784. If you want to use a double quote as a separator, prefix it with an
  6785. 086escape character. If the string argument is enclosed in quotation
  6786. marks, you must enter a list of separators.
  6787. ;---------------------------------------------------------------------------
  6788. !TOPIC 331 @XMS
  6789. !NOINDEX
  6790. !TTY
  6791. @XMS[b|k|m]: Returns the amount of free XMS memory.
  6792. ;---------------------------------------------------------------------------
  6793. !TOPIC 332 @YEAR
  6794. !NOINDEX
  6795. !TTY
  6796. @YEAR[date]: Returns the year for the specified date. The date may be in
  6797. either the local date format, or in ISO format with a four-digit year; see
  6798. 344date formats for more information.
  6799. ;---------------------------------------------------------------------------
  6800. !TOPIC 351 4DOS.INI
  6801. !NOINDEX
  6802. Part of the power of 4DOS is its flexibility. You can alter its configuration
  6803. to match your style of computing. Most of the configuration of 4DOS is
  6804. controlled through a file of initialization information called 4DOS.INI,
  6805. which is discussed in the following sections:
  6806. !NOWRAP
  6807. !INDENT 5 5 5 5
  6808. 353Modifying the .INI File
  6809. 354Using the .INI File
  6810. 355.INI File Sections
  6811. 356.INI File Directives
  6812. 357.INI File Examples
  6813. !INDENT 0
  6814. !WRAP
  6815. We also discuss many ways of configuring 4DOS
  6816. in other sections of the help, for example:
  6817. !INDENT 7 5 5 5
  6818. * With 101aliases you can set default options for internal commands
  6819. and create new commands.
  6820. * With 082executable extensions you can associate data files with the
  6821. applications you use to open them.
  6822. * With the 137FILECOMPLETION environment variable and the
  6823. 429FileCompletion .INI directive you can customize filename
  6824. completion to match the command you are working with.
  6825. * With the 133COLORDIR environment variable and the 463ColorDir
  6826. .INI directive you can set the colors used by the 612DIR and
  6827. 662SELECT commands.
  6828. * With the 664SETDOS command, you can change some aspects of
  6829. 4DOS's operation "on the fly."
  6830. !INDENT 0
  6831. ;---------------------------------------------------------------------------
  6832. !TOPIC 352 Starting 4DOS
  6833. !NOINDEX
  6834. 4DOS is started as the primary shell by vDosPlus, it can also be started as
  6835. a secondary shell by another program or by running a copy of 4DOS directly
  6836. from the command line.
  6837. Exit Codes
  6838. If you start 4DOS from another program as a temporary process (e.g. to
  6839. run a batch file or internal command), it will return a numeric code to
  6840. the other program when it is finished. This code is usually used to
  6841. indicate whether the operation performed was successful or not, with
  6842. 0 often indicating success and a non-zero value indicating a failure or
  6843. other numeric result.
  6844. The exit code is normally the numeric exit code from the last
  6845. external command. Internal commands do not set the exit code. If
  6846. you enter an unknown command the exit code will be 2, which is the
  6847. internal 4DOS unknown command error number.
  6848. You can also use the 624EXIT n command to explicitly set the exit
  6849. code. If you do, this will override the rules above, and set the
  6850. return code to the value in your EXIT command.
  6851. The normal rules described above may not return a code that
  6852. indicates the success or failure of the specific operation that
  6853. concerns you. Therefore, if you need to rely on the exit code from
  6854. 4DOS, we recommend that you use a batch file or alias to create the
  6855. exit code you want, and then set the code explicitly with EXIT n.
  6856. ;---------------------------------------------------------------------------
  6857. !TOPIC 353 Modifying the .INI File
  6858. !NOINDEX
  6859. Note: in vDosPlus the 4DOS.INI has to be copied to the same folder as the
  6860. autoexec.txt and config.txt files.
  6861. You can create, add to, and modify the .INI file in two ways:
  6862. with the OPTION command and by editing the file with any ASCII
  6863. editor. OPTION displays a set of dialogs which allow you to modify
  6864. the settings that are used most often. When you exit from the
  6865. dialogs, you can select the Save button to save your changes in
  6866. the .INI file for use in the current session and all future
  6867. sessions, select the Use or OK button to use your changes in the
  6868. current session only, or discard the changes you have made by
  6869. selecting the Cancel button. See the 648OPTION command for
  6870. additional details.
  6871. Changes you make in the Startup section of the OPTION dialogs will
  6872. only take effect the next time you start vDosPlus.
  6873. OPTION handles most standard .INI file settings. A few more advanced
  6874. settings, as well as all settings that affect the interpretation of
  6875. keystrokes, cannot be modified with OPTION and must be inserted or modified
  6876. manually. For more details see the 648OPTION command.
  6877. You can also create, add to, and edit the .INI file "manually" with
  6878. any ASCII text editor. 4DOS reads its .INI file when it starts, and
  6879. configures itself accordingly. The .INI file is not re-read when
  6880. you change it manually. For manual changes to take effect, you must
  6881. restart vDosPlus. If you edit the .INI file manually, make sure you
  6882. save the file in ASCII format.
  6883. Each item that you can include in the .INI file has a default value. You
  6884. only need to include entries in the file for settings that you want to
  6885. change from their default values.
  6886. Format
  6887. Most lines in the .INI file consist of a one-word directive, an equal sign
  6888. [=], and a value. For example, in the following line, the word
  6889. "Environment" is the directive and "2048" is the value:
  6890. Environment = 2048
  6891. Any spaces before or after the equal sign are ignored.
  6892. If you have a long string to enter in the .INI file (for example, for the
  6893. 463ColorDir directive), you must enter it all on one line. Strings
  6894. cannot be "continued" to a second line. Each line may be up to 511
  6895. characters long.
  6896. The format of the value part of a directive line depends on the individual
  6897. directive. It may be a numeric value, a single character, a choice (like
  6898. "Yes" or "No"), a color setting, a key name, a path, a filename, or a text
  6899. string. The value begins with the first non-blank character after the equal
  6900. sign and ends at the end of the line or the beginning of a comment.
  6901. Blank lines are ignored in the .INI file and can be used to separate groups
  6902. of directives. You can place comments in the file by beginning a line with a
  6903. semicolon [;]. You can also place comments at the end of any line except
  6904. one containing a text string value. To do so, enter at least one space or
  6905. tab after the value, a semicolon, and your comment, like this:
  6906. Environment = 2048 ; set standard environment size
  6907. If you try to place a comment at the end of a string value, the comment will
  6908. become part of the string and will probably cause an error.
  6909. If you use the 648OPTION dialogs to modify the .INI file, comments on
  6910. lines modified from within the dialogs will not be preserved when the
  6911. new lines are saved. To be sure .INI file comments are preserved, put
  6912. them on separate lines in the file.
  6913. If you want to include the text of one .INI file within another (for
  6914. example, if you have a set of common directives used by several JP Software
  6915. products), see the 567Include directive.
  6916. ;---------------------------------------------------------------------------
  6917. !TOPIC 354 Using the .INI File
  6918. !NOINDEX
  6919. When 4DOS is loaded as a secondary shell, it does not search for the .INI
  6920. file. Instead, it retrieves the primary shell's .INI file data, processes
  6921. the [Secondary] section of the original .INI file if necessary, and then
  6922. processes any "@d:\path\inifile" option on the secondary shell command line.
  6923. You can override this behavior with the 571NextINIFile directive.
  6924. Secondary shells automatically inherit the configuration settings currently
  6925. in effect in the previous shell. If values have been changed by
  6926. 664SETDOS since the primary shell started, the current values will be
  6927. passed to the secondary shell. If the previous shell's .INI file had a
  6928. [Secondary] section, it will then be read and processed (see
  6929. 355.INI File Sections). If not, the previous shell's settings will
  6930. remain in effect.
  6931. For example, you might set BatchEcho to Yes in the .INI file, to enable batch
  6932. file echo. If you then use 664SETDOS /V0 to turn off batch file echoing
  6933. in the primary shell, then any secondary shells will inherit the SETDOS
  6934. setting, rather than the original value from the .INI file; i.e., batch
  6935. files in the secondary shell will default to no echo.
  6936. If you want to force secondary shells to start with a specific value for a
  6937. particular directive, regardless of any changes made with SETDOS in a
  6938. previous shell, repeat the directive in the [Secondary] section of the
  6939. .INI file.
  6940. When you start a secondary shell you can specify an alternate location and
  6941. name for 4DOS.INI by passing the "@d:\path\inifile" option to 4DOS as a
  6942. command-line parameter. In this case, the configuration settings in the
  6943. alternate 4DOS.INI file will supersede any settings inherited from the
  6944. previous shell. Any values which are not explicitly set in the alternate
  6945. file will retain the value they had in the previous shell.
  6946. The 664SETDOS command can override several of the .INI file
  6947. directives. For example, the cursor shape used by 4DOS can be adjusted
  6948. either with the 419CursorIns and 420CursorOver directives or the
  6949. SETDOS /S command. The correspondence between SETDOS options and .INI
  6950. directives is noted with each directive, and under each option of the SETDOS
  6951. command.
  6952. When 4DOS detects an error while processing the .INI
  6953. file, it displays an error message and prompts you to press a key to
  6954. continue processing the file. This allows you to note any errors before the
  6955. startup process continues. The directive in error will retain its previous
  6956. or default value. Only the most catastrophic errors (like a disk read
  6957. failure) will terminate processing of the remainder of the .INI file. If
  6958. you don't want a pause after each error, use a "PauseOnError = No" directive
  6959. at the beginning of the .INI file.
  6960. If you need to test different values for an .INI directive without repeatedly
  6961. editing the .INI file, use the 648OPTION command or see the
  6962. 383INIQuery directive.
  6963. ;---------------------------------------------------------------------------
  6964. !TOPIC 355 .INI File Sections
  6965. !NOINDEX
  6966. The .INI file has three possible sections: the first or global section,
  6967. named [4DOS]; the [Primary] section; and the [Secondary] section. Each
  6968. section is identified by the section name in square brackets on a line by
  6969. itself.
  6970. Directives in the global section are effective in all shells. In most cases,
  6971. this is the only section you will need. Any changes you make to the .INI
  6972. file with the 648OPTION command are stored in the global section.
  6973. The [Primary] and [Secondary] sections include directives that are used
  6974. only in primary and secondary shells, respectively. You don't need to set
  6975. up these sections unless you want different directives for primary and
  6976. secondary shells.
  6977. Directives in the [Primary] section are used for the first or primary
  6978. shell. The values are passed automatically to all secondary shells, unless
  6979. overridden by a directive with the same name in the [Secondary] section.
  6980. Directives in the [Secondary] section are used in secondary shells only,
  6981. and override any corresponding primary shell settings. For example, these
  6982. lines in the .INI file:
  6983. [Primary]
  6984. ScreenRows = 25
  6985. [Secondary]
  6986. ScreenRows = 50
  6987. mean to assume that you have 25 rows on the screen in the primary shell and
  6988. 50 lines in all secondary shells.
  6989. Sections that begin with any name other than [4DOS], [Primary], or
  6990. [Secondary] are ignored.
  6991. ;---------------------------------------------------------------------------
  6992. !TOPIC 356 .INI File Directives
  6993. !NOINDEX
  6994. For information on specific directives, see the separate topic for each
  6995. type of directive.
  6996. !NOWRAP
  6997. !INDENT 5 5 5 5
  6998. 371Initialization Directives
  6999. 410Configuration Directives
  7000. 448Color Directives
  7001. 481Key Mapping Directives
  7002. 550Advanced Directives
  7003. !INDENT 0
  7004. !WRAP
  7005. These topics list the directives, with a one-line description of each, and
  7006. a cross-reference which selects a full screen help topic on that directive. A
  7007. few of the directives are simple enough that the one-line description is
  7008. sufficient, but in most cases you should check for any additional
  7009. information in the cross-reference topic if you are not already familiar
  7010. with the directive.
  7011. You can also obtain help on most directives with a HELP directive command
  7012. at the prompt.
  7013. There are 8 types of directives in the .INI file. The different types of
  7014. directives are shown in the descriptions as follows:
  7015. !INDENT 7 5 5 5
  7016. * Name = nnnn (1234): This directive takes a numeric value which
  7017. replaces the "nnnn." The default value is shown in parentheses.
  7018. * Name = c (X): This directive accepts a single character as its
  7019. value. The default character is shown in parentheses. You must type
  7020. in the actual character; you cannot use a key name.
  7021. * Name = CHOICE1 | Choice2 | ... : This directive takes a choice
  7022. value. The possible choices are listed, separated by vertical bars. The
  7023. default value is shown in all upper case letters in the directive
  7024. description, but in your file any of the choices can be entered in
  7025. upper case or lower case. For example, if the choices were shown as
  7026. "YES | No" then "YES" is the default.
  7027. * Name = Color: This directive takes a color specification. See
  7028. 892Colors and Color Names for the format of color names.
  7029. * Name = Key (Default): This directive takes a key specification. See
  7030. 893Keys and Key Names for the format of key names.
  7031. * Name = Path: This directive takes a path specification, but not a
  7032. filename. The value should include both a drive and path (e.g., C:\4DOS)
  7033. to avoid any possible ambiguities. A trailing backslash [\] at the
  7034. end of the path name is acceptable but not required. Any default path
  7035. is described in the text.
  7036. * Name = File: This directive takes a filename. We recommend that
  7037. you use a full filename including the drive letter and path to avoid any
  7038. possible ambiguities. Any default filename is described in the text.
  7039. * Name = String: This directive takes a string in the format
  7040. shown. The text describes the default value and any additional
  7041. requirements for formatting the string correctly. No comments are
  7042. allowed.
  7043. !INDENT 0
  7044. 4DOS contains a fixed-length area for storing strings entered in the .INI
  7045. file, including file names, paths, and other strings. This area is large
  7046. and is unlikely to overflow; if it does, you will receive an error
  7047. message. If this occurs, reduce the complexity of your .INI file.
  7048. ;---------------------------------------------------------------------------
  7049. !TOPIC 357 .INI File Examples
  7050. !NOINDEX
  7051. The following examples will give you an idea of the types of things that can
  7052. be done with the .INI file. The comments on each directive explain what it
  7053. does.
  7054. First, a very simple example that just sets up swapping and environment
  7055. size, leaving everything else at its default value:
  7056. [4DOS]
  7057. InstallPath = c:\4dos ; Installation directory
  7058. Swapping = ems, c:\ ; try EMS, then C: root
  7059. Environment = 1024 ; set environment size
  7060. Here's an example for a system which supports Upper Memory blocks
  7061. (UMBs). Several settings take advantage of UMBs, and others modify the 4DOS
  7062. configuration to match the user's preferences. Note that the comment for the
  7063. 391Swapping directive is on separate lines before the directive itself,
  7064. as no comments are allowed in string directives:
  7065. [4DOS]
  7066. InstallPath = c:\4dos ; Installation directory
  7067. Environment = 3072 ; expand environment to 3KB
  7068. Alias = 6144 ; expand aliases to 6KB
  7069. LocalHistory = No ; use a global history
  7070. ; for swapping try XMS, then RAM disk H:,
  7071. ; then hard disk C:
  7072. Swapping = xms, h:\, c:\
  7073. UMBLoad = Yes ; resident part of 4DOS in UMB
  7074. UMBEnvironment = Yes ; master environment in UMB
  7075. UMBHistory = Yes ; global history in UMB
  7076. BatchEcho = No ; default is ECHO OFF
  7077. EditMode = Insert ; editor in insert mode
  7078. CursorOver = 100 ; overstrike cursor 100%
  7079. CursorIns = 10 ; insert cursor 10%
  7080. ;---------------------------------------------------------------------------
  7081. !TOPIC 371 Initialization Directives
  7082. !NOINDEX
  7083.  3724StartPath Path for 4START and 4EXIT
  7084. 373Alias Size of alias list
  7085. 374AutoExecParms Parameters for AUTOEXEC.BAT
  7086. 375AutoExecPath Path and optional file name for AUTOEXEC.BAT
  7087. 376DirHistory Size of directory history list
  7088. 377Environment Size of environment
  7089. 378EnvFree Required free space in environment
  7090. 379Function Size of function list
  7091.  380HelpOptions Options for help system
  7092. 381HelpPath Path to 4HELP.EXE (obsolete)
  7093. 400HistLogOn Default history logging state
  7094. 382History Size of history list
  7095. 383INIQuery Query for each line in 4DOS.INI
  7096.  384InstallPath Location of 4DOS files
  7097. 385LocalAliases Local vs. global aliases
  7098. 386LocalDirHistory Local vs. global directory history
  7099. 387LocalFunctions Local vs. global functions
  7100. 388LocalHistory Local vs. global history
  7101. 399LogOn Default command logging state
  7102. 389PauseOnError Pause on errors in 4DOS.INI
  7103.  390REXXPath Set path to PC DOS 7.0 / 2000 REXX interpreter
  7104. 391Swapping Swapping type(s)
  7105.  392TreePath Path for directory database
  7106. 393UMBAlias Load global aliases in UMB
  7107. 394UMBDirHistory Load global directory history in UMB
  7108. 395UMBEnvironment Load master environment in UMB
  7109. 396UMBFunction Load global functions in UMB
  7110. 397UMBHistory Load history in UMB
  7111. 398UMBLoad Load resident part of 4DOS in UMB
  7112. Directives marked with a  may be dynamically changed at the command line
  7113. using the 648OPTION //optname=value syntax. If a directive does not
  7114. have this mark, it may not be meaningful to change it after 4DOS has
  7115. started. Or there may be some simpler way to change it, e.g. options to the
  7116. 643LOG or 668SWAPPING commands. When starting a secondary copy of
  7117. 4DOS, remember that you can pass directives on its command line using the
  7118. //iniline syntax; see 352Starting 4DOS for details.
  7119. Nearly all the initialization directives can be easily adjusted using the
  7120. interactive 648OPTION dialogs. The only exceptions are the obsolete
  7121. 381HelpPath, and 383INIQuery and 389PauseOnError, used to debug
  7122. .INI files.
  7123. ;---------------------------------------------------------------------------
  7124. !TOPIC 400 HistLogOn
  7125. !NOINDEX
  7126. !TTY
  7127. HistLogOn = Yes | NO: Default history logging state (see 643LOG /H.)
  7128. ;---------------------------------------------------------------------------
  7129. !TOPIC 399 LogOn
  7130. !NOINDEX
  7131. !TTY
  7132. LogOn = Yes | NO: Default command logging state (see 643LOG.)
  7133. ;---------------------------------------------------------------------------
  7134. !TOPIC 372 4StartPath
  7135. !NOINDEX
  7136. !TTY
  7137. 4StartPath = Path: Sets the drive and directory where the 4START and
  7138. 4EXIT batch files (if any) are located.
  7139. ;---------------------------------------------------------------------------
  7140. !TOPIC 373 Alias
  7141. !NOINDEX
  7142. !TTY
  7143. Alias = nnnn (1024): Sets the amount of memory in bytes allocated for
  7144. the alias list. The allowable range of values is 256 to 32767 bytes. If
  7145. you use a global alias list (see 595ALIAS), the Alias value is
  7146. ignored in all shells except the shell which first establishes the global
  7147. list.
  7148. ;---------------------------------------------------------------------------
  7149. !TOPIC 374 AutoExecParms
  7150. !NOINDEX
  7151. !TTY
  7152. AutoExecParms = String: Sets the parameter or parameters to be passed
  7153. to 109AUTOEXEC.BAT. The parameters will be available in your
  7154. AUTOEXEC.BAT file as %1, %2, etc.
  7155. ;---------------------------------------------------------------------------
  7156. !TOPIC 375 AutoExecPath
  7157. !NOINDEX
  7158. !TTY
  7159. AutoExecPath = Path | File: Sets the path used to find AUTOEXEC.BAT if
  7160. 4DOS is started as a primary shell with the /P option. If you include only
  7161. a path, 4DOS will look for AUTOEXEC.BAT in the specified directory. If you
  7162. include a complete file name, 4DOS will look for the specified file, and will
  7163. not look for AUTOEXEC.BAT. The default is the file AUTOEXEC.BAT in the root
  7164. directory of C:.
  7165. !TTY
  7166. ;---------------------------------------------------------------------------
  7167. !TOPIC 376 DirHistory
  7168. !NOINDEX
  7169. !TTY
  7170. DirHistory = nnnn (256): Sets the amount of memory allocated to the
  7171. directory history in bytes. The allowable range of values is 256 to 2048
  7172. bytes. If you use a global directory history list, the
  7173. DirHistory value is ignored in all shells except the shell which first
  7174. establishes the global list.
  7175. ;---------------------------------------------------------------------------
  7176. !TOPIC 377 Environment
  7177. !NOINDEX
  7178. !TTY
  7179. Environment = nnnn (512): Sets the amount of memory allocated to the
  7180. environment in bytes. The allowable range of values is 160 to 32767 bytes.
  7181. ;---------------------------------------------------------------------------
  7182. !TOPIC 378 EnvFree
  7183. !NOINDEX
  7184. !TTY
  7185. EnvFree = nnnn (128): Sets the minimum amount of memory in bytes that
  7186. will be available in the environment for secondary shells. 4DOS will
  7187. enlarge the environment for each secondary shell, if necessary, so that
  7188. there is at least this much free environment space when the shell starts. The
  7189. allowable range of values is 128 to 32767 bytes.
  7190. When launching a secondary shell, it may be useful to specify the directive
  7191. using the //iniline syntax:
  7192. c:\4dos\4dos.com //envfree=2048 /c%_batchname
  7193. See 352Starting 4DOS for an explanation of //iniline.
  7194. ;---------------------------------------------------------------------------
  7195. !TOPIC 379 Function
  7196. !NOINDEX
  7197. !TTY
  7198. Function = nnnn (1024): Sets the amount of memory in bytes allocated for
  7199. the function list. The allowable range of values is 256 to 32767 bytes. If
  7200. you use a global function list, the Function value is ignored in all shells
  7201. except the shell which first establishes the global list.
  7202. ;---------------------------------------------------------------------------
  7203. !TOPIC 380 HelpOptions
  7204. !NOINDEX
  7205. !TTY
  7206. HelpOptions = String: Sets default options for the 4DOS help system. The
  7207. options are:
  7208. !INDENT 5 5 0 5
  7209. /E: (Esc) Changes the Esc key and right mouse button so that they
  7210. return you to the table of contents immediately, rather than backing up
  7211. through recently viewed topics.
  7212. /F: (Full screen index) Forces the index to occupy the entire screen.
  7213. Primarily included for the convenience of blind users, to prevent speech
  7214. software from reading the underlying screen when the index is up.
  7215. /I: (Index) Starts the help system at the index page, rather than
  7216. the Table of Contents.
  7217. /L: (Lock scrolling) Changes the behavior of the up and down arrow
  7218. keys so that they always scroll the text, and do not move the
  7219. cross-reference highlight first.
  7220. /M: (Monochrome) Forces HELP to use monochrome display mode.
  7221. /Sn: (Speed) Sets the HELP mouse movement speed. /S0 sets the
  7222. speed to one half the default mouse speed. /S2 sets it to twice the
  7223. default, and /S4 sets it to four times the default. The higher values
  7224. may be useful if you use a screen larger than the standard size of 80
  7225. x 25.
  7226. /X: Disable the mouse while HELP is running.
  7227. !INDENT 0
  7228. For more information and examples, see 014Help Reference.
  7229. ;---------------------------------------------------------------------------
  7230. !TOPIC 381 HelpPath
  7231. !NOINDEX
  7232. !TTY
  7233. HelpPath = Path: This directive is obsolete. It has been replaced by
  7234. 384InstallPath.
  7235. ;---------------------------------------------------------------------------
  7236. !TOPIC 382 History
  7237. !NOINDEX
  7238. !TTY
  7239. History = nnnn (1024): Sets the amount of memory allocated to the
  7240. command history list in bytes. The allowable range of values is 256 to
  7241. 8192 bytes. If you use a global history list (see 033Command History
  7242. and Recall), the History value is ignored in all shells except the shell
  7243. which first establishes the global list.
  7244. ;---------------------------------------------------------------------------
  7245. !TOPIC 383 INIQuery
  7246. !NOINDEX
  7247. !TTY
  7248. INIQuery = Yes | NO: If set to Yes, a prompt will be displayed
  7249. before execution of each subsequent line in the current .INI file. This
  7250. allows you to modify certain directives when you start 4DOS in order to
  7251. test different configurations. INIQuery can be reset to No at any
  7252. point in the file. Normally INIQuery = Yes is only used during testing of
  7253. other 4DOS.INI directives.
  7254. !TTY
  7255. The prompt generated by INIQuery = Yes is:
  7256. [contents of the line] (Y/N/Q/R/E) ?
  7257. At this prompt, you may enter:
  7258. Y = Yes: Process this line and go on to the next.
  7259. N = No: Skip this line and go on to the next.
  7260. Q = Quit: Skip this line and all subsequent lines.
  7261. R = Rest: Execute this and all subsequent lines.
  7262. E = Edit: Prompt for a new value for this entry.
  7263. If you choose E for Edit, you can enter a new value for the directive, but
  7264. not a new directive name.
  7265. For example, if you have found a compatibility problem you think may be
  7266. related to 4DOS's swapping or upper memory block usage, you might change
  7267. your 4DOS.INI file so a part of it read as follows:
  7268. INIQuery = Yes
  7269. Swapping = XMS, EMS, C:\
  7270. UMBLoad = Yes
  7271. UMBEnvironment = Yes
  7272. INIQuery = No
  7273. You could then choose to process, ignore, or edit the Swapping, 398UMBLoad,
  7274. or 395UMBEnvironment directive each time 4DOS started. This would allow
  7275. you to test several possible combinations to see if you could resolve the
  7276. compatibility problem.
  7277. ;---------------------------------------------------------------------------
  7278. !TOPIC 384 InstallPath
  7279. !NOINDEX
  7280. !TTY
  7281. InstallPath = Path: Sets the path used to find the help system,
  7282. OPTION.EXE, and other 4DOS files. This directive is normally set by
  7283. the installation program, and should not be changed unless you move the 4DOS
  7284. files to a different directory.
  7285. You can use the 648OPTION //optname=value syntax to change this setting
  7286. (See also: 381HelpPath.)
  7287. ;---------------------------------------------------------------------------
  7288. !TOPIC 385 LocalAliases
  7289. !NOINDEX
  7290. !TTY
  7291. LocalAliases = YES | No: No forces all copies of 4DOS to share the
  7292. same alias list. Yes keeps the lists for each shell separate. See
  7293. 595ALIAS for more details on local and global alias lists.
  7294. ;---------------------------------------------------------------------------
  7295. !TOPIC 386 LocalDirHistory
  7296. !NOINDEX
  7297. !TTY
  7298. LocalDirHistory = YES | No: No forces all copies of 4DOS to
  7299. share the same directory history. Yes keeps the directory histories for
  7300. each shell separate. See 040Directory History Window for more details on
  7301. local and global directory histories.
  7302. ;---------------------------------------------------------------------------
  7303. !TOPIC 387 LocalFunctions
  7304. !NOINDEX
  7305. !TTY
  7306. LocalFunctions = YES | No: No forces all copies of 4DOS to share the
  7307. same user-defined functions list. Yes keeps the lists for each shell
  7308. separate.
  7309. ;---------------------------------------------------------------------------
  7310. !TOPIC 388 LocalHistory
  7311. !NOINDEX
  7312. !TTY
  7313. LocalHistory = YES | No: No forces all copies of 4DOS to share the
  7314. same history list. Yes keeps the lists for each shell separate. See
  7315. 033Command History and Recall for more details on local and global
  7316. history lists.
  7317. ;---------------------------------------------------------------------------
  7318. !TOPIC 389 PauseOnError
  7319. !NOINDEX
  7320. !TTY
  7321. PauseOnError = YES | No: Yes forces a pause with the message
  7322. "Error in filename, press any key to continue processing" after displaying
  7323. any error message related to a specific line in 4DOS.INI. No continues
  7324. processing with no pause after an error message is displayed.
  7325. ;---------------------------------------------------------------------------
  7326. !TOPIC 390 REXXPath
  7327. !NOINDEX
  7328. !TTY
  7329. REXXPath = File: Specifies the program that 4DOS will use to execute .BAT
  7330. files that begin with the characters [/*]. Specify a full path and
  7331. filename if the program is not in your 138PATH.
  7332. Under PC DOS 7.0 and above, REXXPath defaults to REXX.EXE, the REXX
  7333. interpreter included with the operating system. If REXX.EXE is not in your
  7334. PATH under PC DOS 7.0 or above, you must use this directive to specify the
  7335. location of the REXX interpreter.
  7336. See 116REXX Support for more details.
  7337. ;---------------------------------------------------------------------------
  7338. !TOPIC 391 Swapping
  7339. !NOINDEX
  7340. !TTY
  7341. Swapping = swap type [, swap type] ...: Sets the type of swapping 4DOS
  7342. should use. 4DOS runs in two parts, a resident portion that is always in
  7343. memory and a transient portion that is "swapped" to EMS memory, XMS memory,
  7344. a RAM disk, or your hard disk while application programs are running. The
  7345. swap area for the transient portion normally requires about 245K bytes of
  7346. memory or disk space for the primary shell, and 60K bytes for each
  7347. secondary shell (unless you set 575SwapReopen = Yes).
  7348. !TTY
  7349. The swap types can be any of the following:
  7350. !INDENT 5 5 5 5
  7351. EMS: 4DOS will swap to EMS expanded memory if it is available.
  7352. XMS: 4DOS will swap to XMS extended memory if it is available.
  7353. Note: 4DOS will actually be swapped out of DOS completely by vDosPlus.
  7354. d:\path: 4DOS will create a swap file in the drive and directory
  7355. specified. The file will be called 4DOSSWAP.nnn where "nnn" is the
  7356. shell number (unless you use the 576UniqueSwapName to generate a
  7357. unique swap file name). This swap file is created as a hidden system
  7358. file to avoid accidental deletion and will not be visible with a
  7359. normal DIR command.
  7360. None: No swapping. The transient portion of 4DOS will remain in
  7361. memory at all times. This option will reduce memory available for
  7362. application programs by about 245K compared to the other swap types,
  7363. and should not be needed in vDosPlus.
  7364. !INDENT 0
  7365. You can specify multiple swap types and 4DOS will try them in the order
  7366. listed. Swap type "None" is always appended to your list of possible swap
  7367. types as a "last resort," even if you don't include it explicitly. This
  7368. allows 4DOS to start even if the other swap types you specify don't work.
  7369. For example:
  7370. Swapping = EMS, D:\, C:\SWAP
  7371. tells 4DOS to try EMS memory first, then the D: disk, and finally the
  7372. \SWAP directory on drive C. If all of these options fail (because there
  7373. isn't enough free space available), the transient portion of 4DOS will
  7374. remain in memory (swap type "None").
  7375. The default Swapping specification is:
  7376. Swapping = EMS, XMS, x:\, None
  7377. where "x" is C (for the primary shell) or the 134COMSPEC
  7378. drive (for secondary shells).
  7379. After 4DOS starts, you can use the 668SWAPPING command to view the
  7380. type of swapping in use.
  7381. ;---------------------------------------------------------------------------
  7382. !TOPIC 392 TreePath
  7383. !NOINDEX
  7384. !TTY
  7385. TreePath = Path: Sets the location of JPSTREE.IDX, the file used
  7386. for 048extended directory searches. By default, the file is placed in
  7387. the root directory of drive C:\.
  7388. ;---------------------------------------------------------------------------
  7389. !TOPIC 393 UMBAlias
  7390. !NOINDEX
  7391. !TTY
  7392. UMBAlias = Yes | NO | 1 | 2 ... | 8: Yes attempts to load global
  7393. alias list storage into a UMB (Upper Memory Block). If you use a specific
  7394. region number (1 through 8), 4DOS will attempt to reserve room for
  7395. the global alias list in that UMB region.
  7396. !TTY
  7397. If you use an invalid region number, or if region numbers have not been
  7398. enabled on your system, 4DOS will load the global alias list into the first
  7399. available region. If no upper memory is available, space for the global
  7400. alias list will be reserved in low memory.
  7401. UMBAlias applies to global aliases only, and is only used in the first
  7402. shell which establishes the global alias area (see 595ALIAS for more
  7403. information on local and global alias lists). If you specify
  7404. 385LocalAliases = Yes, or if the previous shell already created a global
  7405. alias area, any UMBAlias setting is ignored.
  7406. ;---------------------------------------------------------------------------
  7407. !TOPIC 394 UMBDirHistory
  7408. !NOINDEX
  7409. !TTY
  7410. UMBDirHistory = Yes | NO | 1 | 2 ... | 8: Yes attempts to load global
  7411. directory history list storage into a UMB (Upper Memory Block). See
  7412. 040Directory History Window for more details on local and global
  7413. directory histories.
  7414. If you use an invalid region number, or if region numbers have not been
  7415. enabled on your system, 4DOS will load the global directory history list
  7416. into the first available region. If no upper memory is available, space for
  7417. the global directory history list will be reserved in low memory.
  7418. UMBDirHistory applies to global directory history only, and is only used in
  7419. the first shell which establishes the global directory history area (see
  7420. 040Directory History Window for more information on local and global
  7421. directory history lists). If you specify 386LocalDirHistory = Yes, or if
  7422. the previous shell already created a global directory history area, any
  7423. UMBDirHistory setting is ignored.
  7424. ;---------------------------------------------------------------------------
  7425. !TOPIC 395 UMBEnvironment
  7426. !NOINDEX
  7427. !TTY
  7428. UMBEnvironment = Yes | NO | 1 | 2 ... | 8: Yes attempts to load
  7429. the master environment into a UMB (Upper Memory Block). This reduces
  7430. 4DOS's base memory requirements but may cause problems with some programs
  7431. that try to access the master environment directly.
  7432. If you use an invalid region number, or if region numbers have not been
  7433. enabled on your system, 4DOS will load the environment into the first
  7434. available region. If no upper memory is available, space for the environment
  7435. will be reserved in low memory.
  7436. ;---------------------------------------------------------------------------
  7437. !TOPIC 396 UMBFunction
  7438. !NOINDEX
  7439. !TTY
  7440. UMBFunction = Yes | NO | 1 | 2 ... | 8: Yes attempts to load global
  7441. function list storage into a UMB (Upper Memory Block). If you use a
  7442. specific region number (1 through 8), 4DOS will attempt to reserve room for
  7443. the global function list in that UMB region.
  7444. If you use an invalid region number, or if region numbers have not been
  7445. enabled on your system, 4DOS will load the function list into the first
  7446. available region. If no upper memory is available, space for the function
  7447. list will be reserved in low memory.
  7448. UMBFunction applies to global functions only, and is only used in the
  7449. first shell which establishes the global function area. If you specify
  7450. 385LocalFunctions = Yes, or if the previous shell already created a
  7451. global function area, any UMBFunction setting is ignored.
  7452. ;---------------------------------------------------------------------------
  7453. !TOPIC 397 UMBHistory
  7454. !NOINDEX
  7455. !TTY
  7456. UMBHistory = Yes | NO | 1 | 2 ... | 8: Yes attempts to load global
  7457. history list storage into a UMB (Upper Memory Block). If you use a
  7458. specific region number (1 through 8), 4DOS will attempt to reserve room for
  7459. the global history list in that UMB region.
  7460. If you use an invalid region number, or if region numbers have not been
  7461. enabled on your system, 4DOS will load the history list into the first
  7462. available region. If no upper memory is available, space for the history list
  7463. will be reserved in low memory.
  7464. UMBHistory applies to global history only, and is only used in the
  7465. first shell which establishes the global history area (see
  7466. 033Command History and Recall for more information on local and global
  7467. history lists). If you specify 388LocalHistory = Yes, or if
  7468. the previous shell already created a global history area, any UMBHistory
  7469. setting is ignored.
  7470. ;---------------------------------------------------------------------------
  7471. !TOPIC 398 UMBLoad
  7472. !NOINDEX
  7473. !TTY
  7474. UMBLoad = Yes | NO | 1 | 2 ... | 8: Yes attempts to load the
  7475. resident portion of 4DOS into a UMB (Upper Memory Block). This reduces the
  7476. size of the resident portion in base memory from about 3K bytes to 256
  7477. bytes.
  7478. If you use an invalid region number, or if region numbers have not been
  7479. enabled on your system, 4DOS will load it's resident portion into the first
  7480. available region. If no upper memory is available, space for the resident
  7481. portion will be reserved in low memory.
  7482. ;---------------------------------------------------------------------------
  7483. !TOPIC 410 Configuration Directives
  7484. !NOINDEX
  7485.  411AmPm Time display format
  7486. 412ANSI ANSI driver state
  7487.  413AppendToDir "\" on directory names in filename completion
  7488. 414BatchEcho Default batch file echo state
  7489.  415BeepFreq Default beep frequency
  7490.  416BeepLength Default beep length
  7491.  417CDDWinHeight Position and size of the popup window used
  7492.  417CDDWinLeft by extended directory searches
  7493.  417CDDWinTop "
  7494.  417CDDWinWidth "
  7495. 418CommandSep Multiple command separator character
  7496.  472CompleteHidden Filename completion of hidden/system files
  7497.  450CopyPrompt Prompt before overwriting existing files
  7498. 419CursorIns Cursor shape in insert mode
  7499. 420CursorOver Cursor shape in overstrike mode
  7500. 421DecimalChar Decimal separator
  7501.  422DescriptionMax Maximum length of file descriptions
  7502. 423DescriptionName Name of file to hold file descriptions
  7503. 424Descriptions Enable / disable description processing
  7504. 425EditMode Editing mode (insert / overstrike)
  7505. 426EscapeChar 4DOS escape character
  7506. 427EvalMax Max digits after decimal point in @EVAL
  7507. 428EvalMin Min digits after decimal point in @EVAL
  7508. 429FileCompletion Filename completion by extension
  7509.  430FuzzyCD Selects Extended Directory Search mode
  7510.  431HistCopy History copy mode
  7511.  451HistDups History duplicate removal
  7512. 432HistLogName History log file name
  7513.  433HistMin Minimum command length to save
  7514.  434HistMove History move mode
  7515.  435HistWrap History wrap mode
  7516. 436LineInput Enable / disable line input mode
  7517.  475ListRowStart Starting row number for LIST and FFIND
  7518.  473LogErrors Write errors to log file
  7519. 437LogName Log file name
  7520. 474Mouse Enable / disable mouse for popup boxes
  7521. 438NoClobber Overwrite protection for output redirection
  7522. 439ParameterChar Alias / function / batch file parameter character
  7523.  477PathExt Enable or disable the PATHEXT variable
  7524.  440PopupWinHeight Position and size of the popup windows used
  7525.  440PopupWinLeft for the command history, directory history,
  7526.  440PopupWinTop and filename completion
  7527.  440PopupWinWidth "
  7528.  441Printer LIST print device
  7529.  442ScreenColumns Screen width
  7530.  443ScreenRows Screen height
  7531.  444TabStops Tab width in LIST
  7532. 445ThousandsChar Thousands separator
  7533.  476UnixPaths Enable or disable slash in command paths
  7534. 446UpperCase Force file names to upper case
  7535.  447Win95SFNSearch Control short filename search
  7536. Directives marked with a  may be dynamically changed at the command line
  7537. using the 648OPTION //optname=value syntax. If a directive does not
  7538. have this mark there is probably some simpler way to change it, such as
  7539. options to the 664SETDOS or 643LOG command, or the 137FILECOMPLETION
  7540. environment variable.
  7541. Most of the configuration directives can be easily adjusted using the
  7542. interactive 648OPTION dialogs. The exceptions are 423DescriptionName,
  7543. 436LineInput, 475ListRowStart, and 477PathExt.
  7544. ;---------------------------------------------------------------------------
  7545. !TOPIC 411 AmPm
  7546. !NOINDEX
  7547. !TTY
  7548. AmPm = Yes | NO | Auto: Yes displays times in 12-hour format with
  7549. a trailing "a" for AM or "p" for PM. The default of No forces a
  7550. display in 24-hour time format. Auto formats the time according to the
  7551. country code set for your system. AmPm controls the time displays used by
  7552. 612DIR and 662SELECT, in 643LOG files, and the output of
  7553. the 673TIMER, 608DATE, and 672TIME commands. It has no
  7554. effect on 219%_TIME, 303%@MAKETIME, the $t and $T options of
  7555. 652PROMPT, or date and time 074ranges.
  7556. ;---------------------------------------------------------------------------
  7557. !TOPIC 412 ANSI
  7558. !NOINDEX
  7559. !TTY
  7560. ANSI = AUTO | Yes | No: Tells 4DOS whether an ANSI driver is installed
  7561. and should be used for the 604CLS and 605COLOR commands. 4DOS
  7562. normally determines this itself, but you may need to
  7563. explicitly inform 4DOS. Also see 664SETDOS /A.
  7564. ;---------------------------------------------------------------------------
  7565. !TOPIC 413 AppendToDir
  7566. !NOINDEX
  7567. !TTY
  7568. AppendToDir = Yes | NO: If set to Yes, a trailing "\" will be
  7569. appended to directory names when doing filename completion. The
  7570. default is No. (Regardless of the setting of this directive, a trailing
  7571. backslash is always appended to a directory name at the beginning of the
  7572. command line to enable automatic directory changes.)
  7573. ;---------------------------------------------------------------------------
  7574. !TOPIC 414 BatchEcho
  7575. !NOINDEX
  7576. !TTY
  7577. BatchEcho = YES | No: Sets the default batch echo mode. Yes
  7578. enables echoing of all batch file commands unless 619ECHO is
  7579. explicitly set off in the batch file. No disables batch file echoing
  7580. unless ECHO is explicitly set on. Also see 664SETDOS /V.
  7581. ;---------------------------------------------------------------------------
  7582. !TOPIC 415 BeepFreq
  7583. !NOINDEX
  7584. !TTY
  7585. BeepFreq = nnnn (440): Sets the default 597BEEP command
  7586. frequency in Hz. This is also the frequency for "error" beeps (for
  7587. example, if you press an illegal key). To disable all error beeps set this
  7588. or 416BeepLength to 0. If you do, the BEEP command will not produce
  7589. sound unless you explicitly specify a frequency and duration.
  7590. ;---------------------------------------------------------------------------
  7591. !TOPIC 416 BeepLength
  7592. !NOINDEX
  7593. !TTY
  7594. BeepLength = nnnn (2): Sets the default 597BEEP length in
  7595. system clock ticks (approximately 1/18 of a second per tick). BeepLength
  7596. is also the default length for "error" beeps (for example, if you press an
  7597. illegal key). To disable all error beeps set this or 415BeepFreq to
  7598. 0. If you do, the BEEP command will not produce sound unless you explicitly
  7599. specify a frequency and duration.
  7600. ;---------------------------------------------------------------------------
  7601. !TOPIC 417 CDDWin Directives
  7602. !NOINDEX
  7603. !TTY
  7604. CDDWinLeft = nnnn, CDDWinTop = nnnn, CDDWinWidth = nnnn,
  7605. CDDWinHeight = nnnn: These numeric values set the position and size of
  7606. the popup window used by 048extended directory searches, in characters,
  7607. including the border. The defaults are 3, 3, 72, and 16, respectively
  7608. (i.e., a window
  7609. beginning in column 3, row 3, 72 columns wide and 16 rows high). The
  7610. position is relative to the top left corner of the screen. The width and
  7611. height values include the space required for the window border. The window
  7612. cannot be smaller than than 10 columns wide by 5 rows high (including the
  7613. border). The values you enter will be adjusted if necessary to keep a
  7614. minimum-size window visible on the screen.
  7615. The window is normally displayed with a shadow, but if you specify a window
  7616. starting at column 0 and extending to the right margin, the shadow is
  7617. eliminated; this may be useful to prevent speech software from reading text
  7618. in the shadow area while viewing the window.
  7619. ;---------------------------------------------------------------------------
  7620. !TOPIC 418 CommandSep
  7621. !NOINDEX
  7622. !TTY
  7623. CommandSep = c (^): This is the character used to separate 041multiple
  7624. commands on the same line. The default is the caret [^]. You cannot
  7625. use any of the redirection characters [<>|] or any of the
  7626. whitespace characters (space, tab, comma, or equal sign). The command
  7627. separator is saved by 665SETLOCAL and restored by 621ENDLOCAL.
  7628. Also see 664SETDOS /C, the 166%+ internal variable,
  7629. and 054Special Character Compatibility for information on using
  7630. compatible command separators for two or more products.
  7631. ;---------------------------------------------------------------------------
  7632. !TOPIC 472 CompleteHidden
  7633. !NOINDEX
  7634. !TTY
  7635. CompleteHidden = Yes | NO: If set to YES, filename completion will
  7636. return hidden and system files and directories, and CDD /S will include
  7637. hidden directories when indexing.
  7638. ;---------------------------------------------------------------------------
  7639. !TOPIC 450 CopyPrompt
  7640. !NOINDEX
  7641. !TTY
  7642. CopyPrompt = Yes | NO: If set to Yes, a 606COPY or 646MOVE will
  7643. prompt before overwriting an existing file if the command is being performed
  7644. at the command prompt. This duplicates the behavior of later versions of
  7645. COMMAND.COM and CMD.EXE. See also the environment variable 135COPYCMD.
  7646. ;---------------------------------------------------------------------------
  7647. !TOPIC 419 CursorIns
  7648. !NOINDEX
  7649. !TTY
  7650. CursorIns = nnnn (100): This is the shape of the cursor for insert mode
  7651. during command-line editing and all commands which accept line input
  7652. (DESCRIBE, ESET, etc.). The size is a percentage of the total character
  7653. cell size, between 0% and 100%. Because of the way video BIOSes and drivers
  7654. map the cursor shape, you may not get a smooth progression in cursor shapes
  7655. as CursorIns and CursorOver change.
  7656. If CursorIns or CursorOver is set to -1, 4DOS will not
  7657. attempt to modify the cursor shape at all; you can use this feature to give
  7658. another program full control of the cursor shape.
  7659. Also see 420CursorOver and 664SETDOS /S.
  7660. ;---------------------------------------------------------------------------
  7661. !TOPIC 420 CursorOver
  7662. !NOINDEX
  7663. !TTY
  7664. CursorOver = nnnn (15): This is the shape of the cursor for overstrike
  7665. mode during command-line editing and all commands which accept line
  7666. input. The size is a percentage of the total character cell size, between
  7667. 0% and 100%.
  7668. Also see 419CursorIns and 664SETDOS /S.
  7669. ;---------------------------------------------------------------------------
  7670. !TOPIC 421 DecimalChar
  7671. !NOINDEX
  7672. !TTY
  7673. DecimalChar = . | , | AUTO: Sets the character used as the decimal
  7674. separator for 263@EVAL, numeric 633IF and 634IFF tests, version
  7675. numbers, and other similar uses. The only valid settings are period [.],
  7676. comma [,], and Auto (the default). A setting of Auto tells 4DOS
  7677. to use the decimal separator associated with your current country
  7678. code. If you change the decimal character you must also adjust the
  7679. thousands character (with 445ThousandsChar) so that the two characters
  7680. are different.
  7681. Also see 664SETDOS /G.
  7682. ;---------------------------------------------------------------------------
  7683. !TOPIC 422 DescriptionMax
  7684. !NOINDEX
  7685. !TTY
  7686. DescriptionMax = nnnn (40): Controls the description length limit for
  7687. 611DESCRIBE. The allowable range is 20 to 511 characters.
  7688. ;---------------------------------------------------------------------------
  7689. !TOPIC 423 DescriptionName
  7690. !NOINDEX
  7691. !TTY
  7692. DescriptionName = File: Sets the file name in which to store file
  7693. descriptions. The default file name is DESCRIPT.ION. Use this directive
  7694. with caution because changing the name from the default will make it
  7695. difficult to transfer file descriptions to another system.
  7696. Also see 664SETDOS /D.
  7697. ;---------------------------------------------------------------------------
  7698. !TOPIC 424 Descriptions
  7699. !NOINDEX
  7700. !TTY
  7701. Descriptions = YES | No: Turns description handling on or off during
  7702. the file processing commands COPY, DEL, MOVE, and REN. If set to No,
  7703. 4DOS will not update the description file when files are moved, copied,
  7704. deleted or renamed. Also see 664SETDOS /D.
  7705. ;---------------------------------------------------------------------------
  7706. !TOPIC 425 EditMode
  7707. !NOINDEX
  7708. !TTY
  7709. EditMode = Insert | OVERSTRIKE | InitOverstrike | InitInsert: This
  7710. directive lets you start the command-line editor in either Insert or
  7711. Overstrike mode. If you specify InitOverstrike or InitInsert, the command
  7712. line editor will start in the specified state, but if you toggle insert
  7713. mode while editing a line, the editor will continue to use the new mode
  7714. on subsequent lines. Also see 664SETDOS /M.
  7715. ;---------------------------------------------------------------------------
  7716. !TOPIC 426 EscapeChar
  7717. !NOINDEX
  7718. !TTY
  7719. EscapeChar = c (Ctrl-X): Sets the character used to suppress the
  7720. normal meaning of the following character. The default is
  7721. Ctrl-X [<Ctrl-X>]. See 086Escape Character for a description of special escape
  7722. sequences. You cannot use any of the redirection characters
  7723. [<>|] or the whitespace characters (space, tab, comma,
  7724. or equal sign) as the escape character. The escape character is saved by
  7725. 665SETLOCAL and restored by 621ENDLOCAL.
  7726. Also see 664SETDOS /E, the 165%= internal variable, and 054Special
  7727. Character Compatibility for information on using
  7728. compatible escape characters for two or more products.
  7729. ;---------------------------------------------------------------------------
  7730. !TOPIC 427 EvalMax
  7731. !NOINDEX
  7732. !TTY
  7733. EvalMax = nnnn (10): Controls the maximum number of digits after
  7734. the decimal point in values returned by 263@EVAL. This setting
  7735. can be overridden with the construct @EVAL[expression=n.n]. The
  7736. allowable range is 0 to 10. Also see 664SETDOS /F.
  7737. ;---------------------------------------------------------------------------
  7738. !TOPIC 428 EvalMin
  7739. !NOINDEX
  7740. !TTY
  7741. EvalMin = nnnn (0): Controls the minimum number of digits after
  7742. the decimal point in values returned by 263@EVAL. The allowable
  7743. range is 0 to 10. This directive will be ignored if EvalMin is
  7744. larger than 427EvalMax. This setting can be overridden with the
  7745. construct @EVAL[expression=n.n]. Also see 664SETDOS /F.
  7746. ;---------------------------------------------------------------------------
  7747. !TOPIC 429 FileCompletion
  7748. !NOINDEX
  7749. !TTY
  7750. FileCompletion = cmd1: ext1 ext2 ...; cmd2: ext3 ext4 ... Sets the files
  7751. made available during 035filename completion for selected commands. The
  7752. format is the same as that used for the 137FILECOMPLETION environment
  7753. variable.
  7754. ;---------------------------------------------------------------------------
  7755. !TOPIC 430 FuzzyCD
  7756. !NOINDEX
  7757. !TTY
  7758. FuzzyCD = 0 | 1 | 2 | 3: Enables or disables extended directory searches,
  7759. and controls their behavior. A setting of 0 (the default) disables extended
  7760. searches. For complete details on the meaning of the other settings see
  7761. 048Extended Directory Searches.
  7762. ;---------------------------------------------------------------------------
  7763. !TOPIC 431 HistCopy
  7764. !NOINDEX
  7765. !TTY
  7766. HistCopy = Yes | NO: Controls what happens when you re-execute a line
  7767. from the command history. If this option is set to Yes, the line is
  7768. appended to the end of the history list. By default, or if this option is
  7769. set to No, the command is not copied. The original copy of the
  7770. command is retained at its original position in the list, regardless
  7771. of the setting of HistCopy.
  7772. Set this option to No if you want to use 434HistMove = Yes; otherwise,
  7773. the HistCopy setting will override HistMove.
  7774. ;---------------------------------------------------------------------------
  7775. !TOPIC 451 HistDups
  7776. !NOINDEX
  7777. !TTY
  7778. HistDups = OFF | First | Last: Controls the history list duplicate
  7779. removal. If this option is set to First, and a new entry matches an older
  7780. one, the old entry is preserved and the new entry discarded. If set to
  7781. Last, the new entry is saved and the old entry deleted. If set to Off,
  7782. everything is saved to the history.
  7783. ;---------------------------------------------------------------------------
  7784. !TOPIC 432 HistLogName
  7785. !NOINDEX
  7786. !TTY
  7787. HistLogName = File: Sets the history log file name, and optionally its
  7788. location. If no path is specified, the history log will be created in the
  7789. root directory of C:. Using HistLogName does not turn history
  7790. logging on; you must use a 643LOG /H ON command to do so.
  7791. You can use the 648OPTION //optname=value syntax to change this setting
  7792. ;---------------------------------------------------------------------------
  7793. !TOPIC 433 HistMin
  7794. !NOINDEX
  7795. !TTY
  7796. HistMin = nnnn (0): Sets the minimum command-line size to save in the
  7797. command history list. Any command line whose length is less than this
  7798. value will not be saved. Legal values range from 0, which saves
  7799. everything, to 256. You can prevent any command line from being saved in
  7800. the history by beginning it with an at sign [@].
  7801. See also 033Command History and Recall, the 034Command History Window,
  7802. and the 632HISTORY command.
  7803. ;---------------------------------------------------------------------------
  7804. !TOPIC 434 HistMove
  7805. !NOINDEX
  7806. !TTY
  7807. HistMove = Yes | NO: If set to Yes, a recalled line is moved to the end
  7808. of the command history. The difference between this directive and
  7809. 431HistCopy is that HistCopy = Yes copies each recalled line to
  7810. the end of the history but leaves the original in place. HistMove = Yes
  7811. places the line at the end of history and removes the original line.
  7812. This directive has no effect if HistCopy = Yes.
  7813. ;---------------------------------------------------------------------------
  7814. !TOPIC 435 HistWrap
  7815. !NOINDEX
  7816. !TTY
  7817. HistWrap = YES | No: Controls whether the command history recall "wraps"
  7818. when you reach the top or bottom of the list. The default setting enables
  7819. wrapping, so the list appears "circular." If HistWrap is set to No, history
  7820. recall will stop at the beginning and end of the list rather than
  7821. wrapping. This setting affects history recall at the prompt only; the
  7822. command history window never wraps.
  7823. ;---------------------------------------------------------------------------
  7824. !TOPIC 436 LineInput
  7825. !NOINDEX
  7826. !TTY
  7827. LineInput = Yes | NO: This directive controls how 4DOS gets its input
  7828. from the command line. Yes forces 4DOS to perform line-by-line input,
  7829. just as COMMAND.COM and CMD.EXE do, instead of character-by-character
  7830. input. This will disable command-line editing, history recall, the
  7831. directory history window, and filename completion. It is normally used
  7832. only for rare memory-resident programs (TSRs) or applications which do not
  7833. work properly unless 4DOS uses line input. If you have a particular
  7834. program that requires line input, you can use 664SETDOS /L to
  7835. temporarily change modes.
  7836. See 751Compatibility for information on any programs which require this
  7837. option.
  7838. ;---------------------------------------------------------------------------
  7839. !TOPIC 475 ListRowStart
  7840. !NOINDEX
  7841. !TTY
  7842. ListRowStart = 1 | 0: Specifies whether 640LIST and 625FFIND consider
  7843. the first line in the file to be line "1" or line "0". The default is "1".
  7844. ;---------------------------------------------------------------------------
  7845. !TOPIC 473 LogErrors
  7846. !NOINDEX
  7847. !TTY
  7848. LogErrors = Yes | NO: If set to Yes, error messages will be written to
  7849. the log file.
  7850. ;---------------------------------------------------------------------------
  7851. !TOPIC 437 LogName
  7852. !NOINDEX
  7853. !TTY
  7854. LogName = File: Sets the log file name, and optionally its location. If
  7855. no path is specified, the log file will be created in the root directory of
  7856. C:. Using LogName does not turn logging on; you must use a
  7857. 643LOG ON command to do so.
  7858. You can use the 648OPTION //optname=value syntax to change this setting
  7859. ;---------------------------------------------------------------------------
  7860. !TOPIC 474 Mouse
  7861. !NOINDEX
  7862. !TTY
  7863. Mouse = AUTO | yes | no: Specifies whether a mouse is available for
  7864. popup boxes. If you don't have a mouse, or if the driver takes a long
  7865. time for the query/reset call, you should explicitly set this value to No.
  7866. ;---------------------------------------------------------------------------
  7867. !TOPIC 438 NoClobber
  7868. !NOINDEX
  7869. !TTY
  7870. NoClobber = Yes | NO: If set to Yes, will prevent standard output
  7871. 050redirection from overwriting an existing file, and will require
  7872. that the output file already exist for append redirection.
  7873. Also see 664SETDOS /N.
  7874. ;---------------------------------------------------------------------------
  7875. !TOPIC 439 ParameterChar
  7876. !NOINDEX
  7877. !TTY
  7878. ParameterChar = c (&): Sets the character used after a percent sign to
  7879. specify all or all remaining command-line arguments in a batch file, alias,
  7880. or user-defined function (e.g., %& or %n&; see 102Batch Files,
  7881. 595ALIAS, and 696FUNCTION). The default is the ampersand [&].
  7882. The parameter character is saved by 665SETLOCAL and restored by
  7883. 621ENDLOCAL.
  7884. Also see 664SETDOS /P. See 054Special Character Compatibility for
  7885. information on using compatible parameter characters for two or more
  7886. products.
  7887. ;---------------------------------------------------------------------------
  7888. !TOPIC 477 PathExt
  7889. !NOINDEX
  7890. !TTY
  7891. PathExt = NO | Yes: Determines whether 4DOS will use the PATHEXT
  7892. environment variable. If set to No (the default), the PATHEXT variable
  7893. is ignored. If set to Yes, the PATHEXT variable will be used to
  7894. determine extensions to look for when searching the 138PATH for an
  7895. executable file. For details, see the 143PATHEXT variable and the
  7896. 649PATH command.
  7897. CAUTION: If you set PathExt = Yes in 4DOS.INI and then fail to set the
  7898. PATHEXT variable, path searches will fail as there will be no extensions
  7899. for which to search!
  7900. PATHEXT is supported for compatibility reasons but should not generally
  7901. be used as a substitute for the more flexible 082executable
  7902. extensions feature.
  7903. ;---------------------------------------------------------------------------
  7904. !TOPIC 440 PopupWin Directives
  7905. !NOINDEX
  7906. !TTY
  7907. PopupWinLeft = nnnn, PopupWinTop = nnnn, PopupWinWidth = nnnn,
  7908. PopupWinHeight = nnnn: These numeric values set the position and size of
  7909. the command-line, directory history, and filename completion windows, and
  7910. most other popup windows (see 417CDDWinLeft etc. for the extended directory
  7911. search window). The values are in characters, and include the border.
  7912. The defaults are 40, 1, 36, and 12 respectively (i.e., a window beginning in
  7913. column 40, row 1, 36 columns wide and 12 rows high). The position is
  7914. relative to the top left corner of the screen. The width and height values
  7915. include the space required for the window border. The window cannot be
  7916. smaller than than 10 columns wide by 5 rows high (including the border). The
  7917. values you enter will be adjusted if necessary to keep a minimum-size window
  7918. visible on the screen.
  7919. The window is normally displayed with a shadow, but if you specify a window
  7920. starting at column 0 and extending to the right margin, the shadow is
  7921. eliminated; this may be useful to prevent speech software from reading text
  7922. in the shadow area while viewing the window.
  7923. ;---------------------------------------------------------------------------
  7924. !TOPIC 441 Printer
  7925. !NOINDEX
  7926. !TTY
  7927. Printer = devicename: Sets the output device that the 640LIST
  7928. command will print to. By default, LPT1 is used. The device can be PRN,
  7929. LPT1 to 9, AUX, COM1 to 9, NUL (which will disable printed output). PRN
  7930. usually defaults to LPT1 and AUX to COM1.
  7931. ;---------------------------------------------------------------------------
  7932. !TOPIC 442 ScreenColumns
  7933. !NOINDEX
  7934. !TTY
  7935. ScreenColumns = nnnn: Sets the number of columns used by the video
  7936. display. Normally the screen size is determined automatically, but if you
  7937. have a non-standard display you may need to set it explicitly. Systems
  7938. which need to set 572OutputBIOS to Yes may also need to use this
  7939. directive.
  7940. ;---------------------------------------------------------------------------
  7941. !TOPIC 443 ScreenRows
  7942. !NOINDEX
  7943. !TTY
  7944. ScreenRows = nnnn: Sets the number of screen rows used by the video
  7945. display. Normally the screen size is determined automatically, but if you
  7946. have a non-standard display you may need to set it explicitly. This value
  7947. does not affect screen scrolling, which is controlled by your video BIOS.
  7948. ScreenRows is used only by the 640LIST and
  7949. 662SELECT commands, the paged output options of other commands (e.g.,
  7950. TYPE /P), and error checking in the screen output commands. Also see
  7951. 664SETDOS /R.
  7952. ;---------------------------------------------------------------------------
  7953. !TOPIC 444 TabStops
  7954. !NOINDEX
  7955. !TTY
  7956. TabStops = nnnn (8): Sets the tab stops for files displayed with the
  7957. 640LIST command. Setting TabStops=3, for example, will place a tab stop
  7958. in every third column. The allowable range is 1 to 32.
  7959. ;---------------------------------------------------------------------------
  7960. !TOPIC 445 ThousandsChar
  7961. !NOINDEX
  7962. !TTY
  7963. ThousandsChar = . | , | AUTO: Sets the character used as the thousands
  7964. separator for numeric output. The only valid settings are period [.],
  7965. comma [,], and Auto (the default). A setting of Auto tells 4DOS
  7966. to use the thousands separator associated with your current country
  7967. code. If you change the thousands character you must also adjust the decimal
  7968. character (with DecimalChar, see above) so that the two characters are
  7969. different.
  7970. Also see 664SETDOS /G.
  7971. ;---------------------------------------------------------------------------
  7972. !TOPIC 476 UnixPaths
  7973. !NOINDEX
  7974. !TTY
  7975. UnixPaths = Yes | NO: Enables the forward slash as a path separator
  7976. in the command name (the first item on the command line). This allows
  7977. you to enter a command like:
  7978. c:\> /bin/programs/foo.exe
  7979. without having the forward slashes interpreted as switch characters. Note
  7980. that setting UnixPaths to Yes does not change the 4DOS or operating system
  7981. switch character ('/' by default, unless changed by 664SETDOS /W). It
  7982. simply allows you to put forward slashes in the command name without
  7983. problems.
  7984. When UnixPaths is set to Yes command switches beginning with a forward
  7985. slash must be preceded by a space to avoid confusion (this is a good
  7986. general practice regardless of the setting of UnixPaths). For example:
  7987. c:\> \bin\foo.exe /c OK
  7988. c:\> /bin/foo.exe /c OK
  7989. c:\> \bin\foo.exe/c Error
  7990. c:\> /bin/foo.exe/c Error
  7991. ;---------------------------------------------------------------------------
  7992. !TOPIC 446 UpperCase
  7993. !NOINDEX
  7994. !TTY
  7995. UpperCase = Yes | NO: Yes specifies that file and directory names
  7996. should be displayed in the traditional upper-case by internal commands like
  7997. COPY and DIR. No allows the normal 4DOS lower-case style. This
  7998. directive does not affect the display of filenames on drives which support
  7999. long filenames (see 945File Names for additional details).
  8000. Also see 664SETDOS /U.
  8001. ;---------------------------------------------------------------------------
  8002. !TOPIC 447 Win95SFNSearch
  8003. !NOINDEX
  8004. !TTY
  8005. Win95SFNSearch = YES | No: Set to No to disable the automatic search
  8006. for short filenames after long filenames in Windows 95/98/ME. See
  8007. 081LFN File Searches.
  8008. ;---------------------------------------------------------------------------
  8009. !TOPIC 448 Color Directives
  8010. !NOINDEX
  8011. 461BrightBG Bright background colors
  8012.  462CDDWinColors Directory change window colors
  8013. 463ColorDir Directory colors
  8014.  465InputColors Input colors
  8015.  466ListboxBarColors Light bar color in list boxes
  8016.  467ListColors LIST display colors
  8017.  468ListStatBarColors LIST status bar colors
  8018.  464PopupWinColors Popup window colors
  8019.  469SelectColors SELECT display colors
  8020.  470SelectStatBarColors SELECT status bar colors
  8021.  471StdColors Standard display colors
  8022. Directives marked with a  may be dynamically changed at the command line
  8023. using the 648OPTION //optname=value syntax. Bright backgrounds or
  8024. blinking can be selected with 664SETDOS /B; the 133COLORDIR variable
  8025. provides an easy way to redefine directory colorization on the fly.
  8026. All of the color directives except for 466ListboxBarColors can be easily
  8027. adjusted using the interactive 648OPTION dialogs.
  8028. ;---------------------------------------------------------------------------
  8029. !TOPIC 461 BrightBG
  8030. !NOINDEX
  8031. !TTY
  8032. BrightBG = Yes | No. If set to Yes, 4DOS will enable bright
  8033. background colors. If set to No, bright backgrounds will be disabled,
  8034. but blinking foreground characters will be enabled. If BrightBG is not
  8035. used, 4DOS will not adjust the bright background / blinking foreground
  8036. switch at all. Most color video boards default to a blinking foreground
  8037. with bright background colors disabled. See also 664SETDOS /B.
  8038. !TTY
  8039. Using BrightBG requires careful attention to interactions of display type,
  8040. mode, and color. For a detailed explanation, see 892Colors and Color
  8041. Names.
  8042. ;---------------------------------------------------------------------------
  8043. !TOPIC 462 CDDWinColors
  8044. !NOINDEX
  8045. !TTY
  8046. CDDWinColors = Color: Sets the default colors for the
  8047. popup window used by 048extended directory searches. If this directive
  8048. is not used, the colors will be reversed from the current colors on the
  8049. screen.
  8050. ;---------------------------------------------------------------------------
  8051. !TOPIC 463 ColorDir
  8052. !NOINDEX
  8053. !TTY
  8054. ColorDir = ext1 ext2 ...:colora;ext3 ext4 ... :colorb; ...: Sets the
  8055. directory colors used by 612DIR and 662SELECT. The format is the same
  8056. as that used for the 133COLORDIR environment variable. See the
  8057. discussion of color-coded directories under DIR for more details.
  8058. ;---------------------------------------------------------------------------
  8059. !TOPIC 465 InputColors
  8060. !NOINDEX
  8061. !TTY
  8062. InputColors = Color: Sets the colors used for command-line input. This
  8063. setting is useful for making your input stand out from the normal
  8064. output.
  8065. ;---------------------------------------------------------------------------
  8066. !TOPIC 466 ListboxBarColors
  8067. !NOINDEX
  8068. !TTY
  8069. ListboxBarColors = Color: Sets the color for the highlight bar in the
  8070. popup list boxes (i.e., 034command history window,
  8071. 035filename completion window, 318@SELECT window, etc.).
  8072. ;---------------------------------------------------------------------------
  8073. !TOPIC 467 ListColors
  8074. !NOINDEX
  8075. !TTY
  8076. ListColors = Color: Sets the colors used by the 640LIST command. If
  8077. this directive is not used, LIST will use the current default colors set
  8078. by the 604CLS or 605COLOR command or by the 471StdColors
  8079. directive.
  8080. ;---------------------------------------------------------------------------
  8081. !TOPIC 468 ListStatBarColors
  8082. !NOINDEX
  8083. !TTY
  8084. ListStatBarColors = Color: Sets the colors used on the 640LIST
  8085. status bar. If this directive is not used, LIST will set the status bar to
  8086. the reverse of the screen color (the screen color is controlled by
  8087. 467ListColors).
  8088. ;---------------------------------------------------------------------------
  8089. !TOPIC 464 PopupWinColors
  8090. !NOINDEX
  8091. !TTY
  8092. PopupWinColors = Color: Sets the default colors for the command-line,
  8093. directory history, and filename completion windows, and most other popup
  8094. windows (see 462CDDWinColors for the extended directory search
  8095. window). If this directive is not used the colors will be reversed from
  8096. the current colors on the screen.
  8097. ;---------------------------------------------------------------------------
  8098. !TOPIC 469 SelectColors
  8099. !NOINDEX
  8100. !TTY
  8101. SelectColors = Color: Sets the color used by the 662SELECT
  8102. command. If this directive is not used, SELECT will use the current
  8103. default colors set by the 604CLS or 605COLOR command or by the
  8104. 471StdColors directive.
  8105. ;---------------------------------------------------------------------------
  8106. !TOPIC 470 SelectStatBarColors
  8107. !NOINDEX
  8108. !TTY
  8109. SelectStatBarColors = Color: Sets the color used on the
  8110. 662SELECT status bar. If this directive is not used, SELECT will set
  8111. the status bar to the reverse of the screen color (the screen color is
  8112. controlled by 469SelectColors).
  8113. ;---------------------------------------------------------------------------
  8114. !TOPIC 471 StdColors
  8115. !NOINDEX
  8116. !TTY
  8117. StdColors = Color: Sets the standard colors to be used when
  8118. 604CLS is used without a color specification, and for 640LIST
  8119. and 662SELECT if 467ListColors and 469SelectColors are
  8120. not used. Using this directive is similar to placing a 605COLOR
  8121. command in AUTOEXEC.BAT or 4START. StdColors takes effect the first time
  8122. 604CLS, LIST, or SELECT is used after 4DOS starts, but will not affect
  8123. the color of error or other messages displayed during the loading and
  8124. initialization process.
  8125. ;---------------------------------------------------------------------------
  8126. !TOPIC 481 Key Mapping Directives
  8127. !NOINDEX
  8128. These directives allow you to change the keys used for command-line editing
  8129. and other internal functions. They are divided into four types:
  8130. !INDENT 5 5 5 5
  8131. General Input Keys apply to all input. They are in effect whenever 4DOS
  8132. requests input from the keyboard, including during 032command-line
  8133. editing and the 611DESCRIBE, 622ESET, 636INPUT,
  8134. 640LIST, and 662SELECT commands.
  8135. Command-Line Editing Keys apply only to command-line editing, and are only
  8136. effective at the 4DOS prompt.
  8137. Popup Window Keys apply to popup windows, including the
  8138. 034command history window, the 040directory history window, the
  8139. 035filename completion window, the 048extended directory search
  8140. window, and the 318@SELECT window.
  8141. LIST Keys are effective only inside the 640LIST command.
  8142. !INDENT 0
  8143. This topic lists all the key mapping directives, divided by type. It
  8144. includes a one-line description of each directive, and a cross-reference
  8145. which selects a full screen help topic on that directive. Most of the
  8146. directives are simple enough that the one-line description is sufficient if
  8147. you are generally familiar with how key mapping works. However, for those
  8148. directives marked with an asterisk [*], the cross-reference topic
  8149. contains some additional information you may wish to review. You can also
  8150. obtain help on any directive with a HELP directive command at the
  8151. prompt (this is why each directive has its own topic, in addition to its
  8152. appearance in the list below).
  8153. A detailed discussion of how key mapping works follows the directive list
  8154. below.
  8155. General Input Keys
  8156.  512AliasExpand Expand aliases without executing them
  8157.  482Backspace Deletes the character to the left of the cursor
  8158.  483BeginLine Moves the cursor to the start of the line
  8159.  484Del Deletes the character at the cursor
  8160.  485DelToBeginning Deletes from the cursor to the start of the line
  8161.  486DelToEnd Deletes from the cursor to the end of the line
  8162.  487DelWordLeft Deletes the word to the left of the cursor
  8163.  488DelWordRight Deletes the word to the right of the cursor
  8164.  489Down * Moves the cursor or scrolls the display down
  8165.  490EndLine Moves the cursor to the end of the line
  8166.  491EraseLine Deletes the entire line
  8167.  492ExecLine Executes or accepts a line
  8168.  493Ins Toggles insert / overstrike mode
  8169.  494Left * Moves the cursor or scrolls the display left
  8170.  495NormalKey * Deassigns a key
  8171.  496Right * Moves the cursor or scrolls the display right
  8172.  497Up * Moves the cursor or scrolls the display up
  8173.  498WordLeft Moves the cursor left one word
  8174.  499WordRight Moves the cursor right one word
  8175. Command-Line Editing Keys
  8176.  511AddFile * Keeps filename completion entry and adds another
  8177.  513CommandEscape * Allows direct entry of a keystroke
  8178.  514DelHistory Deletes a history list entry
  8179.  531DirWinOpen Opens the directory history window
  8180.  515EndHistory Displays the last entry in the history list
  8181.  516Help Invokes this help system
  8182.  532HistWinOpen Opens the command history window
  8183.  517LFNToggle Switches filename completion between LFN and SFN
  8184.  518LineToEnd Copies the current line to the end of the history
  8185.  519NextFile * Gets the next matching filename
  8186.  520NextHistory Recalls the next command from the history
  8187.  521NormalEditKey * Deassigns a command-line editing key
  8188.  522PopFile * Opens the filename completion window
  8189.  523PrevFile * Gets the previous matching filename
  8190.  524PrevHistory Recalls the previous command from the history
  8191.  527RepeatFile Repeats the just-matched filename
  8192.  525SaveHistory Saves the command line without executing it
  8193. Popup Window Keys
  8194.  533NormalPopupKey * Deassigns a popup window key
  8195.  534PopupWinBegin Moves to the first line of the popup window
  8196.  535PopupWinDel Deletes a line from within the popup window
  8197.  536PopupWinEdit Moves a line from the popup window to the prompt
  8198.  537PopupWinEnd Moves to the last line of the popup window
  8199.  538PopupWinExec Executes the selected line in the popup window
  8200. LIST Keys
  8201.  526ListContinue Continues LIST
  8202.  539ListExit Exits the current file
  8203.  540ListFind Prompts and searches for a string
  8204.  541ListFindReverse Prompts and searches backward for a string
  8205.  542ListHex Toggles hexadecimal display mode
  8206.  543ListHighBit Toggles LIST's "strip high bit" option
  8207.  544ListInfo Displays information about the current file
  8208.  545ListNext Finds the next matching string
  8209.  546ListPrevious Finds the previous matching string
  8210.  547ListPrint Prints the file on LPT1
  8211.  548ListWrap Toggles LIST's wrap option
  8212.  549NormalListKey * Deassigns a LIST key
  8213. See Also:
  8214.  561ClearKeyMap Clear default key mappings
  8215. Using Key Mapping Directives
  8216. Using a key mapping directive allows you to assign a different or
  8217. additional key to perform the function described. For example, to use
  8218. function key F3 to invoke the HELP facility (normally invoked with
  8219. F1):
  8220. Help = F3
  8221. Any directive can be used multiple times to assign multiple keys to the
  8222. same function. For example:
  8223. ListFind = F ; F does a find in LIST
  8224. ListFind = F5 ; F5 also does a find in LIST
  8225. Use some care when you reassign keystrokes. If you assign a default key to
  8226. a different function, it will no longer be available for its original
  8227. use. For example, if you assign F1 to the AddFile directive (a part of
  8228. filename completion), the F1 key will no longer invoke the help system,
  8229. so you will probably want to assign a different key to Help.
  8230. See 893Keys and Key Names before using the key mapping directives.
  8231. Key assignments are processed before looking for keystroke aliases. For
  8232. example, if you assign Shift-F1 to HELP and also assign Shift-F1 to
  8233. a key alias, the key alias will be ignored.
  8234. Assigning a new keystroke for a function does not deassign the default
  8235. keystroke for the same function. If you want to deassign one of the
  8236. default keys, use the 495NormalKey directive for general input keys, or
  8237. the corresponding directive for keys in the other key groups
  8238. (521NormalEditKey, 533NormalPopupKey, or 549NormalListKey).
  8239.  All of the key-mapping directives may be dynamically reassigned at the
  8240. command line using the 648OPTION //optname=value syntax. There is no
  8241. provision for remapping keys in the interactive 648OPTION dialogs.
  8242. ;---------------------------------------------------------------------------
  8243. ;Key mapping directives -- General Input -------------------------------
  8244. ;---------------------------------------------------------------------------
  8245. !TOPIC 482 Backspace
  8246. !NOINDEX
  8247. !TTY
  8248. Backspace = Key (Bksp): Deletes the character to the left of the cursor.
  8249. ;---------------------------------------------------------------------------
  8250. !TOPIC 483 BeginLine
  8251. !NOINDEX
  8252. !TTY
  8253. BeginLine = Key (Home): Moves the cursor to the beginning of the line.
  8254. ;---------------------------------------------------------------------------
  8255. !TOPIC 484 Del
  8256. !NOINDEX
  8257. Del = Key (Del): Deletes the character at the cursor.
  8258. ;---------------------------------------------------------------------------
  8259. !TOPIC 485 DelToBeginning
  8260. !NOINDEX
  8261. !TTY
  8262. DelToBeginning = Key (Ctrl-Home): Deletes from the cursor to the start
  8263. of the line.
  8264. ;---------------------------------------------------------------------------
  8265. !TOPIC 486 DelToEnd
  8266. !NOINDEX
  8267. !TTY
  8268. DelToEnd = Key (Ctrl-End): Deletes from the cursor to the end of the
  8269. line.
  8270. ;---------------------------------------------------------------------------
  8271. !TOPIC 487 DelWordLeft
  8272. !NOINDEX
  8273. !TTY
  8274. DelWordLeft = Key (Ctrl-L): Deletes the word to the left of the
  8275. cursor.
  8276. ;---------------------------------------------------------------------------
  8277. !TOPIC 488 DelWordRight
  8278. !NOINDEX
  8279. !TTY
  8280. DelWordRight = Key (Ctrl-R, Ctrl-Bksp): Deletes the word to the right
  8281. of the cursor. See 561ClearKeyMap if you need to remove the default
  8282. mapping of Ctrl-Bksp to this function.
  8283. ;---------------------------------------------------------------------------
  8284. !TOPIC 489 Down
  8285. !NOINDEX
  8286. !TTY
  8287. Down = Key (Down): Scrolls the display down one line in LIST; moves
  8288. the cursor down one line in 662SELECT and in the command-line
  8289. history, directory history, or 318%@SELECT window. (Scrolling down
  8290. through the command history at the prompt is controlled by
  8291. 520NextHistory, not by this directive.)
  8292. ;---------------------------------------------------------------------------
  8293. !TOPIC 490 EndLine
  8294. !NOINDEX
  8295. !TTY
  8296. EndLine = Key (End): Moves the cursor to the end of the line.
  8297. ;---------------------------------------------------------------------------
  8298. !TOPIC 491 EraseLine
  8299. !NOINDEX
  8300. !TTY
  8301. EraseLine = Key (Esc): Deletes the entire line.
  8302. ;---------------------------------------------------------------------------
  8303. !TOPIC 492 ExecLine
  8304. !NOINDEX
  8305. !TTY
  8306. ExecLine = Key (Enter): Executes or accepts a line.
  8307. ;---------------------------------------------------------------------------
  8308. !TOPIC 493 Ins
  8309. !NOINDEX
  8310. !TTY
  8311. Ins = Key (Ins): Toggles insert / overstrike mode during line editing.
  8312. ;---------------------------------------------------------------------------
  8313. !TOPIC 494 Left
  8314. !NOINDEX
  8315. !TTY
  8316. Left = Key (Left): Moves the cursor left one character on the input
  8317. line; scrolls the display left 8 columns in LIST; scrolls the display left 4
  8318. columns in the command-line, directory history, or 318%@SELECT window.
  8319. ;---------------------------------------------------------------------------
  8320. !TOPIC 495 NormalKey
  8321. !NOINDEX
  8322. !TTY
  8323. NormalKey = Key: Deassigns a general input key in order to disable the
  8324. usual meaning of the key within 4DOS and/or make it available for keystroke
  8325. aliases. This will make the keystroke operate as a "normal" key with no
  8326. special function. For example:
  8327. NormalKey = Ctrl-End
  8328. will disable Ctrl-End, which is the standard "delete to end of line"
  8329. key. Ctrl-End could then be assigned to a keystroke alias. Another key
  8330. could be assigned the "delete to end of line" function with the
  8331. 486DelToEnd directive.
  8332. ;---------------------------------------------------------------------------
  8333. !TOPIC 496 Right
  8334. !NOINDEX
  8335. !TTY
  8336. Right = Key (Right): Moves the cursor right one character on the input
  8337. line; scrolls the display right 8 columns in 640LIST; scrolls the display
  8338. right 4 columns in the command-line history, directory history, or
  8339. 318%@SELECT window.
  8340. ;---------------------------------------------------------------------------
  8341. !TOPIC 497 Up
  8342. !NOINDEX
  8343. !TTY
  8344. Up = Key (Up): Scrolls the display up one line in 640LIST; moves
  8345. the cursor up one line in 662SELECT and in the command-line
  8346. history, directory history, or 318%@SELECT window. (Scrolling up
  8347. through the command history at the prompt is controlled by
  8348. 524PrevHistory, not by this directive.)
  8349. ;---------------------------------------------------------------------------
  8350. !TOPIC 498 WordLeft
  8351. !NOINDEX
  8352. !TTY
  8353. WordLeft = Key (Ctrl-Left): Moves the cursor left one word; scrolls
  8354. the display left 40 columns in 640LIST.
  8355. ;---------------------------------------------------------------------------
  8356. !TOPIC 499 WordRight
  8357. !NOINDEX
  8358. !TTY
  8359. WordRight = Key (Ctrl-Right): Moves the cursor right one word;
  8360. scrolls the display right 40 columns in 640LIST.
  8361. ;---------------------------------------------------------------------------
  8362. ;Key mapping directives -- Command Line Editing --------------------------
  8363. ;---------------------------------------------------------------------------
  8364. !TOPIC 511 AddFile
  8365. !NOINDEX
  8366. !TTY
  8367. AddFile = Key (F10): Keeps the current filename completion entry and
  8368. inserts the next matching name.
  8369. ;---------------------------------------------------------------------------
  8370. !TOPIC 512 AliasExpand
  8371. !NOINDEX
  8372. !TTY
  8373. AliasExpand = Key (Ctrl-F): Expands all aliases in the current command
  8374. line without executing them.
  8375. ;---------------------------------------------------------------------------
  8376. !TOPIC 513 CommandEscape
  8377. !NOINDEX
  8378. !TTY
  8379. CommandEscape = Key (Alt-255): Allows direct entry of a keystroke
  8380. that would normally be handled by the command line editor (e.g. Tab
  8381. or Ctrl-D).
  8382. ;---------------------------------------------------------------------------
  8383. !TOPIC 514 DelHistory
  8384. !NOINDEX
  8385. !TTY
  8386. DelHistory = Key (Ctrl-D): Deletes the displayed history list entry
  8387. and displays the previous entry.
  8388. ;---------------------------------------------------------------------------
  8389. !TOPIC 515 EndHistory
  8390. !NOINDEX
  8391. !TTY
  8392. EndHistory = Key (Ctrl-E): Displays the last entry in the history
  8393. list.
  8394. ;---------------------------------------------------------------------------
  8395. !TOPIC 516 Help
  8396. !NOINDEX
  8397. !TTY
  8398. Help = Key (F1): Invokes the HELP facility.
  8399. ;---------------------------------------------------------------------------
  8400. !TOPIC 517 LFNToggle
  8401. !NOINDEX
  8402. !TTY
  8403. LFNToggle = Key (Ctrl-A): Toggles filename completion between long
  8404. filename and short filename modes on LFN drives.
  8405. ;---------------------------------------------------------------------------
  8406. 0!TOPIC 518 LineToEnd
  8407. !NOINDEX
  8408. !TTY
  8409. LineToEnd = Key (Ctrl-Enter): Copies the current command line to the end
  8410. of the history list, then executes it.
  8411. ;---------------------------------------------------------------------------
  8412. !TOPIC 519 NextFile
  8413. !NOINDEX
  8414. !TTY
  8415. NextFile = Key (F9, Tab): Gets the next matching filename. See
  8416. 561ClearKeyMap if you need to remove the default mapping of Tab
  8417. to this function.
  8418. ;---------------------------------------------------------------------------
  8419. !TOPIC 520 NextHistory
  8420. !NOINDEX
  8421. !TTY
  8422. NextHistory = Key (Down): Recalls the next command from the command
  8423. history.
  8424. ;---------------------------------------------------------------------------
  8425. !TOPIC 521 NormalEditKey
  8426. !NOINDEX
  8427. !TTY
  8428. NormalEditKey = Key: Deassigns a command-line editing key in order to
  8429. disable the usual meaning of the key while editing a command line, and/or
  8430. make it available for keystroke aliases. For additional details see
  8431. 495NormalKey.
  8432. ;---------------------------------------------------------------------------
  8433. !TOPIC 522 PopFile
  8434. !NOINDEX
  8435. !TTY
  8436. PopFile = Key (F7, Ctrl-Tab): Opens the filename completion window. You
  8437. may not be able to use Ctrl-Tab, because not all systems recognize
  8438. it as a keystroke. See 561ClearKeyMap if you need to remove the
  8439. default mapping of Ctrl-Tab to this function.
  8440. ;---------------------------------------------------------------------------
  8441. !TOPIC 523 PrevFile
  8442. !NOINDEX
  8443. !TTY
  8444. PrevFile = Key (F8, Shift-Tab): Gets the previous matching filename.
  8445. See 561ClearKeyMap if you need to remove the default mapping of
  8446. Shift-Tab to this function.
  8447. ;---------------------------------------------------------------------------
  8448. !TOPIC 524 PrevHistory
  8449. !NOINDEX
  8450. !TTY
  8451. PrevHistory = Key (Up): Recalls the previous command from the command
  8452. history.
  8453. ;---------------------------------------------------------------------------
  8454. !TOPIC 527 RepeatFile
  8455. !NOINDEX
  8456. !TTY
  8457. RepeatFile = Key (F12): Repeats the previous matching filename during
  8458. filename completion.
  8459. ;---------------------------------------------------------------------------
  8460. !TOPIC 525 SaveHistory
  8461. !NOINDEX
  8462. !TTY
  8463. SaveHistory = Key (Ctrl-K): Saves the command line in the command
  8464. history list without executing it.
  8465. ;---------------------------------------------------------------------------
  8466. ;Key mapping directives -- Popup --------------------------
  8467. ;---------------------------------------------------------------------------
  8468. !TOPIC 531 DirWinOpen
  8469. !NOINDEX
  8470. !TTY
  8471. DirWinOpen = Key (Ctrl-PgUp): Opens the directory history window while
  8472. at the command line.
  8473. ;---------------------------------------------------------------------------
  8474. !TOPIC 532 HistWinOpen
  8475. !NOINDEX
  8476. !TTY
  8477. HistWinOpen = Key (PgUp): Brings up the history window while at the
  8478. command line.
  8479. ;---------------------------------------------------------------------------
  8480. !TOPIC 533 NormalPopupKey
  8481. !NOINDEX
  8482. !TTY
  8483. NormalPopupKey = Key: Deassigns a popup window key in order to
  8484. disable the usual meaning of the key within the popup window. For
  8485. additional details see 495NormalKey.
  8486. ;---------------------------------------------------------------------------
  8487. !TOPIC 534 PopupWinBegin
  8488. !NOINDEX
  8489. !TTY
  8490. PopupWinBegin = Key (Ctrl-PgUp): Moves to the first item in the list
  8491. when in the popup window.
  8492. ;---------------------------------------------------------------------------
  8493. !TOPIC 535 PopupWinDel
  8494. !NOINDEX
  8495. !TTY
  8496. PopupWinDel = Key (Ctrl-D): Deletes a line from within the command
  8497. history or directory history window.
  8498. ;---------------------------------------------------------------------------
  8499. !TOPIC 536 PopupWinEdit
  8500. !NOINDEX
  8501. !TTY
  8502. PopupWinEdit = Key (Ctrl-Enter): Moves a line from the command history
  8503. or directory history window to the prompt for editing.
  8504. ;---------------------------------------------------------------------------
  8505. !TOPIC 537 PopupWinEnd
  8506. !NOINDEX
  8507. !TTY
  8508. PopupWinEnd = Key (Ctrl-PgDn): Moves to the last item in the list when
  8509. in the popup window.
  8510. ;---------------------------------------------------------------------------
  8511. !TOPIC 538 PopupWinExec
  8512. !NOINDEX
  8513. !TTY
  8514. PopupWinExec = Key (Enter): Selects the current item and closes the
  8515. window.
  8516. ;---------------------------------------------------------------------------
  8517. ;Key mapping directives -- LIST ------------------------------------
  8518. ;---------------------------------------------------------------------------
  8519. !TOPIC 526 ListContinue
  8520. !NOINDEX
  8521. !TTY
  8522. ListContinue = Key (C): Continues LIST.
  8523. ;---------------------------------------------------------------------------
  8524. !TOPIC 539 ListExit
  8525. !NOINDEX
  8526. !TTY
  8527. ListExit = Key (Esc): Exits from the LIST command.
  8528. ;---------------------------------------------------------------------------
  8529. !TOPIC 540 ListFind
  8530. !NOINDEX
  8531. !TTY
  8532. ListFind = Key (F): Prompts and searches for a string.
  8533. ;---------------------------------------------------------------------------
  8534. !TOPIC 541 ListFindReverse
  8535. !NOINDEX
  8536. !TTY
  8537. ListFindReverse = Key (Ctrl-F): Prompts and searches backward
  8538. for a string.
  8539. ;---------------------------------------------------------------------------
  8540. !TOPIC 542 ListHex
  8541. !NOINDEX
  8542. !TTY
  8543. ListHex = Key (X): Toggles hexadecimal display mode.
  8544. ;---------------------------------------------------------------------------
  8545. !TOPIC 543 ListHighBit
  8546. !NOINDEX
  8547. !TTY
  8548. ListHighBit = Key (H): Toggles LIST's "strip high bit" option, which
  8549. can aid in displaying files from certain word processors.
  8550. ;---------------------------------------------------------------------------
  8551. !TOPIC 544 ListInfo
  8552. !NOINDEX
  8553. !TTY
  8554. ListInfo = Key (I): Displays information about the current file.
  8555. ;---------------------------------------------------------------------------
  8556. !TOPIC 545 ListNext
  8557. !NOINDEX
  8558. !TTY
  8559. ListNext = Key (N): Finds the next matching string.
  8560. ;---------------------------------------------------------------------------
  8561. !TOPIC 546 ListPrevious
  8562. !NOINDEX
  8563. !TTY
  8564. ListPrevious = Key (Ctrl-N): Finds the previous matching string.
  8565. ;---------------------------------------------------------------------------
  8566. !TOPIC 547 ListPrint
  8567. !NOINDEX
  8568. !TTY
  8569. ListPrint = Key (P): Prints the file on LPT1.
  8570. ;---------------------------------------------------------------------------
  8571. !TOPIC 548 ListWrap
  8572. !NOINDEX
  8573. !TTY
  8574. ListWrap = Key (W): Toggles LIST's wrap option on and off. The wrap
  8575. option wraps text at the right margin.
  8576. ;---------------------------------------------------------------------------
  8577. !TOPIC 549 NormalListKey
  8578. !NOINDEX
  8579. !TTY
  8580. NormalListKey = Key: Deassigns a LIST key in order to disable the
  8581. usual meaning of the key within LIST. For additional details see
  8582. 495NormalKey.
  8583. ;---------------------------------------------------------------------------
  8584. !TOPIC 550 Advanced Directives
  8585. !NOINDEX
  8586. ChangeTitle Does not apply in vDosPlus
  8587.  561ClearKeyMap Clear default key mappings
  8588. CopyEA Does not apply in vDosPlus
  8589. 562CritFail Automatic fail on critical errors
  8590.  563Debug Set debugging options
  8591. DiskReset Does not apply in vDosPlus
  8592. DRSets Does not apply in vDosPlus
  8593. 565DVCleanup Clean up on DESQview window close
  8594. 554FineSwap Fine-grained disk swapping
  8595. 566FullINT2E Full interrupt 2E support
  8596. 567Include Include a file of .INI directives
  8597. 568Inherit Inherit aliases, functions, and history
  8598. 555MaxLoadAddress Shell load address control (NDIS etc.)
  8599. 569MessageServer COMMAND.COM message server
  8600. 570NetWareNames Novell NetWare support
  8601. 571NextINIFile Set secondary shell .INI file name
  8602. 572OutputBIOS Use BIOS instead of direct video output
  8603. 556Reduce Control spawning of secondary shells
  8604. 557ReserveTPA Control shell memory allocation
  8605. 573SDFlush Control SMARTDRV write-behind buffers
  8606. 574StackSize Internal stack size
  8607. 575SwapReopen Reopen swap file if it is closed
  8608. 576UniqueSwapName Use unique swap file name
  8609.  577Win95LFN Disable long filename support
  8610. Directives marked with a  may be dynamically changed at the command line
  8611. using the 648OPTION //optname=value syntax.
  8612. ;---------------------------------------------------------------------------
  8613. !TOPIC 554 FineSwap
  8614. !NOINDEX
  8615. !TTY
  8616. FineSwap = Yes | NO: If you are using disk swapping and your system
  8617. hangs when exiting an application, Yes enables "fine-grained" checksums
  8618. during disk swapping. This should be used only to diagnose unusual
  8619. swapping problems.
  8620. ;---------------------------------------------------------------------------
  8621. !TOPIC 555 MaxLoadAddress
  8622. !NOINDEX
  8623. !TTY
  8624. MaxLoadAddress = nnn: Specifies the maximum load address in order to
  8625. work around problems with some rare drivers not properly allocating the
  8626. memory they use. This should be used only to solve unusual problems.
  8627. ;---------------------------------------------------------------------------
  8628. !TOPIC 556 Reduce
  8629. !NOINDEX
  8630. !TTY
  8631. Reduce = YES | No: Set to No, if you have unexplained problems
  8632. in starting secondary shells.
  8633. ;---------------------------------------------------------------------------
  8634. !TOPIC 557 ReserveTPA
  8635. !NOINDEX
  8636. !TTY
  8637. ReserveTPA = YES | No: Set to No for unusual memory allocation problems.
  8638. ;---------------------------------------------------------------------------
  8639. !TOPIC 561 ClearKeyMap
  8640. !NOINDEX
  8641. !TTY
  8642. ClearKeyMap: Clears all current 481key mappings. ClearKeyMap is
  8643. a special directive which has no value or "=" after it. Use ClearKeyMap to
  8644. make one of the keys in the default map (Tab, Shift-Tab, Ctrl-Tab,
  8645. or Ctrl-Bksp) available for a keystroke alias, or in the
  8646. [Secondary] section of 4DOS.INI to clear key mappings inherited from
  8647. the primary shell. ClearKeyMap should appear before any key mapping
  8648. directives. If you want to clear some but not all of the default mappings,
  8649. use ClearKeyMap, then recreate the mappings you want to retain (e.g., with
  8650. "NextFile=Tab", etc.).
  8651. ;---------------------------------------------------------------------------
  8652. !TOPIC 562 CritFail
  8653. !NOINDEX
  8654. !TTY
  8655. CritFail = Yes | NO: It intercepts all DOS critical errors and returns a
  8656. Fail to each. We do not recommend this on most systems, because you will
  8657. not have a chance to react to a critical error and correct the problem that
  8658. caused it. It is intended for use on bulletin boards or other systems
  8659. where unattended operation is required without user prompts.
  8660. ;---------------------------------------------------------------------------
  8661. !TOPIC 563 Debug
  8662. !NOINDEX
  8663. !TTY
  8664. Debug = nnnn (0): Controls certain debugging options which can assist you
  8665. in tracking down unusual problems. Use the following values for Debug; to
  8666. select more than one option, add the values together:
  8667. !INDENT 8 5 5 5
  8668. 1 During the startup process, display the complete command tail
  8669. passed to 4DOS, then wait for a keystroke.
  8670. 2 Include the product name with each error message displayed by
  8671. 4DOS. This may be useful if you are unsure of the origin of a
  8672. particular error message.
  8673. !INDENT 0
  8674. Also see the 112batch file debugger, a separate and unrelated facility
  8675. for stepping through batch files.
  8676. ;---------------------------------------------------------------------------
  8677. !TOPIC 565 DVCleanup
  8678. !NOINDEX
  8679. !TTY
  8680. DVCleanup = YES | No. Controls the cleanup of 4DOS resources (the
  8681. shell number and any disk swap file) when you close a 4DOS window from the
  8682. DESQview menu. See 751Compatibility for more details.
  8683. ;---------------------------------------------------------------------------
  8684. !TOPIC 566 FullINT2E
  8685. !NOINDEX
  8686. !TTY
  8687. FullINT2E = YES | No: This option does not apply for vDosPlus.
  8688. ;---------------------------------------------------------------------------
  8689. !TOPIC 567 Include
  8690. !NOINDEX
  8691. !TTY
  8692. Include = File: Include the text from the named file at this
  8693. point in the processing of the current .INI file. Use this option to share a
  8694. file of directives between several products. The text in the named file is
  8695. processed just as if it were part of the original .INI file. When the
  8696. include file is finished, processing resumes at the point where it left off
  8697. in the original file. The included file may contain any valid directive for
  8698. the current section, but may not contain a section name. Includes may be
  8699. nested up to three levels deep (counting the original file as level 1).
  8700. You must maintain include files manually -- the 648OPTION command
  8701. modifies the original .INI file only, and does not update included files.
  8702. ;---------------------------------------------------------------------------
  8703. !TOPIC 568 Inherit
  8704. !NOINDEX
  8705. !TTY
  8706. Inherit = YES | No: 4DOS.INI data, aliases, functions, command history,
  8707. and directory history are normally passed to secondary shells
  8708. automatically. No disables this feature.
  8709. ;---------------------------------------------------------------------------
  8710. !TOPIC 569 MessageServer
  8711. !NOINDEX
  8712. !TTY
  8713. MessageServer = YES | No: For compatibility with COMMAND.COM, 4DOS
  8714. includes a "message server" that retrieves error message text for DOS
  8715. external commands like DISKCOPY and FORMAT. The message server increases
  8716. the size of the resident portion of 4DOS by about 200 bytes. No disables
  8717. the message server and saves this space, but will cause more cryptic error
  8718. messages such as "Parse error 3" or "Extended error 7" from some DOS
  8719. external commands.
  8720. ;---------------------------------------------------------------------------
  8721. !TOPIC 570 NetWareNames
  8722. !NOINDEX
  8723. !TTY
  8724. NetWareNames = Yes | NO. Set to Yes to include strings in the
  8725. resident portion of 4DOS which Novell NetWare searches for when it loads.
  8726. NetWareNames should be Yes for NetWare systems to avoid problems with
  8727. destroyed environment variables during LOGIN. Setting NetWareNames to
  8728. Yes increases 4DOS's low DOS memory usage by 112 bytes.
  8729. ;---------------------------------------------------------------------------
  8730. !TOPIC 571 NextINIFile
  8731. !NOINDEX
  8732. !TTY
  8733. NextINIFile = File. The full path and name of the file must be
  8734. specified. All subsequent shells will read the specified .INI file, and
  8735. ignore any [Secondary] section in the original .INI file.
  8736. ;---------------------------------------------------------------------------
  8737. !TOPIC 572 OutputBIOS
  8738. !NOINDEX
  8739. !TTY
  8740. OutputBIOS = Yes | NO: Determines whether 4DOS uses the BIOS for all
  8741. screen displays. If set to No, 4DOS will use direct screen writes for
  8742. color-coded directories and the 616DRAWBOX, 617DRAWHLINE,
  8743. 618DRAWVLINE, 640LIST, 662SELECT, 661SCRPUT, and
  8744. 684VSCRPUT commands. If set to Yes, 4DOS will perform these
  8745. commands using BIOS calls. This directive is only needed for compatibility
  8746. with unusual display adapters, such as those used on Japanese systems
  8747. running DOS/V. Setting OutputBIOS to Yes may substantially reduce the
  8748. speed of the affected commands. When OutputBIOS is set to Yes you may
  8749. also need to set 442ScreenColumns appropriately.
  8750. ;---------------------------------------------------------------------------
  8751. !TOPIC 573 SDFlush
  8752. !NOINDEX
  8753. !TTY
  8754. SDFlush = Yes | NO: Determines whether 4DOS instructs Microsoft SMARTDRV
  8755. (and other SMARTDRV-compatible disk caching programs) to flush any
  8756. "write-behind" buffers to the disk before the 4DOS prompt is
  8757. displayed. Setting SDFlush to Yes may decrease performance, but will
  8758. ensure that SMARTDRV is instructed to write all modified data to disk
  8759. before the prompt is displayed.
  8760. SDFlush does not take into account any changes in the design or behavior
  8761. of SMARTDRV after the release of 4DOS, or your SMARTDRV startup
  8762. options. Therefore setting SDFlush to Yes does not guarantee that
  8763. write-behind data will be written to disk before the prompt is
  8764. displayed, only that SMARTDRV will be instructed to do so.
  8765. ;---------------------------------------------------------------------------
  8766. !TOPIC 574 StackSize
  8767. !NOINDEX
  8768. !TTY
  8769. StackSize = nnnn (8192): Set the 4DOS internal stack size. The
  8770. allowable range of values is 8192 to 16384.
  8771. If you use complex combinations of "prefix" commands like 615DO,
  8772. 623EXCEPT, 626FOR, 628GLOBAL, 633IF, 634IFF,
  8773. and 662SELECT on the same command line, and especially if you use
  8774. these commands in multiple nested batch files or 629GOSUBs, you may
  8775. encounter a "4DOS internal stack overflow" error. If you do, you should
  8776. use this directive to increase the amount of stack space available.
  8777. For virtually all users, the default stack size will be sufficient. If you
  8778. increase the stack size, you will increase the size of 4DOS's transient
  8779. portion in memory, and the size of the 4DOS swap area, by the amount of the
  8780. stack size increase. Please note that you may receive "out of memory"
  8781. errors which prevent 4DOS from loading if you use large StackSize values
  8782. along with enlarged alias and/or history buffers.
  8783. ;---------------------------------------------------------------------------
  8784. !TOPIC 575 SwapReopen
  8785. !NOINDEX
  8786. !TTY
  8787. SwapReopen = Yes | NO: Set to Yes to enable reopening of the 4DOS
  8788. swap file if it is closed by another program. This is required when using other
  8789. applications which close 4DOS's swap file. In all other circumstances, it is
  8790. only useful for diagnostic purposes. Setting SwapReopen to Yes also
  8791. disables the reduced swapping size normally used in 4DOS secondary
  8792. shells (see also 391Swapping).
  8793. ;---------------------------------------------------------------------------
  8794. !TOPIC 576 UniqueSwapName
  8795. !NOINDEX
  8796. !TTY
  8797. UniqueSwapName = Yes | No: Set to Yes to change the disk swap file
  8798. name from 4DOSSWAP.nnn to a unique name generated by 4DOS, with an
  8799. extension of "4SW" (e.g., A1CD6B11.4SW). This prevents conflicts between
  8800. swap files in different shells; it is only necessary when you are using
  8801. disk swapping with a primary shell. The default is No.
  8802. ;---------------------------------------------------------------------------
  8803. !TOPIC 577 Win95LFN
  8804. !NOINDEX
  8805. !TTY
  8806. Win95LFN= Yes | No: Under vDosPlus the default setting is Yes.
  8807. Set Win95LFN to No to disable long filename support in the vDosPlus
  8808. environment. This directive affects a wide range of internal
  8809. filename and file handling features, but does not prevent 4DOS from
  8810. detecting that it is running under Windows 95/98/ME. It generally
  8811. should be used only for debugging or diagnostic purposes.
  8812. In other environments the default is No. You can set Win95LFN to
  8813. Yes to force 4DOS to try to use long filenames in non-standard
  8814. environments (e.g., where a driver or memory-resident program
  8815. provides long filename support that is not built into the operating
  8816. system). Setting Win95LFN to Yes does not guarantee that
  8817. non-standard LFN support will work with 4DOS, so you should do
  8818. some testing before using this method extensively or for critical
  8819. data or procedures.
  8820. ;---------------------------------------------------------------------------
  8821. ; Directive equates ----------------------------------------------------------
  8822. !TOPIC 456 =417 CDDWinLeft
  8823. !NOINDEX
  8824. !TOPIC 457 =440 PopupWinLeft
  8825. !NOINDEX
  8826. !TOPIC 578 =373 _Alias_
  8827. !NOINDEX
  8828. !TOPIC 579 =382 _History_
  8829. !NOINDEX
  8830. !TOPIC 580 =391 _Swapping_
  8831. !NOINDEX
  8832. !TOPIC 581 =412 _ANSI_
  8833. !NOINDEX
  8834. !TOPIC 582 =428 _EvalMin_
  8835. !NOINDEX
  8836. !TOPIC 583 =427 _EvalMax_
  8837. !NOINDEX
  8838. !TOPIC 584 =429 _FileCompletion_
  8839. !NOINDEX
  8840. !TOPIC 585 =376 _DirHistory_
  8841. !NOINDEX
  8842. !TOPIC 586 =377 _Environment_
  8843. !NOINDEX
  8844. !TOPIC 587 =379 _Function_
  8845. !NOINDEX
  8846. !TOPIC 880 =417 CDDWinTop
  8847. !NOINDEX
  8848. !TOPIC 881 =417 CDDWinWidth
  8849. !NOINDEX
  8850. !TOPIC 882 =417 CDDWinHeight
  8851. !NOINDEX
  8852. !TOPIC 883 =440 PopupWinTop
  8853. !NOINDEX
  8854. !TOPIC 884 =440 PopupWinWidth
  8855. !NOINDEX
  8856. !TOPIC 885 =440 PopupWinHeight
  8857. !NOINDEX
  8858. ;---------------------------------------------------------------------------
  8859. !TOPIC 592 Commands by Category
  8860. !NOINDEX
  8861. The best way to learn the 4DOS commands is to use them and experiment with
  8862. them. The lists below categorize the available commands by topic and will
  8863. help you find the ones that you need.
  8864. System configuration and status
  8865. 598BREAK 603CHCP 604CLS 605COLOR 776COUNTRY
  8866. 607CTTY 608DATE 613DIRHISTORY 627FREE 632HISTORY
  8867. 637KEYBD 066LABEL 639LH / LOADHIGH 643LOG 645MEMORY
  8868. 648OPTION 652PROMPT 656REBOOT 067SETCFG 068SETCOLOR
  8869. 664SETDOS 069SETPORT 668SWAPPING 672TIME 681VER
  8870. 682VERIFY 683VOL
  8871. File and directory management
  8872. 596ATTRIB 606COPY 609DEL / ERASE 611DESCRIBE 697HEAD
  8873. 640LIST 646MOVE 658REN / RENAME 662SELECT 698TAIL
  8874. 674TOUCH 676TRUENAME 677TYPE 064UNUSE 061USE
  8875. 685WHICH
  8876. Subdirectory management
  8877. 601CD / CHDIR 602CDD 612DIR 614DIRS 644MD / MKDIR
  8878. 651POPD 653PUSHD 655RD / RMDIR 675TREE
  8879. Input and output
  8880. 616DRAWBOX 617DRAWHLINE 618DRAWVLINE 619ECHO 689ECHOERR
  8881. 620ECHOS 690ECHOSERR 635INKEY 636INPUT 638KEYSTACK
  8882. 660SCREEN 661SCRPUT 671TEXT 684VSCRPUT
  8883. Commands primarily for use in or with batch files and aliases (some
  8884. work only in batch files; see the individual commands for details)
  8885. 595ALIAS 597BEEP 599CALL 600CANCEL 065CMD
  8886. 610DELAY CLOSETRAY 615DO EJECTMEDIA 621ENDLOCAL
  8887. 626FOR 696FUNCTION 628GLOBAL 629GOSUB 630GOTO
  8888. 633IF 634IFF 687LFNFOR 641LOADBTM 647ON
  8889. 650PAUSE 654QUIT 657REM 659RETURN 827SETERROR
  8890. 665SETLOCAL 666SHIFT 669SWITCH 671TEXT 774TRANSIENT
  8891. 678UNALIAS 699UNFUNCTION
  8892. Environment and path commands
  8893. 622ESET 649PATH 663SET 680UNSET
  8894. Other commands
  8895. 594? 623EXCEPT 624EXIT 625FFIND 631HELP
  8896. 640LIST 670TEE 673TIMER 686Y
  8897. ;---------------------------------------------------------------------------
  8898. !TOPIC 594 ?
  8899. !TTY
  8900. Purpose: Display a list of internal commands or prompt for a command.
  8901. Format: ? ["prompt" command]
  8902. prompt: Prompt text about whether to execute the command.
  8903. command: Command to be executed if user answers Y.
  8904. !TTY
  8905. Usage
  8906. ? has two functions. ? by itself displays a list of internal
  8907. commands. For help with any individual command, see the 631HELP command.
  8908. If you have disabled a command with SETDOS /I, it will not appear in the list.
  8909. The second function of ? is to prompt the user before executing a specific
  8910. line in a batch file. If you add a prompt and a command, ? will display
  8911. the prompt followed by "(Y/N)?" and wait for the user's response. If the
  8912. user presses "Y" or "y", the line will be executed. If the user presses "N"
  8913. or "n", the line will be ignored.
  8914. For example, the following command might be used in a batch file:
  8915. ? "Load the network" call netstart.btm
  8916. When this command is executed, you will see the following prompt; if you
  8917. answer "Y", the CALL command will be executed:
  8918. Load the network (Y/N)?
  8919. ;---------------------------------------------------------------------------
  8920. !TOPIC 595 ALIAS
  8921. !TTY
  8922. Purpose: Create new command names that execute one or more commands or
  8923. redefine default options for existing commands; assign commands
  8924. to keystrokes; load or display the list of defined alias names.
  8925. Format: ALIAS [/P /R file...] [name[=][value]]
  8926. file: One or more files to read for alias definitions.
  8927. name: Name for an alias, or for the key to execute the
  8928. alias.
  8929. value: Text to be substituted for the alias name.
  8930. /P(ause) /R(ead file)
  8931. !TTY
  8932. See also: 678UNALIAS.
  8933. Usage
  8934. The ALIAS command lets you create new command names or redefine internal
  8935. commands. It also lets you assign one or more commands to a single
  8936. keystroke. An alias is often used to execute a complex series of commands
  8937. with a few keystrokes or to create "in memory batch files" that run much
  8938. faster than disk-based batch files.
  8939. For example, to create a single-letter command D to display a wide directory,
  8940. instead of using the longer DIR /W, you could use the command:
  8941. c:\> alias d = dir /w
  8942. Now when you type a single d as a command, it will be translated into a
  8943. DIR /W command.
  8944. If you define aliases for commonly used application programs, you can often
  8945. remove the directories they're stored in from the 138PATH. For example, if
  8946. you use Quattro Pro and had the C:\QPRO directory in your path, you could
  8947. define the following alias:
  8948. c:\> alias qpro = c:\qpro\q.exe
  8949. With this alias defined, you can probably remove C:\QPRO from your
  8950. PATH. Quattro Pro will now load more quickly than it would if 4DOS had to
  8951. search the PATH for it. In addition, the PATH can be shorter, which will
  8952. speed up searches for other programs.
  8953. If you apply this technique for each application program, you can often
  8954. reduce your PATH to just two or three directories containing utility
  8955. programs, and significantly reduce the time it takes to load most software
  8956. on your system. Before removing a directory from the PATH, you will need
  8957. to define aliases for all the executable programs you commonly use which
  8958. are stored in that directory.
  8959. Aliases are stored in memory, and are not saved automatically when you turn
  8960. off your computer or end your current session. See below for information
  8961. on saving and reloading your aliases.
  8962. Multiple Commands and Special Characters in Aliases
  8963. An alias can represent more than one command. For example:
  8964. c:\> alias letters = `cd \letters ^ text`
  8965. creates a new command called LETTERS. The command first uses CD to change
  8966. to a subdirectory called \LETTERS and then runs a program called TEXT. The
  8967. caret [^] is the 041command separator and indicates that the two
  8968. commands are distinct and should be executed sequentially.
  8969. When you type alias commands at the command line or in a batch file, you
  8970. must use back-quotes [`] around the definition if it contains
  8971. multiple commands, parameters (discussed below), environment variables,
  8972. redirection, or piping. The back-quotes prevent premature expansion of
  8973. these arguments. You may use back-quotes around other definitions, but
  8974. they are not required. (You do not need back-quotes when your aliases are
  8975. loaded from an ALIAS /R file; see below for details.) The examples above
  8976. and below include back-quotes only when they are required.
  8977. Nested Aliases
  8978. Aliases may invoke internal commands, external commands, or other
  8979. aliases. (However, an alias may not invoke itself, except in special cases
  8980. where an IF or IFF command is used to prevent an infinite loop.) The two
  8981. aliases below demonstrate alias nesting (one alias invoking another). The
  8982. first line defines an alias which runs a program called WP.EXE that is in the
  8983. E:\WP60\ subdirectory. The second alias changes directories with the PUSHD
  8984. command, runs the WP alias, and then returns to the original directory with
  8985. the POPD command:
  8986. c:\> alias wp = e:\wp60\wp.exe
  8987. c:\> alias w = `pushd c:\wp ^ wp ^ popd`
  8988. The second alias above could have included the full path and name of the
  8989. WP.EXE program instead of calling the WP alias. However, writing two
  8990. aliases makes the second one easier to read and understand, and makes the
  8991. first alias available for independent use. If you rename the WP.EXE
  8992. program or move it to a new directory, only the first alias needs to be
  8993. changed.
  8994. Temporarily Disabling Aliases
  8995. If you put an asterisk [*] immediately before a command in the value of
  8996. an alias definition (the part after the equal sign), it tells 4DOS not to
  8997. attempt to interpret that command as another (nested) alias. An asterisk
  8998. used this way must be preceded by a space or the command separator and
  8999. followed immediately by an internal or external command name.
  9000. By using an asterisk, you can redefine the default options for any internal
  9001. or external command. For example, suppose that you always want to use the
  9002. DIR command with the /2 (two column) and /P (pause at the end of each
  9003. page) options. The following line will do just that:
  9004. c:\> alias dir = *dir /2/p
  9005. If you didn't include the asterisk, the second DIR on the line would be the
  9006. name of the alias itself, and 4DOS would repeatedly re-invoke the DIR
  9007. alias, rather than running the DIR command. This would cause an "Alias
  9008. loop" or "Command line too long" error.
  9009. An asterisk also helps you keep the names of internal commands from
  9010. conflicting with the names of external programs. For example, suppose you
  9011. have a program called LIST.COM. Normally, the internal LIST command will
  9012. run anytime you type LIST. But two simple aliases will give you access to
  9013. both the LIST.COM program and the LIST command:
  9014. c:\> alias list = c:\util\list.com
  9015. c:\> alias display = *list
  9016. The first line above defines LIST as an alias for the LIST.COM program. If
  9017. you stopped there, the external program would run every time you typed LIST
  9018. and you would not have easy access to the internal LIST command. The
  9019. second line renames the internal LIST command as DISPLAY. The asterisk is
  9020. needed in the second command to indicate that the following word means the
  9021. internal command LIST, not the LIST alias which runs your external program.
  9022. Another way to understand the asterisk is to remember that a command is
  9023. always checked for an alias first, then for an internal or external command,
  9024. or a batch file. The asterisk at the beginning of a command name
  9025. simply skips over the usual check for aliases when processing that command,
  9026. and allows 4DOS to go straight to checking for an internal
  9027. command, external command, or batch file.
  9028. You can also use an asterisk before a command that you enter at the command
  9029. line or in a batch file. If you do, that command won't be interpreted as
  9030. an alias. This can be useful when you want to be sure you are running the
  9031. true, original command and not an alias with the same name, or temporarily
  9032. defeat the purpose of an alias which changes the meaning or behavior of a
  9033. command.
  9034. You can also disable aliases temporarily with the 664SETDOS /X command.
  9035. Partial Alias Names
  9036. You can also use an asterisk in the name of an alias. When you do, the
  9037. characters following the asterisk are optional when you invoke the alias
  9038. command. (Use of an asterisk in the alias name is unrelated to the use of
  9039. an asterisk in the alias value discussed above.) For example, with this
  9040. alias:
  9041. c:\> alias wher*eis = dir /sp
  9042. the new command, WHEREIS, can be invoked as WHER, WHERE, WHEREI, or
  9043. WHEREIS. Now if you type:
  9044. c:\> where myfile.txt
  9045. The WHEREIS alias will be expanded to the command:
  9046. dir /sp myfile.txt
  9047. Keystroke Aliases
  9048. If you want to assign an alias to a keystroke, use the keyname on the left
  9049. side of the equal sign, preceded by an at sign [@]. For example, to
  9050. assign the command DIR /W to the F5 key, type
  9051. c:\> alias @F5 = dir /w
  9052. See 893Keys and Key Names for a complete listing of key names and a
  9053. description of the key name format.
  9054. When you define keystroke aliases, the assignments will only be in effect
  9055. at the command line, not inside application programs. Be careful not to
  9056. assign aliases to keys that are already used at the command line (like
  9057. F1 for Help). The command-line meanings take precedence and the
  9058. keystroke alias will never be invoked. If you want to use one of the
  9059. command-line keys for an alias instead of its normal meaning, you must
  9060. first disable its regular use with the 495NormalKey or
  9061. 521NormalEditKey directives in 4DOS.INI.
  9062. If you define a keystroke alias with a single at sign as shown above, then,
  9063. when you press the F5 key, the value of the alias (DIR /W above) will
  9064. be placed on the command line for you. You can type additional parameters
  9065. if you wish and then press Enter to execute the command. With this
  9066. particular alias, you can define the files that you want to display after
  9067. pressing F5 and before pressing Enter to execute the command.
  9068. If you want the keystroke alias to take action automatically without
  9069. waiting for you to edit the command line or press Enter, you can begin
  9070. the definition with two at signs [@@]. 4DOS will execute the alias
  9071. "silently," without displaying its text on the command line. For example,
  9072. this command will assign an alias to the F6 key that uses the CDD
  9073. command to take you back to the previous default directory:
  9074. c:\> alias @@f6 = cdd -
  9075. When you define keystroke aliases, the assignments will only be in effect at
  9076. the command line, not inside application programs. Be careful not to assign
  9077. aliases to keys that are already used at the command line (like F1 for
  9078. Help). The command-line meanings take precedence and the keystroke alias
  9079. will never be invoked. If you want to use one of the command-line keys for
  9080. an alias instead of its normal meaning, you must first disable its regular
  9081. use with the 495NormalKey or 521NormalEditKey directives in your .INI
  9082. file.
  9083. You can also define a keystroke alias by using "@" or "@@" plus a scan
  9084. code for one of the permissible keys (see 911ASCII and Key Codes for
  9085. a list of scan codes). In most cases it will be easier to use key
  9086. names. Scan codes should only be used with unusual keyboards where a key
  9087. name is not available for the key you are using.
  9088. Note that it is possible for more than one keystroke alias to refer to the
  9089. same key. For example, @F2, @@F2, @60, and @@60 are all valid aliases for
  9090. the F2 key. If you have multiple aliases for the same key, the first
  9091. definition in the alias list will be used.
  9092. Displaying Aliases
  9093. If you want to see a list of all current ALIAS commands, type:
  9094. c:\> alias
  9095. You can also view the definition of a single alias. For example, if you
  9096. want to see the definition of the alias LIST, you can type:
  9097. c:\> alias list
  9098. And you can view the definitions for all aliases matching a specific pattern
  9099. by specifying a single parameter containing 073wildcards. For example:
  9100. c:\> alias *win*
  9101. will display all aliases containing the string win.
  9102. Saving and Reloading Your Aliases
  9103. You can save your aliases to a file called ALIAS.LST this way:
  9104. c:\> alias > alias.lst
  9105. You can then reload all the alias definitions in the file the next time you
  9106. start a vDosPlus session:
  9107. c:\> alias /r alias.lst
  9108. This is much faster than defining each alias individually in a batch file. If
  9109. you keep your alias definitions in a separate file which you load when
  9110. your system starts, you can edit them with a text editor, reload the edited
  9111. file with ALIAS /R, and know that the same alias list will be loaded the
  9112. next time you start the vDosPlus session.
  9113. When you define aliases in a file that will be read with the ALIAS /R
  9114. command, you do not need back-quotes around the value, even if back-quotes
  9115. would normally be required when defining the same alias at the command line
  9116. or in a batch file.
  9117. To remove an alias, use the 678UNALIAS command.
  9118. Alias Parameters
  9119. Aliases can use command-line arguments or parameters like those in batch
  9120. files. The command-line arguments are numbered from %0 to %255. %0
  9121. contains the alias name. It is up to the alias to determine the
  9122. meaning of the other parameters. You can use quotation marks to pass
  9123. spaces, tabs, commas, and other special characters in an alias parameter;
  9124. see 118Argument Quoting for details.
  9125. Parameters that are referred to in an alias, but which are missing on the
  9126. command line, appear as empty strings inside the alias. For example, if
  9127. you put two parameters on the command line, any reference in the alias to
  9128. %3 or any higher-numbered parameter will be interpreted as an empty
  9129. string.
  9130. The parameter %n& has a special meaning. 4DOS interprets it to mean
  9131. "the entire command line, from argument n to the end." If n is not
  9132. specified, it has a default value of 1, so %& means "the entire command
  9133. line after the alias name." The special parameter %# contains the number
  9134. of command-line arguments. If you wish to use a symbol other than the
  9135. ampersand [&] to refer to multiple arguments, you can use the
  9136. 439ParameterChar directive in 4DOS.INI or the 664SETDOS /P command
  9137. to define a different parameter character.
  9138. For example, the following alias will change directories, perform a
  9139. command, and return to the original directory:
  9140. c:\> alias in `pushd %1 ^ %2& ^ popd`
  9141. When this alias is invoked as:
  9142. c:\> in c:\comm mycomm /zmodem /56K
  9143. the first parameter, %1, has the value c:\comm. %2 is mycomm,
  9144. %3 is /zmodem, and %4 is /56K. The command line expands into
  9145. these three separate commands:
  9146. pushd c:\comm
  9147. mycomm /zmodem /56K
  9148. popd
  9149. This next example uses the IFF command to redefine the defaults for SET. It
  9150. should be entered on one line:
  9151. c:\> alias set = `iff %# == 0 then ^ *set /p ^ else ^ *set %& ^ endiff`
  9152. This modifies the SET command so that if SET is entered with no arguments,
  9153. it is replaced by SET /P (pause after displaying each page), but if SET is
  9154. followed by an argument, it behaves normally. Note the use of asterisks
  9155. (*set) to prevent alias loops.
  9156. If an alias uses parameters, command-line arguments will be deleted up
  9157. to and including the highest referenced argument. For example, if an alias
  9158. refers only to %1 and %4, then the first and fourth arguments will
  9159. be used, the second and third arguments will be discarded, and any
  9160. additional arguments beyond the fourth will be appended to the expanded
  9161. command (after the value portion of the alias). If an alias uses no
  9162. parameters, all of the command-line arguments will be appended to the
  9163. expanded command.
  9164. Aliases also have full access to all variables in the environment,
  9165. internal variables, and variable functions. For example, you can create a
  9166. simple command-line calculator this way:
  9167. c:\> alias calc = `echo The answer is: %@eval[%&]`
  9168. Now, if you enter:
  9169. c:\> calc 5 * 6
  9170. the alias will display:
  9171. The answer is: 30
  9172. Expanding Aliases at the Prompt
  9173. You can expand an alias on the command line and view or edit the results by
  9174. pressing Ctrl-F after typing the alias name, but before the command is
  9175. executed. This replaces the alias with its contents, and substitutes values
  9176. for each alias paramter, just as if you had pressed the Enter key. However,
  9177. the command is not executed; it is simply redisplayed on the command line
  9178. for additional editing.
  9179. Ctrl-F is especially useful when you are developing and debugging a complex
  9180. alias, or if you want to make sure that an alias that you may have forgotten
  9181. won't change the effect of your command.
  9182. Local and Global Aliases
  9183. The aliases can be stored in either a "local" or "global" list.
  9184. With a local alias list, any changes made to the aliases will only affect
  9185. the current copy of 4DOS. They will not be visible in other shells or
  9186. other sessions. A local alias list is the default.
  9187. With a global alias list, all copies of 4DOS will share the same alias
  9188. list, and any changes made to the aliases in one copy will affect all other
  9189. copies.
  9190. You can control the type of alias list on the Startup page of the
  9191. 648OPTION dialogs, with the 385LocalAliases directive in 4DOS.INI,
  9192. with the /L and /LA 352startup options.
  9193. Whenever you start a secondary shell which uses a local alias list, it
  9194. inherits a copy of the aliases from the previous shell. However, any
  9195. changes to the aliases made in the secondary shell will affect only that
  9196. shell. If you want changes made in a secondary shell to affect the
  9197. previous shell, use a global alias list in both shells.
  9198. If you select a global alias list, you can share the aliases among all
  9199. copies of 4DOS.
  9200. The UNKNOWN_CMD Alias
  9201. If you create an alias with the name UNKNOWN_CMD, it will be executed
  9202. any time 4DOS would normally issue an "Unknown command" error message. This
  9203. allows you to define your own handler for unknown commands. When the
  9204. UNKNOWN_CMD alias is executed, the command line which generated the
  9205. error is passed to the alias for possible processing. For example, to
  9206. display the command that caused the error:
  9207. alias unknown_cmd `echo Error in command "%&"`
  9208. If the UNKNOWN_CMD alias contains an unknown command, it will call itself
  9209. repeatedly. If this occurs, 4DOS will loop up to 10 times,
  9210. then display an "UNKNOWN CMD loop" error.
  9211. Options
  9212. !INDENT 5 5 0 5
  9213. /P: (Pause) This option is only effective when ALIAS is used to
  9214. display existing definitions. It pauses the display after each page
  9215. and waits for a keystroke before continuing (see 045Page
  9216. and File Prompts).
  9217. /R: (Read file) This option loads an alias list from a file. The
  9218. format of the file is the same as that of the ALIAS display:
  9219. !INDENT 5 5 5 5
  9220. name=value
  9221. where name is the name of the alias and value is its
  9222. value. You can use an equal sign [=] or space to
  9223. separate the name and value. Back-quotes are not required
  9224. around the value. You can add comments to the file by
  9225. starting each comment line with a colon [:]. You can
  9226. load multiple files with one ALIAS /R command by placing the
  9227. names on the command line, separated by spaces:
  9228. c:\> alias /r alias1.lst alias2.lst
  9229. Each definition in an ALIAS /R file can be up to 511 characters long. The
  9230. definitions can span multiple lines in the file if each line, except the
  9231. last, is terminated with an 086escape character. If there is no
  9232. filename argument and input is redirected, ALIAS /R will read from
  9233. stdin.
  9234. !INDENT 0
  9235. ;---------------------------------------------------------------------------
  9236. !TOPIC 596 ATTRIB
  9237. !TTY
  9238. Purpose: Change or view file and subdirectory attributes.
  9239. Format: ATTRIB [/A:[[+|-]rhsad] /D /E /I"text" /N /P /Q /S] [+|-[AHRS]]
  9240. [@file] files ...
  9241. files: A file, directory, or list of files or directories on
  9242. which to operate.
  9243. @file: A text file containing the names of the files on which
  9244. to operate, one per line (see 057@file lists for
  9245. details).
  9246. /A: (Attribute select) /N(othing)
  9247. /D(irectories) /P(ause)
  9248. /E (no error messages) /Q(uiet)
  9249. /I (match descriptions) /S(ubdirectories)
  9250. Attribute flags:
  9251. +A Set the archive attribute -A Clear the archive attribute
  9252. +H Set the hidden attribute -H Clear the hidden attribute
  9253. +R Set the read-only attribute -R Clear the read-only attribute
  9254. +S Set the system attribute -S Clear the system attribute
  9255. !TTY
  9256. File Selection
  9257. Supports extended 073wildcards, 074ranges, 079multiple file
  9258. names, and 080include lists.
  9259. Usage
  9260. Every file and subdirectory has four attributes that can be turned on (set)
  9261. or turned off (cleared): Archive, Hidden, Read-only, and System.
  9262. The ATTRIB command lets you view, set, or clear attributes for any file,
  9263. group of files, or subdirectory. You can view file attributes by entering
  9264. ATTRIB without specifying new attributes (i.e., without the [+|-[AHRS]] part
  9265. of the format) or with the DIR /T command.)
  9266. The primary use of ATTRIB is to set attributes. For example, you can set
  9267. the read-only and hidden attributes for the file MEMO:
  9268. c:\> attrib +rh memo
  9269. Attribute options apply to the file(s) that follow the options on the
  9270. ATTRIB command line. The example below shows how to set different
  9271. attributes on different files with a single command. It sets the archive
  9272. attribute for all .TXT files, then sets the system attribute and clears the
  9273. archive attribute for TEST.COM:
  9274. c:\> attrib +a *.txt +s -a test.com
  9275. You must quote any file names which contain whitespace or special
  9276. characters. See 945File Names for additional details.
  9277. To change directory attributes, use the /D switch. If you give ATTRIB a
  9278. directory name instead of a file name, and omit /D, it will append "\*.*"
  9279. to the end of the name and act on all files in that directory, rather than
  9280. acting on the directory itself.
  9281. Your operating system also supports "D" (subdirectory) and "V" (volume
  9282. label) attributes. These attributes cannot be altered with ATTRIB; they
  9283. are designed to be controlled only by the operating system itself.
  9284. ATTRIB will ignore underlines in the new attribute (the [+|-[AHRS]] part
  9285. of the command). For example, ATTRIB sees these two commands as identical:
  9286. c:\> attrib +a filename
  9287. c:\> attrib +__A_ filename
  9288. This allows you to use a string of attributes from either the @ATTRIB
  9289. variable function or from ATTRIB itself (both of which use underscores to
  9290. represent attributes that are not set) and send that string back to ATTRIB
  9291. to set attributes for other files. For example, to clear the attributes of
  9292. FILE2 and then set its attributes to match those of FILE1 (enter this on
  9293. one line):
  9294. c:\> attrib -arhs file2 ^ attrib +%@attrib[file1] file2
  9295. If you include a +D / -D in the attribute list, it will set the /D
  9296. flag automatically.
  9297. Options
  9298. !INDENT 5 5 0 5
  9299. /A:: (Attribute select) Select only those files that have the
  9300. specified attribute(s) set. The colon [:] after /A is required.
  9301. !INDENT 5 5 5 5
  9302. Preceding an attribute letter with a hyphen [-] will select
  9303. files that do not have that attribute set. You can OR attributes
  9304. by preceding each attribute letter with a plus sign [+].
  9305. The attributes are:
  9306. R Read-only D subDirectory
  9307. H Hidden A Archive
  9308. S System
  9309. If no attributes are listed at all (e.g., ATTRIB /A: ...), ATTRIB will
  9310. select all files including hidden and system files. If attributes are
  9311. combined, all the specified attributes must match for a file to be
  9312. selected. For example, /A:RHS will select only those files with all
  9313. three attributes set.
  9314. The /A switch specifies which files to select, not which attributes
  9315. to set. For example, to remove the archive attribute from all hidden
  9316. files, you could use this command:
  9317. c:\> attrib /a:h -a *.*
  9318. !INDENT 5 5 0 5
  9319. /D: (Directories) If you use the /D option, ATTRIB will modify the
  9320. attributes of subdirectories in addition to files (yes, you can have a
  9321. hidden subdirectory):
  9322. !INDENT 5 5 5 5
  9323. c:\> attrib /d +h c:\mydir
  9324. In addition, the /D option will keep ATTRIB from appending "\*.*" to
  9325. the end of a directory name and modifying the attributes of all the
  9326. files in the subdirectory.
  9327. If you use a directory name instead of a file name, and omit
  9328. /D, ATTRIB will append "\*.*" to the end of the name and
  9329. act on all files in that directory, rather than acting on
  9330. the directory itself.
  9331. !INDENT 5 5 0 5
  9332. /E: (No error messages) Suppress all non-fatal error messages,
  9333. such as "File not found." Fatal error messages, such as "Drive not
  9334. ready," will still be displayed. This option is most useful in batch
  9335. files and aliases.
  9336. /I"text": Select files by matching text in their
  9337. descriptions. The text can include 073wildcards and
  9338. extended wildcards. The search text must be enclosed in
  9339. quotation marks, and must follow the /I immediately, with no
  9340. intervening spaces. You can select all filenames that have a
  9341. description with /I"[?]*", or all filenames that do not have
  9342. a description with /I"[]".
  9343. /N: (Nothing) Do everything except actually change attributes. This
  9344. option is useful for testing what the result of a complex ATTRIB
  9345. command will be.
  9346. /P: (Pause) Wait for a key to be pressed after each screen page
  9347. before continuing the display. Your options at the prompt are
  9348. explained in detail under 045Page and File Prompts.
  9349. /Q: (Quiet) This option turns off ATTRIB's normal screen output. It
  9350. is most useful in batch files.
  9351. /S: (Subdirectories) If you use the /S option, the ATTRIB
  9352. command will be applied to all matching files in the current or
  9353. named directory and all of its subdirectories. Do not use /S
  9354. with @file lists; see 057@file lists for details. Unlike most
  9355. 4DOS commands, ATTRIB /S will search into subdirectories with the
  9356. hidden or system attributes set.
  9357. !INDENT 0
  9358. For comparison with the external DOS ATTRIB command refer to
  9359. the 65535external DOS help system.
  9360. ;---------------------------------------------------------------------------
  9361. !TOPIC 597 BEEP
  9362. !TTY
  9363. Purpose: Beep the speaker or play simple music.
  9364. Format: BEEP [frequency duration ...]
  9365. frequency: The beep frequency in Hertz (cycles per second).
  9366. duration: The beep length in 1/18th second intervals.
  9367. !TTY
  9368. See also: 415BeepFreq and 416BeepLength.
  9369. Usage
  9370. BEEP generates a sound through your computer's speaker. It is normally
  9371. used in batch files to signal that an operation has been completed, or that
  9372. the computer needs attention.
  9373. Because BEEP allows you to specify the frequency and duration of the sound,
  9374. you can also use it to play simple music or to create different kinds of
  9375. signals for the user.
  9376. You can include as many frequency and duration pairs as you wish. No sound
  9377. will be generated for frequencies less than 20 Hz, allowing you to use BEEP
  9378. as a way to create short delays. The default value for frequency is 440 Hz;
  9379. the default value for duration is 2.
  9380. This batch file fragment runs a program called DEMO, then plays a few notes
  9381. and waits for you to press a key:
  9382. demo ^ beep 440 4 600 2 1040 6
  9383. pause Finished with the demo - hit a key...
  9384. The following table gives the frequency values for a five octave range
  9385. (middle C is 262 Hz):
  9386. C 131 262 523 1046 2093
  9387. C#/Db 139 277 554 1108 2217
  9388. D 147 294 587 1174 2349
  9389. D#/Eb 156 311 622 1244 2489
  9390. E 165 330 659 1318 2637
  9391. F 175 349 698 1397 2794
  9392. F#/Gb 185 370 740 1480 2960
  9393. G 196 392 784 1568 3136
  9394. G#/Ab 208 415 831 1662 3322
  9395. A 220 440 880 1760 3520
  9396. A#/Bb 233 466 932 1864 3729
  9397. B 248 494 988 1976 3951
  9398. ;---------------------------------------------------------------------------
  9399. !TOPIC 598 BREAK
  9400. !TTY
  9401. Purpose: Display, enable, or disable Ctrl-C and Ctrl-Break checking.
  9402. Format: BREAK [ON | OFF]
  9403. !TTY
  9404. Usage
  9405. The Ctrl-C and Ctrl-Break keys are used by many programs (including 4DOS)
  9406. as a signal to interrupt the current operation. BREAK controls how often
  9407. DOS checks to see if you've entered one of these keystrokes.
  9408. Normally, BREAK is turned off, and DOS only checks for Ctrl-C and
  9409. Ctrl-Break keystrokes during DOS input or output operations involving the
  9410. screen, keyboard, serial port, and printer. However, many programs don't
  9411. use DOS for these operations, and it can be difficult to interrupt them.
  9412. When BREAK is turned on, DOS checks for Ctrl-C and Ctrl-Break every time a
  9413. program calls DOS. Since most programs use DOS to access files and perform
  9414. other functions, turning BREAK on makes it much more likely that a Ctrl-C
  9415. or Ctrl-Break will be noticed. If you turn BREAK on, programs will run
  9416. slightly slower than normal (the difference is not usually noticeable).
  9417. Turning BREAK on or off only affects when DOS detects Ctrl-C and Ctrl-Break
  9418. and notifies the program you're running. Any program can choose to ignore
  9419. these signals. Also, any program can change the BREAK setting on
  9420. its own.
  9421. Type BREAK plus ON or OFF to set the BREAK status, or BREAK by itself to
  9422. display the current BREAK status.
  9423. BREAK is off by default. For more information on this command, refer to the
  9424. 65535external DOS help system.
  9425. ;---------------------------------------------------------------------------
  9426. !TOPIC 599 CALL
  9427. !TTY
  9428. Purpose: Execute one batch file from within another.
  9429. Format: CALL file
  9430. file: The batch file to execute.
  9431. !TTY
  9432. See also: 600CANCEL and 654QUIT.
  9433. Usage
  9434. CALL allows batch files to call other batch files (batch file nesting). The
  9435. calling batch file is suspended while the called (second) batch file
  9436. runs. When the second batch file finishes, the original batch file resumes
  9437. execution at the next command. If you execute a batch file from inside
  9438. another batch file without using CALL, the first batch file is terminated
  9439. before the second one starts.
  9440. The following batch file fragment compares an input line to "wp" and calls
  9441. another batch file if it matches:
  9442. input Enter your choice: %%option
  9443. if "%option" == "wp" call wp.bat
  9444. 4DOS supports batch file nesting up to 16 levels deep.
  9445. The current ECHO state is inherited by a called batch file.
  9446. The called batch file should always either return (by executing its last
  9447. line, or using the QUIT command), or terminate batch file processing with
  9448. CANCEL. Do not restart or CALL the original batch file from within the
  9449. called file as this may cause an infinite loop or a stack overflow.
  9450. CALL returns an exit code which matches the batch file return code. You
  9451. can test this exit code with the 164%_? or 162%? environment
  9452. variable, and use it with 084conditional commands.
  9453. ;---------------------------------------------------------------------------
  9454. !TOPIC 600 CANCEL
  9455. !TTY
  9456. Purpose: Terminate batch file processing.
  9457. Format: CANCEL [value]
  9458. value: The numeric exit code to return to 4DOS.
  9459. !TTY
  9460. See also: 599CALL, 624EXIT, and 654QUIT.
  9461. Usage
  9462. The CANCEL command ends all batch file processing, regardless of the batch
  9463. file nesting level. Use QUIT to end a nested batch file and return to the
  9464. previous batch file.
  9465. You can CANCEL at any point in a batch file. If CANCEL is used from within
  9466. an alias it will end execution of both the alias and any batch files
  9467. which are running at the time.
  9468. If you specify a value, CANCEL will set the ERRORLEVEL or exit code to
  9469. that value (see the 633IF command, and the 162%? variable).
  9470. ;---------------------------------------------------------------------------
  9471. !TOPIC 601 CD
  9472. !TTY
  9473. Purpose: Display or change the current directory.
  9474. Format: CD [/N] [ path | - ]
  9475. or
  9476. CHDIR [/N] [ path | - ]
  9477. path: The directory to change to, including an optional
  9478. drive name.
  9479. /N(o extended search)
  9480. !TTY
  9481. See also: 602CDD, 644MD, 653PUSHD, 655RD, 049CDPATH,
  9482. and 047Directory Navigation.
  9483. Usage
  9484. CD and CHDIR are synonyms. You can use either one.
  9485. CD lets you navigate through a drive's subdirectory structure by changing the
  9486. current working directory. If you enter CD and a directory name, the named
  9487. directory becomes the new current directory. For example, to change to the
  9488. subdirectory C:\FINANCE\MYFILES:
  9489. c:\> cd \finance\myfiles
  9490. c:\finance\myfiles>
  9491. Every disk drive on the system has its own current directory. Specifying
  9492. both a drive and a directory in the CD command will change the current
  9493. directory on the specified drive, but will not change the default drive.
  9494. For example, to change the default directory on drive A:
  9495. c:\> cd a:\utility
  9496. c:\>
  9497. Notice that this command does not change to drive A:. Use the CDD command
  9498. to change the current drive and directory at the same time.
  9499. You should quote the path name if it contains whitespace or special
  9500. characters. See 945File Names for additional details.
  9501. You can change to the parent directory with CD ..; you can also go up
  9502. one additional directory level with each additional [.]. For example,
  9503. CD .... will go up three levels in the directory tree (see
  9504. 072Extended Parent Directory Names). You can move to a sibling
  9505. directory -- one that branches from the same parent directory as the
  9506. current subdirectory -- with a command like CD ..\newdir.
  9507. If you enter CD with no argument or with only a disk drive name, it will
  9508. display the current directory on the default or named drive.
  9509. If CD cannot change to the directory you have specified it will attempt
  9510. to search the 049CDPATH and the 048extended directory search
  9511. database in order to find a matching directory and switch to it. You
  9512. can use wildcards in the path to force an extended directory search.
  9513. See 047Directory Navigation for complete details on these and other
  9514. directory navigation features. To disable extended directory searches
  9515. for the current command (e.g. in a batch file) see the /N option
  9516. below.
  9517. CD saves the current directory before changing to a new directory. You can
  9518. switch back to the previous directory by entering CD - (there must be
  9519. a space between the CD command and the hyphen). You can switch back and
  9520. forth between two directories by repeatedly entering CD -. The saved
  9521. directory is the same for both the CD and CDD commands. Drive changes and
  9522. 039automatic directory changes also modify the saved directory, so
  9523. you can use CD - to return to a directory that you exited with an
  9524. automatic directory change.
  9525. Directory changes made with CD are also recorded in the directory history
  9526. list and can be displayed in the 040directory history window, which allows
  9527. you to return quickly to a recently-used directory.
  9528. You can use CD . to save the current drive and directory to the directory
  9529. history without changing directories. This might be useful if you use an
  9530. external program to navigate directories. You could create an 595alias
  9531. using CD . to stash the current location before calling the external
  9532. utility, so you can return later using CDD - or the directory history
  9533. window. For example, to save the current drive and directory before running
  9534. a program called ACD:
  9535. alias acd=`cd . %+ c:\utility\acd.exe`
  9536. CD never changes the default drive. If you change directories on one
  9537. drive, switch to another drive, and then enter CD -, the directory will
  9538. be restored on the first drive but the current drive will not be
  9539. changed. You will probably find 602CDD - more useful than CD -.
  9540. Floating drives
  9541. Under DR DOS 3.31 - 6.0 (up to 1992 issues), 4DOS fully supports the
  9542. DR DOS CD / CHDIR "floating drive" syntax to implicitly specify
  9543. ASSIGN or SUBST drives on the fly as follows:
  9544. cd d:=c: cd d:=c:\path
  9545. or or
  9546. chdir d:=c: chdir d:=c:\path
  9547. Option
  9548. !INDENT 5 5 0 5
  9549. /N: (No extended search) This option prevents CD from searching
  9550. the 048extended directory search database or displaying the
  9551. related popup window. If /N is used and the specified directory
  9552. is not found via other methods (i.e. without an extended search),
  9553. CD will display an error. This option is primarily intended for
  9554. use in batch files where you do not want CD to use "fuzzy"
  9555. directory searching or display an extended search popup window.
  9556. !INDENT 0
  9557. ;---------------------------------------------------------------------------
  9558. !TOPIC 602 CDD
  9559. !TTY
  9560. Purpose: Change the current disk drive and directory.
  9561. Format: CDD [/A /D[drive...] /N /S[drive...] /U[drive...] [ path | - ]
  9562. path: The name of the directory (or drive and directory) to
  9563. change to.
  9564. drive: A drive or list of drives to include in the extended
  9565. directory search database.
  9566. /A(ll drives) /S (build tree)
  9567. /D(elete from JPSTREE.IDX) /U(pdate tree)
  9568. /N(o extended search)
  9569. !TTY
  9570. See also: 601CD, 644MD, 653PUSHD, 655RD, 049CDPATH,
  9571. and 047Directory Navigation.
  9572. Usage
  9573. CDD is similar to the CD command, except that it also changes the default
  9574. disk drive if one is specified. CDD will change to the directory and drive
  9575. you name. To change from the root directory on drive A to the subdirectory
  9576. C:\WP:
  9577. a:\> cdd c:\wp
  9578. c:\wp>
  9579. You can change to the parent directory with CDD ..; you can also go up
  9580. one additional directory level with each additional [.]. For example,
  9581. CDD .... will go up three levels in the directory tree (see
  9582. 072Extended Parent Directory Names).
  9583. You should quote the path name if it contains whitespace or special
  9584. characters. See 945File Names for additional details.
  9585. If CDD cannot change to the directory you have specified it will attempt to
  9586. search the 049CDPATH and the 048extended directory search database in
  9587. order to find a matching directory and switch to it. You can also
  9588. use wildcards in the path to force an extended directory search. See
  9589. 047Directory Navigation for complete details on these and other directory
  9590. navigation features. To disable extended directory searches for the
  9591. current command (e.g. in a batch file) see the /N option below.
  9592. CDD saves the current drive and directory before changing to a new
  9593. directory. You can switch back to the previous drive and directory by
  9594. entering CDD - (there must be a space between the CDD command and the
  9595. hyphen). You can switch back and forth between two drives and directories
  9596. by repeatedly entering CDD -. The saved directory is the same for both
  9597. the CD and CDD commands. Drive changes and 039automatic directory
  9598. changes also modify the saved directory, so you can use CDD - to
  9599. return to a directory that you exited with a drive change or an automatic
  9600. directory change.
  9601. Directory changes made with CDD are also recorded in the directory history
  9602. list and can be displayed in the 040directory history window, which allows
  9603. you to return quickly to a recently-used directory.
  9604. CDD is also used to create and update the 048extended directory search
  9605. database (JPSTREE.IDX); see the /D /S and /U options for details.
  9606. Options
  9607. !INDENT 5 5 0 5
  9608. /A: (All drives) When CDD is used with this option, it displays the
  9609. current directory on all drives from C: to the last drive in the
  9610. system. You cannot move to a new drive and directory and use /A in
  9611. the same command.
  9612. /D: (Delete tree) remove the specified drives or directory trees from
  9613. JPSTREE.IDX.
  9614. /N: (No extended search) This option prevents CDD from searching
  9615. the 048extended directory search database or displaying the
  9616. related popup window. If /N is used and the specified directory
  9617. is not found via other methods (i.e. without an extended search),
  9618. CDD will display an error. This option is primarily intended for
  9619. use in batch files where you do not want CDD to use "fuzzy"
  9620. directory searching or display an extended search popup window.
  9621. /S: (Search tree) Builds or rebuilds the
  9622. 048extended directory search database, JPSTREE.IDX, with the
  9623. specified drives and/or directories. You cannot
  9624. move to a new drive and directory and use /S in the same command.
  9625. !INDENT 5 5 5 5
  9626. To include all local hard drives in the database use the command:
  9627. cdd /s
  9628. To limit or add to the list of drives included in the database, list
  9629. the drives and network volume names (and optionally subdirectory paths)
  9630. after the /S switch. For example, to include drives C, D, E, and the
  9631. network volume \\server\dir1 in the database, use this command:
  9632. cdd /s cde \\server\dir1
  9633. All non-hidden directories on the listed drives will be indexed;
  9634. you cannot restrict the database to certain directories within a
  9635. drive. Each time you use /S, everything in the previous directory
  9636. database is replaced by the new database that is created. If you
  9637. set the 472CompleteHidden directive, CDD will index hidden
  9638. subdirectories as well.
  9639. !INDENT 5 5 0 5
  9640. /U: (Update tree) Updates JPSTREE.IDX with the specified
  9641. drives and/or directories.
  9642. !INDENT 0
  9643. ;---------------------------------------------------------------------------
  9644. !TOPIC 603 CHCP
  9645. !TTY
  9646. Purpose: Display or change the current DOS code page.
  9647. Format: CHCP [nnn]
  9648. nnn: Specifies a code page number.
  9649. !TTY
  9650. Usage
  9651. Code page switching allows you to select different character sets for
  9652. language support.
  9653. If CHCP is entered without a number, the current code page is displayed.
  9654. If you enter CHCP plus a code page number, the DOS code page is changed.
  9655. For example, to set the code page to multilingual:
  9656. chcp 850
  9657. Eventually the number of characters not defined in the active TTF font of
  9658. vDosPlus will be shown.
  9659. ;---------------------------------------------------------------------------
  9660. !TOPIC 604 CLS
  9661. !TTY
  9662. Purpose: Clear the video display and move the cursor to the upper left
  9663. corner; optionally change the default display and border colors.
  9664. Format: CLS [[BRIght] [BLInk] fg ON [BRIght] bg] [BORder bc]
  9665. fg: The new foreground color.
  9666. bg: The new background color.
  9667. bc: The new border color.
  9668. !TTY
  9669. Usage
  9670. CLS can be used to clear the screen without changing colors, or to clear
  9671. the screen and change the screen colors simultaneously. These three
  9672. examples show how to clear the screen to the default colors, to bright
  9673. white letters on a blue background, and to bright yellow letters on a
  9674. magenta background with a blue border:
  9675. c:\> cls
  9676. c:\> cls bright white on blue
  9677. c:\> cls bri yel on mag bor blu
  9678. CLS is often used in batch files to clear the screen before displaying
  9679. text.
  9680. See 892Colors and Color Names for details about colors and notes on
  9681. the use of bright background colors.
  9682. ;---------------------------------------------------------------------------
  9683. !TOPIC 605 COLOR
  9684. !TTY
  9685. Purpose: Change the default display colors.
  9686. Format: COLOR [BRIght] [BLInk] fg ON [BRIght] bg [BORder bc]
  9687. fg: The new foreground color.
  9688. bg: The new background color.
  9689. bc: The new border color.
  9690. !TTY
  9691. See also: 068SETCOLOR, 604CLS, and 892Colors and Color Names for
  9692. details about using colors.
  9693. Usage
  9694. COLOR is normally used in batch files before displaying text. For example,
  9695. to set screen colors to bright white on blue, you can use this command:
  9696. c:\> color bright white on blue
  9697. COLOR will not change anything on the screen. It will only set the default
  9698. colors for subsequent screen displays.
  9699. If you see odd characters like "[44;37m" when you try to set the screen
  9700. colors, 4DOS probably thinks you have an ANSI driver loaded when you
  9701. don't. Use 664SETDOS /A2, the Display page of the 648OPTION dialogs,
  9702. or 412ANSI = No in 4DOS.INI, to tell 4DOS you have no ANSI driver.
  9703. ;---------------------------------------------------------------------------
  9704. !TOPIC 606 COPY
  9705. !TTY
  9706. Purpose: Copy data between disks, directories, files, or physical
  9707. hardware devices (such as your printer or serial port).
  9708. Format: COPY [/A:[[+|-]rhsad] /C /E /G /H /I"text" /K /M /N /O /P /Q /R /S
  9709. /T /U /V /X /Z] [@file] source[+] ... [/A /B] destination
  9710. source: File or list of files or a device to copy from.
  9711. destination: File, directory, or device to copy to.
  9712. @file: Text file containing the names of the source
  9713. files, one per line (see 057@file lists for
  9714. details).
  9715. /A(SCII) /O (copy if not exist)
  9716. /A: (Attribute select) /P(rompt)
  9717. /B(inary) /Q(uiet)
  9718. /C(hanged) /R(eplace)
  9719. /E (no error messages) /S(ubdirectories)
  9720. /G (display percent) /T(otals)
  9721. /H(idden) /U(pdate)
  9722. /I (match description) /V(erify)
  9723. /K(eep attributes) /X (clear archive)
  9724. /M(odified) /Z (overwrite)
  9725. /N(othing)
  9726. !TTY
  9727. See also: 596ATTRIB, 646MOVE, and 658REN.
  9728. File Selection
  9729. Supports extended 073wildcards, 074ranges, 079multiple file
  9730. names, and 080include lists. 074Date, time, size, or 078exclude
  9731. ranges anywhere on the line apply to all source files.
  9732. Use extended wildcards with caution on LFN volumes; see
  9733. 081LFN File Searches for details.
  9734. Usage
  9735. The COPY command accepts all traditional syntax and options and adds
  9736. many new features.
  9737. The simplest use of COPY is to make a copy of a file, like this example
  9738. which makes a copy of a file called FILE1.ABC:
  9739. c:\> copy file1.abc file2.def
  9740. You can also copy a file to another drive and/or directory. The following
  9741. command copies FILE1 to the \MYDIR directory on drive E:
  9742. c:\> copy file1 e:\mydir
  9743. Copying Files
  9744. You must quote any file names which contain whitespace or special
  9745. characters. See 945File Names for additional details.
  9746. You can copy several files at once by using 073wildcards:
  9747. c:\> copy *.txt e:\mydir
  9748. You can also list several source files in one command. The following
  9749. command copies 3 files from the current directory to the \MYDIR directory
  9750. on drive E:
  9751. c:\> copy file1 file2 file3 e:\mydir
  9752. COPY also understands 080include lists, so you can specify several
  9753. different kinds of files in the same command. This command copies the
  9754. .TXT, .DOC, and .BAT files from the E:\MYDIR directory to the root directory
  9755. of drive A:
  9756. c:\> copy e:\mydir\*.txt;*.doc;*.bat a:\
  9757. If there is only one argument on the line, COPY assumes it is the source,
  9758. and uses the current drive and directory as the destination. For example,
  9759. the following command copies all the .DAT files on drive A to the current
  9760. directory on drive C:
  9761. c:\data> copy a:*.dat
  9762. If there are two or more arguments on the line, separated by spaces,
  9763. then COPY assumes that the last argument is the destination and
  9764. copies all source files to this new location. If the destination is a
  9765. drive, directory, or device name then the source files are copied
  9766. individually to the new location. If the destination is a file name, the
  9767. first source file is copied to the destination, and any additional source
  9768. files are then appended to the new destination file.
  9769. For example, the first of these commands copies the .DAT files from the
  9770. current directory on drive A individually to C:\MYDIR (which must already
  9771. exist as a directory); the second appends all the .DAT files together into
  9772. one large file called C:\DATA (assuming C:\DATA is not a directory):
  9773. c:>\ copy a:*.dat c:\mydir\
  9774. c:>\ copy a:*.dat c:\data
  9775. When you copy to a directory, if you add a backslash [\] to the end of
  9776. the name as shown in the first example above, COPY will display an error
  9777. message if the name does not refer to an existing directory. You can use
  9778. this feature to keep COPY from treating a mistyped destination directory
  9779. name as a file name and attempting to append all your source files to a
  9780. destination file, when you really meant to copy them individually to a
  9781. destination directory.
  9782. To copy a file to a device such as the printer, use the device name as the
  9783. destination, for example:
  9784. c:\> copy schedule.txt prn
  9785. To copy text to or from the clipboard use CLIP: as the device name. Using
  9786. CLIP: with non-text data will produce unpredictable results. See
  9787. 051Redirection for additional information on CLIP:, including on when you
  9788. can use the clipboard under 4DOS.
  9789. Appending Files
  9790. A plus [+] tells COPY to append two or more files to a single
  9791. destination file. If you list several source files separated with [+]
  9792. and don't specify a destination, COPY will use the name of the first source
  9793. file as the destination, and append each subsequent file to the first file.
  9794. For example, the following command will append the contents of C:\MEMO2 and
  9795. C:\MEMO3 to C:\MEMO1 and leave the combined contents in the file named
  9796. C:\MEMO1:
  9797. c:\> copy memo1+memo2+memo3
  9798. To append the same three files but store the result in BIGMEMO:
  9799. c:\> copy memo1+memo2+memo3 bigmemo
  9800. If no destination is specified, the destination file will always be created
  9801. in the current directory even if the first source file is in another
  9802. directory or on another drive. For example, this command will append
  9803. C:\MEM\MEMO2 and C:\MEM\MEMO3 to D:\DATA\MEMO1, and leave the result in
  9804. C:\MEM\MEMO1:
  9805. c:\mem> copy d:\data\memo1+memo2+memo3
  9806. You cannot append files to a device (such as a printer); if you try to
  9807. do so, COPY will ignore the [+] signs and copy the files individually. If
  9808. you attempt to append several source files to a destination directory or
  9809. disk, COPY will append the files and place the copy in the new location
  9810. with the same name as the first source file.
  9811. Advanced Features
  9812. If your destination has wildcards in it, COPY will attempt to match them
  9813. with the source names. For example, this command copies the .DAT files
  9814. from drive A to C:\MYDIR and gives the new copies the extension .DX:
  9815. c:\> copy a:*.dat c:\mydir\*.dx
  9816. This feature can give you unexpected results if you use it with multiple
  9817. source file names. For example, suppose that drive A contains XYZ.DAT and
  9818. XYZ.TXT. The command:
  9819. c:\> copy a:\*.dat a:\*.txt c:\mydir\*.dx
  9820. will copy A:XYZ.DAT to C:\MYDIR\XYZ.DX. Then it will copy A:XYZ.TXT to
  9821. C:\MYDIR\XYZ.DX, overwriting the first file it copied.
  9822. COPY also understands 080Include Lists, so you can specify several
  9823. different kinds of files in the same command. This command copies the
  9824. .TXT, .DOC, and .BAT files from the E:\MYDIR directory to the root
  9825. directory of drive A:
  9826. c:\> copy e:\mydir\*.txt;*.doc;*.bat a:\
  9827. You can use 074Date, Time, and Size Ranges to further define the
  9828. files that you want to copy. This example copies every file in the
  9829. E:\MYDIR directory, which was created or modified yesterday, and which is
  9830. also 10,000 bytes or smaller in size, to the root directory of drive A:
  9831. c:\> copy /[d-1] /[s0,10000] e:\mydir\*.* a:\
  9832. You can also use file 078exclusion ranges to restrict the list of files
  9833. that would normally be selected with wildcards. This example copies every
  9834. file in the E:\MYDIR directory except backup (.BAK or .BK!) files:
  9835. c:\> copy /[!*.bak;*.bk!] e:\mydir\*.* a:\
  9836. COPY will normally process source files which do not have the hidden or
  9837. system attribute, and will ignore the read-only and archive attributes. It
  9838. will always set the archive attribute and clear the read-only attribute of
  9839. destination files. In addition, if the destination is an existing file with
  9840. the read-only attribute, COPY will generate an "Access Denied" error and
  9841. refuse to overwrite the file. You can alter some of these behaviors with
  9842. switches:
  9843. !INDENT 10 5 5 5
  9844. /A: Forces COPY to process source files with the attributes you
  9845. specify after the ":", or to process all source files regardless
  9846. of attributes (if /A: is used by itself).
  9847. /H Forces COPY to process hidden and system source files, as well
  9848. as normal files. The hidden and system attributes from each source
  9849. file will be preserved when creating the destination files.
  9850. /K Retains the read-only attribute from each source file when
  9851. creating the destination file. See /K below for a special note if
  9852. you are running under Novell NetWare.
  9853. /Z Forces COPY to overwrite an existing read-only destination file.
  9854. !INDENT 0
  9855. Use caution with /A:, /H, or /K when both the source and destination
  9856. directories contain file descriptions. If the source file specification
  9857. matches the description file name (normally DESCRIPT.ION), and you use a
  9858. switch which tells COPY to process hidden files, the DESCRIPT.ION file
  9859. itself will be copied, overwriting any existing file descriptions in the
  9860. destination directory. For example, if the \DATA directory contains file
  9861. descriptions this command would overwrite any existing descriptions in the
  9862. \SAVE directory:
  9863. c:\data> copy /h d*.* \save\
  9864. If you remove the hidden attribute from the DESCRIPT.ION file the same
  9865. caution applies even if you do not use /A:, /H, or /K, as DESCRIPT.ION
  9866. is then treated like any other file. You can use an 078exclusion range
  9867. to prevent the descriptions file from being copied:
  9868. c:\data> copy /[!%192_dname] /h d*.* \save\
  9869. In an LFN environment, if you COPY files with long filenames to a volume which
  9870. does not support them, 4DOS will store the destination files with their short,
  9871. FAT-compatible names. You can view the short names before executing the
  9872. COPY with the 612DIR /X command. See 945File Names for additional
  9873. details.
  9874. Options
  9875. The /A(SCII) and /B(inary) options apply to the preceding filename and
  9876. to all subsequent filenames on the command line until the file name
  9877. preceding the next /A or /B, if any. The other options (/A:, /C,
  9878. /E, /H, /K, /M, /N, /P, /Q, /R, /S, /T, /U, /V,
  9879. /X, /Z) apply to all filenames on the command line, no matter where you
  9880. put them. For example, either of the following commands could be used to
  9881. copy a font file to the printer in binary mode:
  9882. c:\> copy /b myfont.dat prn
  9883. c:\> copy myfont.dat /b prn
  9884. Some options do not make sense in certain contexts, in which case COPY will
  9885. ignore them. For example, you cannot prompt before replacing an existing
  9886. file when the destination is a device such as the printer -- there's no such
  9887. thing as an "existing file" on the printer. If you use conflicting output
  9888. options, like /Q and /P, COPY will generally take a "conservative"
  9889. approach and give priority to the option which generates more prompts or
  9890. more information.
  9891. !INDENT 5 5 0 5
  9892. /A: (ASCII) If you use /A with a source filename, the file will
  9893. be copied up to, but not including, the first Ctrl-Z (Control-Z or
  9894. ASCII 26) character in the file. (Some old applications use the
  9895. Ctrl-Z to mark the end of a file). If you use /A with a destination
  9896. filename, a Ctrl-Z will be added to the end of the file. /A is the
  9897. default when appending files, or when the destination is a device
  9898. like NUL or PRN, rather than a disk file. Also see /B.
  9899. /A:: (Attribute select) Select only those files that have the specified
  9900. attribute(s) set. The colon [:] after /A is required.
  9901. !INDENT 5 5 5 5
  9902. Preceding an attribute letter with a hyphen [-] will select
  9903. files that do not have that attribute set. You can OR attributes
  9904. by preceding each attribute letter with a plus sign [+].
  9905. The attributes are:
  9906. R Read-only S System
  9907. H Hidden A Archive
  9908. If no attributes are listed at all (e.g., COPY /A: ...), COPY will
  9909. select all files including hidden and system files (this is
  9910. equivalent to COPY /H). If attributes are combined, all the specified
  9911. attributes must match for a file to be selected. For example, /A:RHS
  9912. will select only those files with all three attributes set.
  9913. You must include the colon with this option to distinguish it from the
  9914. /A(SCII) switch, above.
  9915. See the cautionary note under Advanced Features above before using
  9916. /A: when both source and destination directories contain file
  9917. descriptions.
  9918. !INDENT 5 5 0 5
  9919. /B: (Binary) If you use /B with a source filename, the entire
  9920. file is copied; Ctrl-Z characters in the file do not affect
  9921. the copy operation. Using /B with a destination
  9922. filename prevents addition of a Ctrl-Z to the end of the
  9923. destination file. /B is the default for normal file
  9924. copies. Also see /A.
  9925. /C: (Changed files) Copy files only if the destination file
  9926. exists and is older than the source (see also /U). This option
  9927. is useful for updating the files in one directory from those in
  9928. another without copying any newly created files. (Before using
  9929. /C in a network environment be sure to read the note under /U.)
  9930. /E: (No Error messages) Suppress all non-fatal error messages, such
  9931. as "File not found." Fatal error messages, such as "Drive not ready,"
  9932. will still be displayed. This option is most useful in batch files and
  9933. aliases.
  9934. /G: Displays the percent copied. This is useful when copying large
  9935. files across a network to ensure the copy is proceeding.
  9936. /H: (Hidden) Copy all matching files including those with the hidden
  9937. and/or system attribute set. See the cautionary note under Advanced
  9938. Features above before using /H when both source and destination
  9939. directories contain file descriptions.
  9940. /I"text": Select source files by matching text in their
  9941. descriptions. The text can include 073wildcards and
  9942. extended wildcards. The search text must be enclosed in
  9943. quotation marks, and must follow the /I immediately, with no
  9944. intervening spaces. You can select all filenames that have a
  9945. description with /I"[?]*", or all filenames that do not have
  9946. a description with /I"[]".
  9947. /K: (Keep attributes) To maintain compatibility with COMMAND.COM
  9948. and NetWare, COPY normally maintains the hidden and system attributes,
  9949. sets the archive attribute, and removes the read-only attribute on the
  9950. target file. /K tells COPY to also maintain the read-only attribute
  9951. on the destination file. However, if the destination is on a Novell
  9952. NetWare volume, this option will fail to maintain the read-only
  9953. attribute. This is due to the way NetWare handles file attributes, and
  9954. is not a problem in COPY.
  9955. /M: (Modified) Copy only those files with the archive attribute set,
  9956. i.e., those which have been modified since the last backup.
  9957. The archive attribute of the source file will not be cleared after
  9958. copying; to clear it use the /X switch or use 596ATTRIB.
  9959. /N: (Nothing) Do everything except actually perform the copy. This
  9960. option is useful for testing what the result of a complex
  9961. COPY command will be. /N does not prevent creation of destination
  9962. subdirectories when it is used with /S.
  9963. /O: Only copy the source file if the target file doesn't exist.
  9964. /P: (Prompt) Ask the user to confirm each source file. Your options
  9965. at the prompt are explained in detail under 045Page and File Prompts.
  9966. /Q: (Quiet) Don't display filenames or the total number of files copied.
  9967. This option is most often used in batch files. See also
  9968. /T.
  9969. /R: (Replace) Prompt the user before overwriting an existing
  9970. file. Your options at the prompt are explained in detail under
  9971. 045Page and File Prompts. See also the 4DOS.INI 450CopyPrompt
  9972. directive.
  9973. /S: (Subdirectories) Copy the subdirectory tree starting with the
  9974. files in the source directory plus each subdirectory below that. The
  9975. destination must be a directory; if it doesn't exist, COPY will attempt
  9976. to create it. COPY will also attempt to create needed subdirectories
  9977. on the tree below the destination, including empty source
  9978. directories. If COPY /S creates one or more destination directories,
  9979. they will be added automatically to the 048Extended Directory Search
  9980. database.
  9981. !INDENT 5 5 5 5
  9982. If you attempt to use COPY /S to copy a subdirectory tree into part
  9983. of itself, COPY will detect the resulting infinite loop, display an
  9984. error message, and exit.
  9985. Do not use /S with @file lists; see 057@file lists for details.
  9986. Note that COPY /S will not search into subdirectories with the hidden
  9987. or system attributes set unless you also specify /A: or /H.
  9988. !INDENT 5 5 0 5
  9989. /T: (Totals) Turns off the display of filenames, like /Q, but does
  9990. display the total number of files copied.
  9991. /U: (Update) Copy each source file only if it is newer than a matching
  9992. destination file or if a matching destination file does not
  9993. exist (see also /C). This option is useful for keeping
  9994. one directory matched with another with a minimum of
  9995. copying.
  9996. !INDENT 5 5 5 5
  9997. The time comparisons used with /U may not always work
  9998. reliably across a network, due to differences in time zone and
  9999. in the file time storage method between the local and remote
  10000. systems. Be sure to do some non-destructive testing (e.g. with
  10001. /N) before depending on this option to yield the results you
  10002. want in a network environment.
  10003. !INDENT 5 5 0 5
  10004. /V: (Verify) Verify each disk write. This is the same as executing
  10005. the 682VERIFY ON command, but is only active during
  10006. the COPY. /V does not read back the file and compare its contents
  10007. with what was written; it only verifies that the data written to disk
  10008. is physically readable.
  10009. /X: (Clear Archive) Clear the archive attribute from the source
  10010. file after a successful copy. This option is most useful if you are
  10011. using COPY to maintain a set of backup files.
  10012. /Z: (Overwrite) Overwrite read-only destination files. Without
  10013. this option, COPY will fail with an "Access denied" error if the
  10014. destination file has its read-only attribute set.
  10015. !INDENT 0
  10016. ;---------------------------------------------------------------------------
  10017. !TOPIC 776 COUNTRY
  10018. !TTY
  10019. Purpose: Display or change the current country.
  10020. Format: COUNTRY [n]
  10021. n: A country code.
  10022. !TTY
  10023. Usage
  10024. COUNTRY can change "on the fly" the current country-specific DOS conventions
  10025. for displaying dates and times inside vDosPlus.
  10026. If you enter COUNTRY without a country code, the current country code is
  10027. displayed.
  10028. If you enter COUNTRY plus a country code, the country settings are
  10029. changed. For example, to set the country settings to those for Germany:
  10030. c:\> country 49
  10031. To set the country settings to those for Australia or International English:
  10032. c:\> country 61
  10033. ;---------------------------------------------------------------------------
  10034. !TOPIC 607 CTTY
  10035. !TTY
  10036. Purpose: Change the default console device.
  10037. Format: CTTY device
  10038. device: The new console device.
  10039. !TTY
  10040. Usage
  10041. Normally, 4DOS uses the keyboard as the standard input device and the
  10042. display as the standard output device. Together, the keyboard and display
  10043. are known as the console or CON. The CTTY command allows you to substitute
  10044. another device that can perform standard character I/O for the console.
  10045. For example to change the console to the first serial port:
  10046. c:\> ctty com1
  10047. Change the console back to the standard keyboard and display (this command
  10048. must be entered from the current console, e.g., a terminal attached to
  10049. COM1, or from a batch file):
  10050. c:\> ctty con
  10051. CTTY works only for programs and commands that use standard DOS input and
  10052. output functions. This includes all 4DOS internal commands except
  10053. 616DRAWBOX, 617DRAWHLINE, 618DRAWVLINE, 640LIST,
  10054. 660SCREEN, 661SCRPUT, 662SELECT, and 684VSCRPUT. In addition,
  10055. if you use color-coded directories you should disable them
  10056. with 612DIR /D when using CTTY. Otherwise, directories will not be
  10057. displayed correctly.
  10058. !INDENT 0
  10059. ;---------------------------------------------------------------------------
  10060. !TOPIC 608 DATE
  10061. !TTY
  10062. Purpose: Display and optionally change the system date.
  10063. Format: DATE [/T] [mm-dd-yy]
  10064. /T: (Display only)
  10065. mm: The month (1 - 12).
  10066. dd: The day (1 - 31).
  10067. yy: The year (00 - 99, or a 4-digit year).
  10068. !TTY
  10069. See also: 672TIME.
  10070. Usage
  10071. If you simply type DATE without parameters, you will see the current
  10072. system date and time, and be prompted for a new date. Press ENTER if you
  10073. don't wish to change the date. You can type a new date, but it will be ignored
  10074. by vDosPlus unless you set the SYNCTIME=OFF directive in its config file.
  10075. date
  10076. Mon June 19, 2015 9:30:06
  10077. Enter new date (mm-dd-yy):
  10078. You can also enter a new system date by typing the DATE command plus the
  10079. new date on the command line:
  10080. date 6-19-2015
  10081. Options
  10082. !INDENT 5 5 0 5
  10083. /T: (Display only) Displays the current date but does not prompt
  10084. for a new date.
  10085. !INDENT 0
  10086. ;---------------------------------------------------------------------------
  10087. !TOPIC 609 DEL
  10088. !TTY
  10089. Purpose: Erase one file, a group of files, or entire subdirectories.
  10090. Format: DEL [/A:[[+|-]rhsad] /E /F /I"text" /N /P /Q /S /T /W /X /Y /Z]
  10091. [@file] file...
  10092. or
  10093. ERASE [/A:[[+|-]rhsad] /E /F /I"text" /N /P /Q /S /T /W /X /Y /Z]
  10094. [@file] file...
  10095. file: The file, subdirectory, or list of files or
  10096. subdirectories to erase.
  10097. @file: A text file containing the names of the files or
  10098. directories to delete, one per line (see 057@file lists
  10099. for details).
  10100. /A: (Attribute select) /S(ubdirectories)
  10101. /E (no error messages) /T(otal)
  10102. /F(orce delete) /W(ipe)
  10103. /I (match descriptions) /X (remove empty subdirectories)
  10104. /N(othing) /Y(es to all prompts)
  10105. /P(rompt) /Z(ap hidden and read-only files)
  10106. /Q(uiet)
  10107. !TTY
  10108. File Selection
  10109. Supports extended 073wildcards, 074ranges (see below for
  10110. conditions), 079multiple file names, and 080include lists.
  10111. Use wildcards with caution on LFN volumes; see 081LFN File Searches for
  10112. details.
  10113. Usage
  10114. DEL and ERASE are synonyms, you can use either one.
  10115. Use the DEL and ERASE commands with caution; the files and
  10116. subdirectories that you erase may be impossible to recover without
  10117. specialized utilities and a lot of work.
  10118. To erase a single file, simply enter the file name:
  10119. c:\> del letters.txt
  10120. You can also erase multiple files in a single command. For example, to
  10121. erase all the files in the current directory with a .BAK or .PRN extension:
  10122. c:\> del *.bak *.prn
  10123. You must quote any file names which contain whitespace or special
  10124. characters. See 945File Names for additional details.
  10125. To exclude files from a DEL command, use a 078file exclusion range. For
  10126. example, to delete all files in the current directory except those whose
  10127. extension is .TXT, use a command like this:
  10128. c:\> del /[!*.TXT] *.*
  10129. When using exclusion ranges or other more complex options you may want to use
  10130. the /N switch first, to preview the effects of the DEL without actually
  10131. deleting any files.
  10132. If you enter a subdirectory name, or a filename composed only of wildcards
  10133. (* and / or ?), DEL asks for confirmation (Y or N) unless you
  10134. specified the /Y option. If you respond with a Y, DEL will delete
  10135. all the files in that subdirectory (hidden, system, and read-only files are
  10136. only deleted if you use the /Z option).
  10137. DEL displays the amount of disk space recovered, unless the /Q option
  10138. is used (see below). It does so by comparing the amount of free disk space
  10139. before and after the DEL command is executed. This amount may be incorrect
  10140. if you are using a deletion tracking system which stores deleted files in a
  10141. hidden directory, or if, under a multitasking system, another program
  10142. performs a file operation while the DEL command is executing.
  10143. Remember that DEL removes file descriptions along with files. Most
  10144. deletion tracking systems will not be able to save or recover a file's
  10145. description, even if they can save or recover the data in a file.
  10146. Use caution when using wildcards with DEL under Windows 95/98/ME. For
  10147. compatibility with COMMAND.COM, 4DOS's wildcard matching will match both
  10148. short and long filenames. This can delete files you did not expect; see
  10149. 081LFN File Searches for additional details.
  10150. When a file is deleted, its disk space is returned to the operating system
  10151. for use by other files. However, the contents of the file remain on the
  10152. disk until they are overwritten by another file. If you wish to obliterate
  10153. a file or wipe its contents clean, use DEL /W, which overwrites the file
  10154. with zeros before deleting it. Use this option with caution once a file is
  10155. obliterated, it is impossible to recover.
  10156. DEL returns a non-zero exit code if no files are deleted, or if another
  10157. error occurs. You can test this exit code with the 162%_? environment
  10158. variable, and use it with 084conditional commands) (&& and ||).
  10159. Options
  10160. !INDENT 5 5 0 5
  10161. /A:: (Attribute select) Delete only those files that have the specified
  10162. attribute(s) set. The colon [:] after /A is required.
  10163. !INDENT 5 5 5 5
  10164. Preceding an attribute letter with a hyphen [-] will select
  10165. files that do not have that attribute set. You can OR attributes
  10166. by preceding each attribute letter with a plus sign [+].
  10167. The attributes are:
  10168. R Read-only S System
  10169. H Hidden A Archive
  10170. If no attributes are listed at all (e.g., DEL /A: ...), DEL will
  10171. delete all files including hidden and system files. If attributes
  10172. are combined, all the specified attributes must match for a file
  10173. to be selected for deletion. For example, /A:RHS will select only
  10174. those files with all three attributes set.
  10175. !INDENT 5 5 0 5
  10176. /E: (No error messages): Suppress all non-fatal error messages,
  10177. such as "File not found." Fatal error messages, such as "Drive not
  10178. ready," will still be displayed. This option is most useful in batch
  10179. files and aliases.
  10180. /F: (Force delete) This option has no effect in vDosPlus.
  10181. /I"text": Select files by matching text in their
  10182. descriptions. The text can include 073wildcards and
  10183. extended wildcards. The search text must be enclosed in
  10184. quotation marks, and must follow the /I immediately, with no
  10185. intervening spaces. You can select all filenames that have a
  10186. description with /I"[?]*", or all filenames that do not have
  10187. a description with /I"[]".
  10188. /N: (Nothing) Do everything except actually delete the file(s). This
  10189. is useful for testing what the result of a DEL would be.
  10190. /P: (Prompt) Prompt the user to confirm each erasure. Your options
  10191. at the prompt are explained in detail under 045Page and
  10192. File Prompts.
  10193. /Q: (Quiet) Don't display filenames as they are deleted, or the number
  10194. of files deleted or bytes freed. DEL will run fastest if you specify the
  10195. /Q option and the filename doesn't use the extended 4DOS wildcards.
  10196. /S: (Subdirectories) Delete the specified files in this directory
  10197. and all of its subdirectories. This is can be used to delete all the
  10198. files in a subdirectory tree or even a whole disk. It should be used
  10199. with caution! Do not use /S with 057@file lists. Note that DEL
  10200. /S will not search into subdirectories with the hidden or system
  10201. attributes set unless you also specify /A: or /Z.
  10202. /T: (Total) Don't display filenames as they are deleted, but display
  10203. the total number of files deleted plus the amount of free disk
  10204. space recovered. Unlike /Q, the /T option will not
  10205. speed up deletions under DOS.
  10206. /W: (Wipe) Clear the file to zeros before deleting it. Use this
  10207. option to completely obliterate a file's contents from your disk. Once
  10208. you have used this option it is impossible to recover the file even if
  10209. you are using an undelete utility, because the contents of the file are
  10210. destroyed before it is deleted. /W overwrites the file only once; it
  10211. does not adhere to security standards which require multiple
  10212. overwrites with varying data when destroying sensitive information.
  10213. /X: (Remove subdirectories) Remove empty subdirectories
  10214. after deleting (only useful when used with /S). If DEL deletes
  10215. one or more directories, they will be removed automatically from the
  10216. 048extended directory search.
  10217. /Y: (Yes) The reverse of /P -- it assumes a Y response to
  10218. everything, including deleting an entire subdirectory tree. 4DOS
  10219. normally prompts before deleting files when the name
  10220. consists only of wildcards or a subdirectory name (see
  10221. above); /Y overrides this protection, and should be used
  10222. with extreme caution!
  10223. /Z: (Zap) Delete read-only, hidden, and system files as well as
  10224. normal files. Files with the read-only, hidden, or system
  10225. attribute set are normally protected from deletion; /Z
  10226. overrides this protection, and should be used with caution. Because
  10227. 623EXCEPT works by hiding files, /Z will
  10228. override an EXCEPT command. However, files specified in a
  10229. 078file exclusion range will not be deleted by DEL /Z.
  10230. !INDENT 5 5 5 5
  10231. For example, to delete the entire subdirectory tree starting
  10232. with C:\UTIL, including hidden and read-only files, without
  10233. prompting (use this command with CAUTION!):
  10234. c:\> del /sxyz c:\util\
  10235. !INDENT 0
  10236. ;---------------------------------------------------------------------------
  10237. !TOPIC 610 DELAY
  10238. !TTY
  10239. Purpose: Pause for a specified length of time.
  10240. Format: DELAY [/B /M time]
  10241. time: The number of seconds or milliseconds to delay.
  10242. /B(reak enabled) /M(illiseconds)
  10243. !TTY
  10244. Usage
  10245. DELAY is useful in batch file loops while waiting for something to occur.
  10246. To wait for 10 seconds:
  10247. delay 10
  10248. DELAY is most useful when you need to wait a specific amount of time for an
  10249. external event, or check a system condition periodically. For example, this
  10250. batch file checks the battery status (as reported by your Advanced Power
  10251. Management drivers) every 15 seconds, and gives a warning when battery life
  10252. falls below 30%:
  10253. do forever
  10254. iff %_apmlife lt 30 then
  10255. beep 440 4 880 4 440 4 880 4
  10256. echo Low Battery!!
  10257. endiff
  10258. delay 15
  10259. enddo
  10260. The time value can be as large as 1,073,741,823 seconds (over 34 years!).
  10261. If you don't enter a time, the default is 1 second.
  10262. 4DOS uses the minimum possible processor time during a DELAY,
  10263. in order to allow other applications full use of system resources.
  10264. You can cancel a delay by pressing Ctrl-C or Ctrl-Break.
  10265. Options
  10266. !INDENT 5 5 0 5
  10267. /B: (Break) Allows terminating a DELAY by pressing a key.
  10268. ;!INDENT 5 5 5 5
  10269. /M: (Milliseconds) Count by milliseconds instead of seconds.
  10270. Normally only used for delays of less than 1 second.
  10271. !INDENT 0
  10272. ;---------------------------------------------------------------------------
  10273. !TOPIC 611 DESCRIBE
  10274. !TTY
  10275. Purpose: Create, modify, or delete file and subdirectory descriptions.
  10276. Format: DESCRIBE [/A:[[+|-]rhsad] /I"text"][@file] file [[/D]"desc"]
  10277. file: The file, directory, or list of files and
  10278. directories to operate on.
  10279. @file: A text file containing the names of the files to
  10280. describe, one per line (see 057@file lists for
  10281. details).
  10282. "desc": The description to attach to the file.
  10283. /A: (Attribute select) /I (Match descriptions)
  10284. /D(escription follows)
  10285. !TTY
  10286. File Selection
  10287. Supports extended 073wildcards, 074ranges, 079multiple file
  10288. names, and 080include lists.
  10289. Usage
  10290. DESCRIBE adds descriptions to files and subdirectories. The descriptions
  10291. can be displayed by 612DIR in single-column mode, and by
  10292. 662SELECT. Descriptions let you identify your files in much more
  10293. meaningful ways than you can in an eight-character filename.
  10294. You enter a description on the command line by typing the DESCRIBE command,
  10295. the filename, and the description in quotation marks, like this:
  10296. c:\> describe memo.txt "Memo to Bob about party"
  10297. If you don't put a description on the command line, DESCRIBE will prompt
  10298. you for it:
  10299. c:\> describe memo.txt
  10300. Describe "memo.txt" : Memo to Bob about party
  10301. If you use wildcards or multiple filenames with the DESCRIBE command and
  10302. don't include the description text, you will be prompted to enter a
  10303. description for each file. If you do include the description on the
  10304. command line, all matching files will be given the same description.
  10305. You must quote the file name if it contains whitespace or special
  10306. characters. See 945File Names for additional details.
  10307. If you enter a quoted description on the command line, and the text matches
  10308. the name of a file in the current directory, 4DOS will
  10309. treat the string as a quoted file name, not as description text as you
  10310. intended. To resolve this problem use the /D switch immediately prior
  10311. to the quoted description (with no intervening spaces). For example, if
  10312. the current directory contains the files DATA.TST and "Test File", the
  10313. first of these commands will work as intended, but the second will not
  10314. (in the second example the string "test file" will be treated as a
  10315. second file name, when it is intended to be description text):
  10316. c:\> describe data.tst /D"test file"
  10317. c:\> describe data.tst "test file"
  10318. On drives which support long file names you will not see file descriptions
  10319. in a normal DIR display, because DIR must leave space for the long
  10320. filenames. To view the descriptions, use DIR /Z to display the directory
  10321. in FAT format. See 945File Names and the 612DIR command for
  10322. more details.
  10323. Each description can be up to 511 characters long. You can change this
  10324. limit with the 422DescriptionMax directive in 4DOS.INI. In order to fit
  10325. your descriptions on a single line in a standard DIR display, keep them to
  10326. 39 characters or less (longer descriptions are wrapped in the DIR output).
  10327. DESCRIBE can edit descriptions longer than DescriptionMax (up to 511
  10328. characters), but will not allow you to lengthen the existing text.
  10329. The descriptions are stored in each directory in a hidden file called
  10330. DESCRIPT.ION. Use the 596ATTRIB command to remove the hidden attribute
  10331. from this file if you need to copy or delete it. DESCRIPT.ION is always
  10332. created as a hidden file, but will not be re-hidden by 4DOS if you remove the
  10333. hidden attribute.
  10334. You can change the description file name with the 664SETDOS /D command,
  10335. or the 423DescriptionName directive in 4DOS.INI, and
  10336. retrieve it with the %192_DNAME internal variable. Use caution when
  10337. changing the description file name, as changing the name from the default
  10338. will make it difficult to transfer file descriptions to another system.
  10339. The description file is modified appropriately whenever you perform an
  10340. internal command which affects it (such as 606COPY, 646MOVE,
  10341. 609DEL, or 658REN), but not if you use an external
  10342. program (such as XCOPY or a visual shell). You can disable description
  10343. processing on the Options 1 page of the 648OPTION dialogs, with the
  10344. 424Descriptions directive in 4DOS.INI, or with 664SETDOS /D.
  10345. When you COPY or MOVE files between two directories, both of which have
  10346. descriptions, and you use switches which enable processing of hidden files
  10347. (or you have removed the hidden attribute from DESCRIPT.ION), you must use
  10348. caution to avoid overwriting existing file descriptions in the destination
  10349. directory with the DESCRIPT.ION file from the source directory. See the
  10350. notes under the Advanced Features sections of 606COPY and 646MOVE
  10351. for additional details.
  10352. Options
  10353. !INDENT 5 5 0 5
  10354. /A:: (Attribute select) Select only those files that have the specified
  10355. attribute(s) set. The colon [:] after /A is required.
  10356. !INDENT 5 5 5 5
  10357. Preceding an attribute letter with a hyphen [-] will select
  10358. files that do not have that attribute set. You can OR attributes
  10359. by preceding each attribute letter with a plus sign [+].
  10360. The attributes are:
  10361. R Read-only D subDirectory
  10362. H Hidden A Archive
  10363. S System
  10364. If no attributes are listed at all (e.g., DESCRIBE /A: ...), DESCRIBE will select
  10365. all files and subdirectories including hidden and system files. If
  10366. attributes are combined, all the specified attributes must match for a
  10367. file to be selected. For example, /A:RHS will select only those
  10368. files with all three attributes set.
  10369. !INDENT 5 5 0 5
  10370. /D: (Description follows) The quoted string immediately
  10371. following this switch is a description, not a file name. Use /D
  10372. to avoid any ambiguity in the meaning of quoted strings. See the
  10373. Usage section above for details.
  10374. /I"text": Select files by matching text in their
  10375. descriptions. The text can include 073wildcards and
  10376. extended wildcards. The search text must be enclosed in
  10377. quotation marks, and must follow the /I immediately, with no
  10378. intervening spaces. You can select all filenames that have a
  10379. description with /I"[?]*", or all filenames that do not have
  10380. a description with /I"[]".
  10381. !INDENT 0
  10382. ;---------------------------------------------------------------------------
  10383. !TOPIC 612 DIR
  10384. !TTY
  10385. Purpose: Display information about files and subdirectories.
  10386. !NOWRAP
  10387. Format: DIR [/1 /2 /4 /A[[:][+|-]rhsad] /B /C[HP] /D /E /F /G /H /I"text"
  10388. /J /K /L /M /N /O[[:][-]acdeginrsu] /P /R /S /T[:acw] /U[1|2] /V
  10389. /W /X /Z] [file...]
  10390. !WRAP
  10391. file: The file, directory, or list of files or directories
  10392. to display.
  10393. /1 (one column) /L(ower case)
  10394. /2 (two columns) /M (suppress footer)
  10395. /4 (four columns) /N(ormal display)
  10396. /A (Attribute select) /O(rder)
  10397. /B(are) /P(ause)
  10398. /C[HP] (Compression) /R (disable wRap)
  10399. /D(isable color) /S(ubdirectories)
  10400. /E (use upper case) /T (aTtribute)
  10401. /F(ull path) /U (sUmmary information)
  10402. /G (allocated size) /V(ertical sort)
  10403. /H(ide dots) /W(ide)
  10404. /I (match descriptions) /X (display short names)
  10405. /J(ustify names) /Z (use FAT format)
  10406. /K (suppress header)
  10407. !TTY
  10408. See also: 596ATTRIB, 611DESCRIBE, 662SELECT, and 664SETDOS.
  10409. File Selection
  10410. Supports extended 073wildcards, 074ranges, 079multiple file
  10411. names, and 080include lists.
  10412. Usage
  10413. DIR can be used to display information about files from one or more of your
  10414. disk directories, in a wide range of formats. Depending on the options
  10415. chosen, you can display the file name, attributes, and size; the time and
  10416. date of the last change to the file; the file description; and the file's
  10417. compression ratio. You can also display information in 1, 2, 4, 5, or more
  10418. columns, sort the files several different ways, use color to distinguish
  10419. file types, and pause after each full screen.
  10420. The various DIR displays are controlled through options or switches. The
  10421. best way to learn how to use the many options available with the DIR
  10422. command is to experiment. You will soon know which options you want to use
  10423. regularly. You can select those options permanently by using the 595ALIAS
  10424. command. You can override aliases by prefixing a switch with a - to
  10425. disable it.
  10426. For example, to display all the files in the current directory, in 2
  10427. columns, sorted vertically (down one column then down the next), and with a
  10428. pause at the end of each page:
  10429. dir /2/p/v
  10430. To set up this format as the default, using an alias:
  10431. alias dir=*dir /2/p/v
  10432. You must quote any file names which contain whitespace or special
  10433. characters. See 945File Names for additional details.
  10434. The following sections group DIR's features together in several
  10435. categories. Many of the sections move from a general discussion to more
  10436. technical material. If you find some of the information in a category too
  10437. detailed for your needs, feel free to skip to the beginning of the next
  10438. section. The sections are:
  10439. Selecting Files
  10440. Default DIR Output Format
  10441. Switching Formats
  10442. Multiple Column Displays
  10443. Color-Coded Directories
  10444. Redirected Output
  10445. Other Notes
  10446. Options
  10447. Selecting Files
  10448. DIR can display information about a single file or about several, dozens,
  10449. hundreds, or thousands of files at once. To display information about a
  10450. single file, just add the name of the file to the DIR command line:
  10451. dir january.wks
  10452. The simplest way to view information about several files at once is to use
  10453. 073wildcards. DIR can work with traditional wildcard characters (* and
  10454. ?) and extended wildcards. For example to display all of the .WKS files in
  10455. the current directory:
  10456. dir *.wks
  10457. To display all .TXT files whose names begin with A, B, or C:
  10458. dir [abc]*.txt
  10459. If you don't specify a filename, DIR defaults to *.* on traditional FAT
  10460. drives, and * on LFN drives. This default displays all non-hidden
  10461. files and subdirectories in the current directory. If you specify a
  10462. filename for a non-LFN drive which includes some wildcards, and does not
  10463. include an extension, DIR will append .* to it to match all extensions.
  10464. If you link two or more filenames together with spaces, DIR will display all
  10465. of the files that match the first name and then all of the files that match
  10466. the second name. You may use a different drive and path for each filename.
  10467. This example lists all of the .WKS and then all of the .WK1 files
  10468. in the current directory:
  10469. dir *.wks *.wk1
  10470. If you use an 080include list to link multiple filenames, DIR will
  10471. display the matching filenames in a single listing. Only the first filename
  10472. in an include list can have a path; the other files must be in the same
  10473. path. This example displays the same files as the previous example, but the
  10474. .WKS and .WK1 files are intermixed:
  10475. dir *.wks;*.wk1
  10476. You can include files in the current or named directory plus all of its
  10477. subdirectories by using the /S option. This example displays all of the
  10478. .WKS and .WK1 files in the D:\DATA directory and each of its subdirectories:
  10479. dir /s d:\data\*.wks;*.wk1
  10480. You can also select files by their attributes by using the /A option. For
  10481. example, this command displays the names of all of the subdirectories of the
  10482. current directory:
  10483. dir /a:d
  10484. Finally, with the /I option, DIR can select files to display based on their
  10485. descriptions (see the 611DESCRIBE command for more information on file
  10486. descriptions). DIR will display a file if its description matches the text
  10487. after the /I switch. The search is not case sensitive. You can use
  10488. wildcards and extended wildcards as part of the text. For example, to
  10489. display any file described as a "Test File" you can use this command:
  10490. dir /i"test file"
  10491. If you want to display files that include the words "test file" anywhere in
  10492. their descriptions, use extended wildcards like this:
  10493. dir /i"*test file*"
  10494. To display only those files which do not have descriptions, use:
  10495. dir /I"[]"
  10496. In addition, you can use 074ranges to select or exclude specific sets of
  10497. files. For example, to display all files modified in the last week, all
  10498. files except those with a .BAK extension, and all files over 500 KB in size:
  10499. dir /[d-7]
  10500. dir /[!*.bak]
  10501. dir /[s500K]
  10502. You can, of course, mix any of these file selection techniques in whatever
  10503. ways suit your needs.
  10504. Default DIR Output Format
  10505. DIR's output varies based on the type of volume or drive on which the
  10506. files are stored. If the volume supports long file names (VFAT volumes
  10507. under Windows 95/98/ME), the default DIR format contains 4 columns: the date
  10508. of the last file modification or write, the time of last write, the file size
  10509. in bytes, and the file name. The name is displayed as it is stored on the
  10510. disk, in upper, lower, or mixed case. DIR will wrap filenames from one line
  10511. to the next if they are too long to fit the width of the display. The
  10512. standard output format is:
  10513. Volume in drive C is C - BOOTUP Serial number is ....:....
  10514. Directory of C:\4DOS\*.*
  10515. 12-08-2002 12:17 <DIR> .
  10516. 12-08-2002 12:17 <DIR> ..
  10517. 1-04-2003 16:21 <DIR> Test
  10518. 1-10-2003 18:59 995 4dos7.pif
  10519. 1-06-2003 7:50 273,406 4DOS.COM
  10520. 1-09-2003 10:03 45 4DOS.INI
  10521. (See Switching Formats below for information on changing the standard long
  10522. filename format to allow room for file descriptions.)
  10523. On FAT volumes which do not support long file names, the default DIR format
  10524. contains 5 columns: the file name, the file size in bytes, the date of the
  10525. last write, the time of the last write, and the files description. File
  10526. names are listed in lower-case; directory names in upper case:
  10527. Volume in drive C is C - BOOTUP Serial number is ....:....
  10528. Directory of C:\4DOS\*.*
  10529. . <DIR> 12-08-02 12:17 C:\4DOS
  10530. .. <DIR> 12-08-02 12:17 C:\
  10531. TEST <DIR> 01-04-03 16:21
  10532. 4dos7.pif 995 01-10-03 18:59 4DOS PIF file
  10533. 4dos.com 273406 01-06-03 7:50 4DOS executable ...
  10534. 4dos.ini 45 01-09-03 10:03 4DOS configuration ...
  10535. DIR's output is normally sorted by name, with directories listed first. You
  10536. can change the sort order with the /O option. For example, these two
  10537. commands sort the output by date: the first command lists the oldest file
  10538. first; the second command lists the oldest file last:
  10539. dir /o:d
  10540. dir /o:-d
  10541. When displaying file descriptions, DIR wraps long lines to fit on the
  10542. screen. DIR displays a maximum of 39 characters of text in each line of a
  10543. description, unless your screen width allows a wider display. If you
  10544. disable description wrapping with the /R option, the description is
  10545. truncated at the right edge of the screen, and a right arrow [] is added at
  10546. the end of the line to alert you to the existence of additional description
  10547. text.
  10548. DIR's default output is sorted. It displays directory names first, with
  10549. "<DIR>" inserted instead of a file size, and then filenames. DIR assumes
  10550. that sequences of digits should be sorted numerically (for example, the file
  10551. DRAW2 is listed before DRAW03 because 2 is numerically smaller than 03),
  10552. rather than strictly alphabetically (where DRAW2 would come second because
  10553. "2" is after "0" in alphanumeric order). You can change the sort order with
  10554. the /O option. When DIR displays file names in a multi-column format,
  10555. it sorts file names horizontally unless you use the /V option to display
  10556. vertically sorted output.
  10557. DIR's display can be modified in many ways to meet different needs. Most of
  10558. the following sections describes the various ways you can change DIR's
  10559. output format.
  10560. Switching Formats
  10561. On volumes which support long file names, you can force DIR to use a FAT-like
  10562. format (file name first, followed by file information) with the /Z
  10563. option. If necessary, DIR /Z truncates long file names on LFN drives, and
  10564. adds a right arrow [] to show that the name contains additional characters.
  10565. The standard LFN output format does not provide enough space to show
  10566. descriptions along with file names. Therefore, if you wish to view file
  10567. descriptions as part of the DIR listing on a volume which supports long file
  10568. names, you must use the /Z option.
  10569. 4DOS will display the alternate, short file names for files with long file
  10570. names if you use the /X option. Used alone, /X causes DIR to display
  10571. names in 2 columns after the size, time, and date: one column for alternate
  10572. or short file names and the other for long file names. If a file does not
  10573. have a short or alternate name which is different from the long filename,
  10574. the first filename column is empty.
  10575. If you use /X and /Z together under 4DOS, DIR will display the short or
  10576. alternate file names in the FAT-style display format.
  10577. If you use the /B option, DIR displays just file names and omits the file
  10578. size, time stamp, and description for each file, for example:
  10579. c:\> dir w* /b
  10580. WINDOWS
  10581. WINNT
  10582. win311
  10583. WINALIAS
  10584. WINENV.BTM
  10585. .....
  10586. There are several ways to modify the display produced by /B. The /F
  10587. option is similar to /B, but displays the full path and name of each file,
  10588. instead of just its name. To view the same information for a directory and
  10589. its subdirectories use /B /S or /F /S. You can use /B /X to
  10590. display the short name of each file, with no additional information. To
  10591. display the short version of both the path and file name for each file, use
  10592. /F /X. For example:
  10593. c:\> dir /x/f/s *.pif
  10594. C:\MACH64\INSTALL.PIF
  10595. C:\PROGRA~1\WINZIP\WZ.PIF
  10596. C:\WINDOWS\DOSPRMPT.PIF
  10597. C:\WINDOWS\STARTM~1\APPS&U~1\INFOSE~1.PIF
  10598. C:\WINDOWS\STARTM~1\PROMPTS\4DOS.PIF
  10599. C:\WINDOWS\STARTM~1\PROMPTS\TOCP.PIF
  10600. C:\WINDOWS\STARTM~1\PROMPTS\SPECIAL\4DOS(R~1.PIF
  10601. .....
  10602. Multiple Column Displays
  10603. DIR has three options, /2, /4, and /W, that create multi-column
  10604. displays.
  10605. The /2 option creates a 2-column display. On drives which support long
  10606. filenames, only the name of each file is displayed, with directory names
  10607. placed in square brackets to distinguish them from file names. On drives
  10608. which do not support long filenames, or when /Z or /X is used (see
  10609. below), the display includes the name, file size, and time stamp for each
  10610. file.
  10611. The /4 option is similar to /2, but displays directory information in 4
  10612. columns. On drives which do not support long filenames, or when the /Z
  10613. or /X is used (see below), the display shows the file name and the file
  10614. size in kilobytes (KB), megabytes (MB) or gigabytes (GB), with "<D>" in the
  10615. size column for directories.
  10616. The /W option displays directory information in 5 or more columns,
  10617. depending on your screen width. Each entry in a DIR /W display contains
  10618. either the name of a file or the name of a directory. Directory names are
  10619. placed in square brackets to distinguish them from file names.
  10620. If you use one of these options on a drive that supports long file names,
  10621. and do not select an alternate display format with /Z or /X, the actual
  10622. number of columns will be based on the longest name to be
  10623. displayed and your screen width, and may be less than the number you
  10624. requested (for example, you might see only three columns even though you
  10625. used /4). If the longest name is too long to fit in on a single line the
  10626. display will be reduced to one column, and each name will be wrapped,
  10627. with "extra" blank lines added so that each name takes the same number of
  10628. lines.
  10629. On LFN drives you can use /Z with any of the multi-column options to create
  10630. a traditional FAT-format display, with long names truncated to fit in the
  10631. available space. If you use /X, the traditional FAT-format display is
  10632. also used, but short names are displayed (rather than truncated long
  10633. names). The following table summarizes the effects of different options on
  10634. LFN drives:
  10635. !NOWRAP
  10636. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
  10637. ³ Display Columns ³
  10638. ÚÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  10639. ³ Format ³ Normal ³ /2 or /4 ³ /W ³
  10640. ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  10641. ³ Normal ³ 1 column, long ³ 2 - 4 columns, ³ No. of columns ³
  10642. ³ ³ names plus size, ³ long names only ³ based on longest ³
  10643. ³ ³ date, time ³ ³ name, long names ³
  10644. ³ ³ ³ ³ only ³
  10645. ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  10646. ³ /Z ³ 1 column, ³ 2 - 4 columns, ³ 5+ columns, ³
  10647. ³ ³ truncated long ³ truncated long ³ truncated long ³
  10648. ³ ³ names plus size, ³ names plus other ³ names only ³
  10649. ³ ³ date, time ³ info ³ ³
  10650. ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  10651. ³ /X ³ 1 column, both ³ 2 - 4 columns, ³ 5+ columns, ³
  10652. ³ ³ names plus size, ³ short names ³ short names ³
  10653. ³ ³ date, time ³ plus other info ³ only ³
  10654. ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  10655. ³ /Z /X ³ 1 column, short ³ (Same as /X ³ (Same as /X ³
  10656. ³ ³ names plus size, ³ alone) ³ alone) ³
  10657. ³ ³ date, time ³ ³ ³
  10658. ÀÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  10659. !WRAP
  10660. Color-Coded Directories
  10661. The DIR command can display each file name and the associated file
  10662. information in a different color, depending on the file's extension.
  10663. To choose the display colors, you must either use the 663SET command to
  10664. create an environment variable called 133COLORDIR, or use the Commands
  10665. page of the 648OPTION dialogs or a text editor to set the 463ColorDir
  10666. directive in your .INI file. If you do not use the COLORDIR variable or the
  10667. ColorDir directive, DIR will use the default screen colors for all files.
  10668. If you use both the COLORDIR variable and the ColorDir directive, the
  10669. environment variable will override the settings in your .INI file. You may
  10670. find it useful to use the COLORDIR variable for experimenting, then to set
  10671. permanent directory colors with the ColorDir directive.
  10672. The format for both the COLORDIR environment variable and the ColorDir
  10673. directive in the .INI file is:
  10674. ext ... :ColorName; ...
  10675. where "ext" is a file extension (which may include wildcards) or one of the
  10676. following file types:
  10677. DIRS Directories
  10678. RDONLY Read-only files
  10679. HIDDEN Hidden files
  10680. SYSTEM System files
  10681. ARCHIVE Files modified since the last backup
  10682. and "ColorName" is any valid color name (see 892Colors and Color Names).
  10683. Unlike most color specifications, the background portion of the color name
  10684. may be omitted for directory colors. If you don't specify a background
  10685. color, DIR will use the current screen background color.
  10686. For example, to display the .COM and .EXE files in red on the current
  10687. background, the .C and .ASM files in bright cyan on the current background,
  10688. and the read-only files in blinking green on white (this should be entered
  10689. on one line):
  10690. c:\> set colordir=com exe:red; c asm:bright cyan;
  10691. rdonly:blink green on white
  10692. Extended 073wildcards can be used in directory color specifications. For
  10693. example, to display .BAK, .BAX, and .BAC files in red:
  10694. c:\> set colordir=BA[KXC]:red
  10695. Redirected Output
  10696. The output of the DIR command, like that of most other internal commands, can
  10697. be redirected to a file, printer, serial port, or other device. However, you
  10698. may need to take certain DIR command options into account when you redirect
  10699. DIR's output.
  10700. DIR wraps both long file names and file descriptions at the width of your
  10701. display. Its redirected output will also wrap at the screen width. Use the
  10702. /R option if you wish to disable wrapping of long descriptions.
  10703. If you redirect a color-coded directory to a file, DIR will remove the color
  10704. data as it sends the directory information to a file. It will usually do the
  10705. same if you redirect output to a character device such as a printer or serial
  10706. port. However, it is not always possible for DIR to tell whether or not a
  10707. device is a character device. If you notice that non-colored lines are being
  10708. sent to the output device and colored lines are appearing on your screen, you
  10709. can use the /D option to temporarily disable color-coding when you redirect
  10710. DIR's output.
  10711. To redirect DIR output to the clipboard, use CLIP: as the output device name,
  10712. for example:
  10713. c:\> dir *.exe > clip:
  10714. Other Notes
  10715. If you have selected a specific country code for your system, DIR will
  10716. display the date in the format for that country. The default date format is
  10717. U.S. (mm-dd-yy). The separator character in the file time will also be
  10718. affected by the country code. Thousands and decimal separators in numeric
  10719. displays are affected by the country code, and by the 445ThousandsChar
  10720. and 421DecimalChar settings selected on the Options 1 page of the
  10721. 648OPTION dialogs, or in the .INI file.
  10722. DIR can generally display any file date between January 1, 1980 and
  10723. December 31, 2099 if the date is supplied properly by the operating
  10724. system.
  10725. DIR can handle directories of any size, limited only by available
  10726. memory. Each short filename requires 64 bytes of memory, plus the
  10727. size of the description (if any). For example, a system with just 128K of
  10728. free memory can display up to about 2,000 files per directory. Additional
  10729. space is required when using DIR /S, particularly with deeply-nested
  10730. directories.
  10731. Options
  10732. Options on the command line apply only to the filenames which follow the
  10733. option, and options at the end of the line apply to the preceding filename
  10734. only. This allows you to specify different options for different groups of
  10735. files, yet retains compatibility with the traditional DIR command when a
  10736. single filename is specified.
  10737. !INDENT 5 5 0 5
  10738. /1: (Single column) Display the filename, size, date,
  10739. and time; also displays the description on drives which do not
  10740. support long filenames. This is the default. If /T is used the
  10741. attributes are displayed instead of the description; if
  10742. /C or /O:c is used the compression ratio is displayed
  10743. instead of the description. This option is most useful if you wish
  10744. to override a default /2, /4, or /W setting stored in an alias.
  10745. /2: (Two columns) Display just the filename, size, date, and time.
  10746. See Multiple Column Displays above for more details.
  10747. /4: (Four columns) Display just the filename and size, in K
  10748. (kilobytes), M (megabytes) or G (gigabytes), with files between 1 and
  10749. 9.9 megabytes and files over 1 gigabyte in size displayed in tenths
  10750. (i.e. "2.4M"). See Multiple Column Displays above for more details.
  10751. /A: (Attribute select) Display only those files that have the
  10752. specified attribute(s) set. The colon [:] after /A is optional.
  10753. !INDENT 5 5 5 5
  10754. Preceding an attribute letter with a hyphen [-] will select
  10755. files that do not have that attribute set. You can OR attributes
  10756. by preceding each attribute letter with a plus sign [+].
  10757. The attributes are:
  10758. R Read-only D subDirectory
  10759. H Hidden A Archive
  10760. S System
  10761. If no attributes are listed at all (e.g., DIR /A ...), DIR
  10762. will display all files and subdirectories including hidden
  10763. and system files. If attributes are combined, all the
  10764. specified attributes must match for a file to be included in
  10765. the listing. For example, /A:RHS will display only
  10766. those files with all three attributes set.
  10767. !INDENT 5 5 0 5
  10768. /B: (Bare) Suppress the header and summary lines, and display file
  10769. or subdirectory names only, in a single column. This option
  10770. is most useful when you want to redirect a list of names to
  10771. a file or another program. If you use /B with /S,
  10772. DIR will show the full path of each file (the same display as /F)
  10773. instead of simply its name and extension. If you use /B with /X on
  10774. an LFN drive, DIR will display the short name of each file instead of
  10775. the long name.
  10776. /C: (Compression) Display per-file and total compression ratio on
  10777. compressed drives. The compression ratio is displayed
  10778. instead of the file description or attributes. The ratio is
  10779. left blank for directories and files with a length of 0
  10780. bytes, and for files on non-compressed drives. /C only
  10781. works in single-column mode; it is ignored if /2,
  10782. /4, or /W is used.
  10783. !INDENT 5 5 0 5
  10784. /D: (Disable color coding) Temporarily disable directory color
  10785. coding. May be required when color-coded directories are
  10786. used and DIR output is redirected to a character device like
  10787. the printer (e.g., PRN or LPT1 to 3) or serial port (e.g., AUX
  10788. or COM1 to 4). /D is not required when DIR output is redirected
  10789. to a file.
  10790. /E: (Case) Display filenames in the traditional upper case; also see
  10791. 664SETDOS /U and the 446UpperCase directive in 4DOS.INI.
  10792. /F: (Full path) Display each filename with its drive letter and
  10793. path in a single column, without other information. If you use /F
  10794. with /X on a volume which supports long filenames, the "short"
  10795. version of the entire path is displayed.
  10796. /G: Display the allocated disk space instead of the
  10797. actual size of each file.
  10798. /H: (Hide dots) Suppress the display of the "." and ".." directories.
  10799. /I"text": Select files by matching text in their
  10800. descriptions. The text can include 073wildcards and
  10801. extended wildcards. The search text must be enclosed in
  10802. quotation marks, and must follow the /I immediately, with no
  10803. intervening spaces. You can select all filenames that have a
  10804. description with /I"[?]*", or all filenames that do not have
  10805. a description with /I"[]".
  10806. !INDENT 5 5 5 5
  10807. The /I option may be used to select files even if descriptions are not
  10808. displayed (for example, if /2 is used). However, /I will be
  10809. ignored if /C or /O:c is used.
  10810. !INDENT 5 5 0 5
  10811. /J: (Justify names) Align filename extensions and display
  10812. them in the traditional format.
  10813. /K: (Suppress header) Suppress the disk and directory name display.
  10814. /L: (Lower case) Display file and directory names in lower case; also
  10815. see 664SETDOS /U and the 446UpperCase directive in 4DOS.INI.
  10816. /M: (Suppress footer) Suppress the file and byte count totals display.
  10817. /N: (Normal) Reset the DIR options to the default values. This is
  10818. useful when you want to display some files in one format, and then
  10819. change back to the defaults for another set of files.
  10820. /O: (Order) Set the sorting order. You may use any combination of the
  10821. following sorting options; if multiple options are used, the
  10822. listing will be sorted with the first sort option as the
  10823. primary key, the next as the secondary key, and so on:
  10824. !INDENT 5 5 5 5
  10825. - Reverse the sort order for the next option.
  10826. a Sort names and extensions in standard ASCII order, rather
  10827. than sorting numerically when digits are included in the
  10828. name or extension.
  10829. c Sort by compression ratio (the least compressed file in
  10830. the list will be displayed first). For single-column
  10831. directory displays in the traditional short filename
  10832. format, the compression ratios will be used as the basis
  10833. of the sort and will also be displayed. For wider
  10834. displays (/2, /4, and /W) and displays in LFN format,
  10835. the compression ratios will be used to determine the order
  10836. but will not be displayed. If /O:c is used with /CH or
  10837. /CHP, the sort will be based on the host-drive
  10838. compression ratios. For information on supported
  10839. compression systems, see /C above.
  10840. d Sort by date and time (oldest first); for drives which
  10841. support long filenames, also see /T.
  10842. e Sort by extension.
  10843. g Group subdirectories first, then files.
  10844. i Sort by the file description (ignored if /C or /O:c is
  10845. also used).
  10846. n Sort by filename (this is the default).
  10847. r Reverse the sort order for all options.
  10848. s Sort by size.
  10849. u Unsorted.
  10850. !INDENT 5 5 0 5
  10851. /P: (Pause) Wait for a key to be pressed after each screen page
  10852. before continuing the display. Your options at the prompt are
  10853. explained in detail under 045Page and File Prompts.
  10854. /R: (Disable Wrap) Forces long descriptions to be displayed on a
  10855. single line, rather than wrapped onto two or more lines. Use
  10856. /R when output is redirected to a character device,
  10857. such as a serial port or the printer; or when you want
  10858. descriptions truncated, rather than wrapped, in the on-screen display.
  10859. /S: (Subdirectories) Display file information from the current
  10860. directory and all of its subdirectories. DIR will only
  10861. display headers and summaries for those directories which
  10862. contain files that match the filename(s), ranges, and attributes
  10863. that you specify. Note that DIR /S will not search into
  10864. subdirectories with the hidden or system attributes set unless you
  10865. also specify /A:.
  10866. /T: (Attribute display) Display the filenames and attributes. /T
  10867. is ignored if /C or /O:c is also used. The attributes are
  10868. displayed in the format RHDSA, with the following meanings:
  10869. !INDENT 5 5 5 5
  10870. The attributes are:
  10871. R Read-only D subDirectory
  10872. H Hidden A Archive
  10873. S System
  10874. On drives which support long file names, if you wish to add another
  10875. option after /T, you must start the next option with a forward
  10876. slash. If you dont, 4DOS will interpret the /T as
  10877. the /T:acw time display switch (see below) and the following
  10878. character as a time selector. For example:
  10879. c:\> dir /tz incorrect, will display error
  10880. c:\> dir /t/z correct
  10881. !INDENT 5 5 5 5
  10882. a Last access date (access time is not saved).
  10883. c Creation date and time.
  10884. w Last write date and time (default).
  10885. !INDENT 5 5 0 5
  10886. /U: (Summary information) Only display the number of files, the total
  10887. file size, and the total amount of disk space used. There are two
  10888. additional /U options:
  10889. !INDENT 5 5 5 5
  10890. /U1 Display summaries for each directory, but no total
  10891. for each parent directory.
  10892. /U2 Display grand total only.
  10893. !INDENT 5 5 0 5
  10894. /V: (Vertical sort) Display the filenames sorted vertically rather
  10895. than horizontally (use with the /2, /4, or /W options).
  10896. /W: (Wide) Display filenames only, horizontally across the
  10897. screen. On drives which do not support long filenames, or when used
  10898. with /Z or /X under 4DOS, /W displays as many columns as it can
  10899. fit into 4DOS window, using 16 characters in each
  10900. column. Otherwise (i.e., when long filenames are displayed) the number
  10901. of columns depends on the width of the longest name in the listing. See
  10902. Multiple Column Display above for more details.
  10903. /X: Selects short filenames in the /2, /4, /B, /W, and /Z
  10904. displays, and short file and path names in the /F display.
  10905. /Z: Display filenames on LFN drives in the traditional FAT format,
  10906. with the short filename at the left and the description at the right.
  10907. Long names will be truncated to 12 characters unless /X is also used;
  10908. if the name is longer than 12 characters, it will be followed by a right
  10909. arrow [] to show that one or more characters have been truncated.
  10910. !INDENT 0
  10911. ;---------------------------------------------------------------------------
  10912. !TOPIC 613 DIRHISTORY
  10913. !TTY
  10914. Purpose: Display, add to, clear, or read the directory history list.
  10915. Format: DIRHISTORY [/A directory /F /P /R filename]
  10916. directory: The name of a directory to be added to the
  10917. directory history.
  10918. filename: The name of a file containing entries to be
  10919. added to the directory history.
  10920. /A(dd) /P(ause)
  10921. /F(ree) /R(ead)
  10922. !TTY
  10923. See also: 632HISTORY.
  10924. Usage
  10925. Every time you change to a new directory or drive, 4DOS record the current
  10926. directory in an internal directory history list. See
  10927. 040Directory History for information on directory history window, which
  10928. allows you to use the list to return to a previous directory. Also see
  10929. 047Directory Navigation.
  10930. The DIRHISTORY command lets you view and manipulate the directory history
  10931. list directly. If no parameters are entered, DIRHISTORY will display the
  10932. current directory history list:
  10933. c:\> dirhistory
  10934. With the options explained below, you can clear the list, add new directories
  10935. to the list without changing to them, save the list in a file, or read a new
  10936. list from a file.
  10937. The number of directories saved in the directory history list depends on the
  10938. length of each directory name. The list size can be specified at startup
  10939. from 256 to 2048 characters by using the 376DirHistory directive in
  10940. 4DOS.INI. The default size is 256 characters.
  10941. Your directory history list can be stored either locally (a separate history
  10942. list for each copy of 4DOS) or globally (all copies of 4DOS share the same
  10943. list). See 040Directory History for a
  10944. discussion of local and global directory history lists.
  10945. You can save the directory history list by redirecting the output of
  10946. DIRHISTORY to a file. This example saves the history to a file called
  10947. DIRHIST and reads it back again:
  10948. c:\> dirhistory > dirhist
  10949. .....
  10950. c:\> dirhistory /r dirhist
  10951. Because the directory history stores each name only once, you don't have to
  10952. delete its contents before reading back the file unless you want to delete
  10953. the directories that were visited by the intervening commands.
  10954. If you need to save your directory history at the end of each day's work, you
  10955. might use commands like this in your AUTOEXEC.BAT or other startup file:
  10956. if exist c:\dirhist dirhistory /r c:\dirhist
  10957. alias shut*down `dirhistory > c:\dirhist`
  10958. This restores the previous history list if it exists, then defines an alias
  10959. which will allow you to save the history before shutting off the system.
  10960. Options
  10961. !INDENT 5 5 0 5
  10962. /A: (Add) Add a directory to the directory history list.
  10963. /F: (Free) Erase all entries in the directory history list.
  10964. /P: (Prompt) Wait for a key after displaying each page of the
  10965. list. Your options at the prompt are explained in detail in
  10966. 045Page and File Prompts.
  10967. /R: (Read) Read the directory history from the specified
  10968. file and append it to the list currently held in memory.
  10969. !INDENT 0
  10970. ;---------------------------------------------------------------------------
  10971. !TOPIC 614 DIRS
  10972. !TTY
  10973. Purpose: Display the current directory stack.
  10974. Format: DIRS
  10975. !TTY
  10976. See also: 653PUSHD, 651POPD, and 047Directory Navigation.
  10977. Usage
  10978. The PUSHD command adds the current default drive and directory to the
  10979. directory stack, a list that 4DOS maintains in memory. The POPD command
  10980. removes the top entry of the directory stack and makes that drive and
  10981. directory the new default. The DIRS command displays the contents of the
  10982. directory stack, with the most recent entries last (i.e., the next POPD
  10983. will retrieve the last entry that DIRS displays).
  10984. The directory stack holds 511 characters, enough for 20 to 40 typical drive
  10985. and directory entries.
  10986. !INDENT 0
  10987. ;---------------------------------------------------------------------------
  10988. !TOPIC 615 DO
  10989. !TTY
  10990. Purpose: Create loops in batch files.
  10991. Format: DO [n | FOREVER]
  10992. or
  10993. DO varname = start TO end [BY n]
  10994. or
  10995. DO [WHILE | UNTIL] condition
  10996. or
  10997. DO varname IN [range /A:[[+|-]rhsad] /I"text" /L] [@]fileset
  10998. commands
  10999. [ITERATE]
  11000. [LEAVE]
  11001. commands
  11002. ENDDO
  11003. !TTY
  11004. varname: The environment variable that will hold the
  11005. loop counter, filename, or line from a file.
  11006. n, start, end: Integers between 0 and 2,147,483,647 inclusive,
  11007. or an internal variables or variable function that
  11008. evaluates to such a value.
  11009. condition: A test to determine if the loop should be
  11010. executed.
  11011. fileset: A list of wildcard patterns to match, or (if /L
  11012. is specified) literal values to process.
  11013. commands: One or more commands to execute each time
  11014. through the loop. If you use multiple commands,
  11015. they must be separated by command separators or be
  11016. placed on separate lines.
  11017. !TTY
  11018. /A: (Attribute select) /I (match descriptions)
  11019. /L(iteral arguments)
  11020. !TTY
  11021. File Selection
  11022. Supports extended 073wildcards, 074ranges, and 080include lists for
  11023. the fileset. Date, time, or size ranges must appear immediately following
  11024. the IN keyword (not after the command itself, as with most 4DOS commands!)
  11025. Usage
  11026. DO can only be used in batch files. It cannot be used in aliases.
  11027. DO can be used to create four different kinds of loops. The first,
  11028. introduced by DO n, is a counted loop. The batch file lines between DO and
  11029. ENDDO are repeated n times. For example:
  11030. do 5
  11031. beep
  11032. enddo
  11033. You can also specify "forever" for n if you wish to create an endless loop
  11034. (you can use LEAVE or 630GOTO to exit such a loop; see below for details).
  11035. The second type of loop is similar to a "for loop" in programming languages
  11036. like BASIC. DO creates an environment variable, varname, and sets it equal
  11037. to the value start (if varname already exists in the environment, it will
  11038. be overwritten). DO then begins the loop process by comparing the value of
  11039. varname with the value of end. If varname is less than or equal to end, DO
  11040. executes the batch file lines up to the ENDDO. Next, DO adds 1 to the
  11041. value of varname, or adds the value n if BY n is specified, and repeats the
  11042. compare and execute process until varname is greater than end. This
  11043. example displays the even numbers from 2 through 20:
  11044. do i = 2 to 20 by 2
  11045. echo %i
  11046. enddo
  11047. DO can also count down, rather than up. If n is negative, varname will
  11048. decrease by n with each loop, and the loop will stop when varname is
  11049. less than end. For example, to display the even numbers from 2 through
  11050. 20 in reverse order, replace the first line of the example above with:
  11051. do i = 20 to 2 by -2
  11052. The third type of loop is called a "WHILE loop" or "UNTIL loop." DO
  11053. evaluates the condition, which can be any of the tests supported by the
  11054. 633IF command, and executes the lines between DO and ENDDO according to
  11055. the result. A WHILE loop ends when the condition becomes false; an UNTIL
  11056. loop ends when the condition becomes true.
  11057. WHILE tests the condition at the start of the loop. Therefore, if the
  11058. condition is false when the loop starts, the statements within the loop will
  11059. never be executed, and the batch file will continue with the statement after
  11060. the ENDDO.
  11061. UNTIL tests the condition at the end of the loop. Therefore, the statements
  11062. within the loop will always be executed at least once.
  11063. The fourth type of loop executes the lines between DO and ENDDO once for
  11064. every filename in the fileset, or once for each argument (if you use the
  11065. /L option). For example:
  11066. do x in *.txt
  11067. will execute the loop once for every .TXT file in the current directory;
  11068. each time through the loop the variable x will be set to the name of the
  11069. next file that matches the file specification.
  11070. If, between DO and ENDDO, you create a new file that could be included in
  11071. the list of files, it may or may not appear in an iteration of the DO
  11072. loop. Whether the new file appears depends on its physical location in the
  11073. directory structure, a condition over which 4DOS has no control.
  11074. You can also execute the loop once for each line of text in a file by placing
  11075. an [@] in front of the file name. If you have a file called DRIVES.TXT
  11076. that contains a list of drives on your computer, one drive name per line,
  11077. you can execute the loop once for each drive this way:
  11078. do x in @drives.txt
  11079. To execute the loop once for each line of text in the clipboard, use CLIP:
  11080. as the file name (e.g. DO X IN @CLIP:). CLIP: will not return any data
  11081. unless the clipboard contains text. See 051redirection for additional
  11082. information on CLIP:, including details on when you can use the clipboard
  11083. under 4DOS.
  11084. Two special commands, ITERATE and LEAVE, can be used inside a DO /
  11085. ENDDO loop. ITERATE ignores the remaining lines inside the loop and
  11086. returns to the beginning of loop for another iteration (unless DO
  11087. determines that the loop is finished). LEAVE exits from the current DO
  11088. loop and continues with the line following ENDDO. Both ITERATE and LEAVE
  11089. are most often used in an 633IF or 634IFF command:
  11090. do while "%var" != "%var1"
  11091. ...
  11092. if "%var" == "%val2" leave
  11093. enddo
  11094. You can nest DO loops up to 15 levels deep.
  11095. The DO and ENDDO commands must be on separate lines, and cannot be placed
  11096. within a 085command group, or on the same line as other commands (this is
  11097. the reason DO cannot be used in aliases). However, commands within the DO
  11098. loop can use command groups or the 041command separator in the normal way.
  11099. If you receive a stack overflow error when using DO in complex, nested
  11100. command sequences, see the 574StackSize directive.
  11101. You can exit from all DO / ENDDO loops by using GOTO to a line past
  11102. the last ENDDO. However, be sure to read the cautionary notes about GOTO
  11103. and DO under the 630GOTO command before using a GOTO in any other way
  11104. inside any DO loop.
  11105. You cannot use 659RETURN to return from a 629GOSUB while
  11106. inside a DO loop.
  11107. Options
  11108. !INDENT 5 5 0 5
  11109. /A:: (Attribute select) Process only those files that have the
  11110. specified attribute(s) set. The colon [:] after /A is required.
  11111. !INDENT 5 5 5 5
  11112. Preceding an attribute letter with a hyphen [-] will select
  11113. files that do not have that attribute set. You can OR attributes
  11114. by preceding each attribute letter with a plus sign [+].
  11115. The attributes are:
  11116. R Read-only D subDirectory
  11117. H Hidden A Archive
  11118. S System
  11119. If no attributes are listed (e.g., DO I IN /A: *.*), DO will
  11120. process all matching files and subdirectories, including any with the
  11121. hidden or system attribute set. If attributes are combined, all the
  11122. specified attributes must match for a file to be included. For
  11123. example, /A:RHS will include only those files with all three
  11124. attributes set.
  11125. !INDENT 5 5 0 5
  11126. /I"text": Select filenames by matching text in their
  11127. descriptions. The text can include 073wildcards and
  11128. extended wildcards. The search text must be enclosed in
  11129. quotation marks, and must follow the /I immediately, with no
  11130. intervening spaces. You can select all filenames that have a
  11131. description with /I"[?]*", or all filenames that do not
  11132. have a description with /I"[]".
  11133. /L: Specifies that the arguments in a DO x IN ... statement are
  11134. literal text, not filenames. The arguments will be assigned (left to
  11135. right) to the DO variable on each pass through the loop.
  11136. !INDENT 0
  11137. ;---------------------------------------------------------------------------
  11138. !TOPIC 616 DRAWBOX
  11139. !TTY
  11140. Purpose: Draw a box on the screen.
  11141. Format: DRAWBOX ulrow ulcol lrrow lrcol style [BRIght] [BLInk]
  11142. fg ON [BRIght] bg [FILl [BRIght] bgfill] [ZOOm] [SHAdow]
  11143. ulrow: Row for upper left corner.
  11144. ulcol: Column for upper left corner.
  11145. lrrow: Row for lower right corner.
  11146. lrcol: Column for lower right corner.
  11147. style: Box drawing style:
  11148. 0 No lines (box is drawn with blanks).
  11149. 1 Single line.
  11150. 2 Double line.
  11151. 3 Single line top and bottom, double on sides.
  11152. 4 Double line top and bottom, single on sides.
  11153. fg: Foreground character color.
  11154. bg: Background character color.
  11155. bgfill: Background fill color (for the inside of the box).
  11156. !TTY
  11157. See also: 617DRAWHLINE and 618DRAWVLINE.
  11158. Usage
  11159. DRAWBOX is useful for creating attractive screen displays in batch files.
  11160. For example, to draw a box around the edge of an 80x25 window with bright
  11161. white lines on a blue background:
  11162. drawbox 0 0 24 79 1 bri whi on blu fill blu
  11163. See 892Colors and Color Names for details about colors and notes on
  11164. the use of bright background colors.
  11165. If you use ZOOM, the box appears to grow in steps to its final size. The
  11166. speed of the zoom operation depends on the speed of your computer and video
  11167. system.
  11168. If you use SHADOW, a drop shadow is created by changing the characters in
  11169. the row under the box and the 2 columns to the right of the box to normal
  11170. intensity text with a black background (this will make characters displayed
  11171. in black disappear entirely).
  11172. The row and column values are zero-based, so on a standard 25 line by 80
  11173. column display, valid rows are 0 - 24 and valid columns are 0 - 79.
  11174. If ulrow is set to 999, lrrow is assumed to be the desired height, and the
  11175. box will be centered vertically. If ulcol is set to 999, lrcol is assumed
  11176. to be the desired width, and the box will be centered horizontally.
  11177. Unlike DRAWHLINE and DRAWVLINE, DRAWBOX does not automatically connect
  11178. boxes to existing lines on the screen with the proper connector
  11179. characters. If you want to draw lines inside a box and have the proper
  11180. connectors drawn automatically, draw the box first, then use DRAWHLINE and
  11181. DRAWVLINE to draw the lines.
  11182. DRAWBOX uses the standard line and box drawing characters in the U.S. English
  11183. extended ASCII character set. If your system is configured for a different
  11184. country or language, or a font which does not include these characters, the
  11185. box may not appear on your screen as you expect.
  11186. DRAWBOX normally writes text directly to the screen. If you have an
  11187. unusual display adapter which does not support direct video output, see the
  11188. 572OutputBIOS directive.
  11189. !INDENT 0
  11190. ;---------------------------------------------------------------------------
  11191. !TOPIC 617 DRAWHLINE
  11192. !TTY
  11193. Purpose: Draw a horizontal line on the screen.
  11194. Format: DRAWHLINE row column len style [BRIght] [BLInk] fg ON [BRIght] bg
  11195. row: Starting row.
  11196. column: Starting column.
  11197. len: Length of line.
  11198. style: Line drawing style:
  11199. 1 Single line.
  11200. 2 Double line.
  11201. fg: Foreground character color.
  11202. bg: Background character color.
  11203. !TTY
  11204. See also: 616DRAWBOX and 618DRAWVLINE.
  11205. Usage
  11206. DRAWHLINE is useful for creating attractive screen displays in batch
  11207. files. It detects other lines and boxes on the display, and creates the
  11208. appropriate connector characters when possible (not all types of lines can
  11209. be connected with the available characters).
  11210. For example, the following command draws a double line along the top row of
  11211. the display with green characters on a blue background:
  11212. drawhline 0 0 80 2 green on blue
  11213. The row and column values are zero-based, so on a standard 25 line by 80
  11214. column display, valid rows are 0 - 24 and valid columns are 0 - 79.
  11215. If row is set to 999, the line will be centered vertically. If column is
  11216. set to 999, the line will be centered horizontally.
  11217. See 892Colors and Color Names for details about colors and notes on
  11218. the use of bright background colors.
  11219. DRAWHLINE uses the standard line and box drawing characters in the
  11220. U.S. English extended ASCII character set. If your system is configured
  11221. for a different country or language, or a font which does not include these
  11222. characters, the box may not appear on your screen as you expect.
  11223. DRAWHLINE normally writes text directly to the screen. If you have an
  11224. unusual display adapter which does not support direct video output, see the
  11225. 572OutputBIOS directive.
  11226. ;---------------------------------------------------------------------------
  11227. !TOPIC 618 DRAWVLINE
  11228. !TTY
  11229. Purpose: Draw a vertical line on the screen.
  11230. Format: DRAWVLINE row col len style [BRIght] [BLInk] fg ON [BRIght] bg
  11231. row: Starting row.
  11232. col: Starting column.
  11233. len: Length of line.
  11234. style: Line drawing style:
  11235. 1 Single line.
  11236. 2 Double line.
  11237. fg: Foreground character color.
  11238. bg: Background character color.
  11239. !TTY
  11240. See also: 616DRAWBOX and 617DRAWHLINE.
  11241. Usage
  11242. DRAWVLINE is useful for creating attractive screen displays in batch
  11243. files. It detects other lines and boxes on the display, and creates the
  11244. appropriate connector characters when possible (not all types of lines can
  11245. be connected with the available characters).
  11246. For example, to draw a double width line along the left margin of the
  11247. display with bright red characters on a black background:
  11248. drawvline 0 0 25 2 bright red on black
  11249. The row and column values are zero-based, so on a standard 25 line by 80
  11250. column display, valid rows are 0 - 24 and valid columns are 0 - 79.
  11251. If row is set to 999, the line will be centered vertically. If column is
  11252. set to 999, the line will be centered horizontally.
  11253. See 892Colors and Color Names for details about colors and notes on
  11254. the use of bright background colors.
  11255. DRAWVLINE uses the standard line and box drawing characters in the
  11256. U.S. English extended ASCII character set. If your system is configured
  11257. for a different country or language, or a font which does not include these
  11258. characters, the box may not appear on your screen as you expect.
  11259. DRAWVLINE normally writes text directly to the screen. If you have an
  11260. unusual display adapter which does not support direct video output, see the
  11261. 572OutputBIOS directive.
  11262. ;---------------------------------------------------------------------------
  11263. !TOPIC 619 ECHO
  11264. !TTY
  11265. Purpose: Enable or disable command echoing, or display the current
  11266. status; display a message.
  11267. Format: ECHO [ON | OFF | message]
  11268. message: Text to display.
  11269. !TTY
  11270. See also: 620ECHOS, 689ECHOERR, 690ECHOSERR, 660SCREEN,
  11271. 661SCRPUT, 664SETDOS and 671TEXT.
  11272. Usage
  11273. The ECHO command has two separate functions. The first is to change or
  11274. display the current command-echo state. The second, more common use is
  11275. to display a message on the screen.
  11276. 4DOS has a separate echo capability for batch files and for the command
  11277. line. The command-line ECHO state is independent of the batch file ECHO
  11278. state; changing ECHO in a batch file has no effect on the display at the
  11279. command prompt, and vice versa.
  11280. To see the current echo state, use the ECHO command with no arguments. This
  11281. displays either the batch file or command-line echo state, depending on
  11282. where the ECHO command is performed.
  11283. In a batch file, if you turn ECHO on, each line of the file is displayed
  11284. before it is executed. If you turn ECHO off, each line is executed without
  11285. being displayed. Regardless of the ECHO state, a batch file line that
  11286. begins with the [@] character will not be displayed. To turn off batch
  11287. file echoing without displaying the ECHO command, use this line:
  11288. @echo off
  11289. ECHO defaults to ON in batch files. The current ECHO state is inherited by
  11290. called batch files. You can change the default setting to ECHO OFF with
  11291. the 664SETDOS /V0 command, the Options 1 page of the 648OPTION
  11292. dialogs, or the 414BatchEcho directive in 4DOS.INI. See 104Echoing in
  11293. Batch Files for details.
  11294. ECHO defaults to OFF at the command line. If you turn the command-line
  11295. ECHO on, each command will be displayed before it is executed. This will
  11296. let you see the command line after expansion of aliases and variables. The
  11297. command-line ECHO is most useful when you are learning how to use advanced
  11298. features. This example will turn command-line echoing on:
  11299. c:\> echo on
  11300. If the ECHO command is followed by anything other than ON or OFF, ECHO will
  11301. treat it as a message to be displayed. This is most often used in
  11302. 102batch files and 101aliases, but it can even be useful at the prompt
  11303. to display the values of 161internal variables, 241functions, and so
  11304. on. For example, a batch file might display a simple message to let the
  11305. user know what's going on:
  11306. echo Processing your print files...
  11307. An alias might use ECHO to report the value of a variable or function:
  11308. 595alias caps=`@echo Caplock is %_CAPSLOCK%%%`
  11309. Note that this second use of the ECHO command is independent of the
  11310. first. You can use ECHO to display a message regardless of the current
  11311. command-echo state.
  11312. The message is actually sent to standard output (stdout). Normally this
  11313. is the screen, but it can be redirected with the usual 055operators. You
  11314. could, for example, use ECHO to append a line to a text file:
  11315. echo Starting backup at %230_isodate %219_time >>! c:\runlog.txt
  11316. To include the 418command separator character [^] or the
  11317. 050redirection and piping symbols [<>|] in an ECHO message, enclose
  11318. them in quotes (see 118Argument Quoting) or precede them with the
  11319. 086escape character.
  11320. Trailing spaces in the message are normally ignored. To display trailing
  11321. spaces, enclose them in back-quotes:
  11322. echo Five spaces follow:` `
  11323. If you want to echo a blank line, or a line containing only the word ON or
  11324. OFF, put a period immediately after the ECHO with no space between:
  11325. echo.
  11326. echo.on
  11327. echo.off
  11328. If you are writing a batch file and you want to display several lines or
  11329. strings containing troublesome characters, or to display text without
  11330. expanding variables and functions, consider using the 671TEXT command
  11331. instead.
  11332. ;---------------------------------------------------------------------------
  11333. !TOPIC 689 ECHOERR
  11334. !TTY
  11335. Purpose: Display a message to the standard error device.
  11336. Format: ECHOERR message
  11337. message: Text to display.
  11338. !TTY
  11339. See also: 619ECHO, 620ECHOS, 690ECHOSERR, 660SCREEN,
  11340. 661SCRPUT and 671TEXT.
  11341. Usage
  11342. ECHOERR displays a message like ECHO, but sends its output to the standard
  11343. error device stderr (usually the screen) instead of the standard output
  11344. device. If the standard output of a batch file is redirected to a file or
  11345. another device with > or >>, ECHOERR will still generate a screen
  11346. message. You can redirect ECHOERR's output using redirection operators
  11347. like >& and >&>, which affect stderr. See 050Redirection and Piping
  11348. for more information about the standard output and standard error devices and
  11349. redirection.
  11350. To include the 418command separator character [^] or the
  11351. 050redirection and piping symbols [<>|] in an ECHOERR message, enclose
  11352. them in quotes (see 118Argument Quoting) or precede them with the
  11353. 086escape character.
  11354. Trailing spaces in the message are normally ignored. To display trailing
  11355. spaces, enclose them in back-quotes:
  11356. echoerr Five spaces follow:` `
  11357. ECHOERR can not be used to change or display the current command-echo
  11358. state. Use 619ECHO to control echoing of commands in a batch file or
  11359. at the prompt.
  11360. ;---------------------------------------------------------------------------
  11361. !TOPIC 620 ECHOS
  11362. !TTY
  11363. Purpose: Display a message without a trailing carriage return and line
  11364. feed.
  11365. Format: ECHOS message
  11366. message: Text to display.
  11367. !TTY
  11368. See also: 619ECHO, 689ECHOERR, 690ECHOSERR, 660SCREEN,
  11369. 661SCRPUT, 671TEXT, and 684VSCRPUT.
  11370. Usage
  11371. ECHOS is useful for text output when you don't want to add a carriage
  11372. return and line feed at the end of the line. For example, you can use
  11373. ECHOS when you need to redirect control sequences to your printer; this
  11374. example sends the sequence Esc P to the printer on LPT1:
  11375. c:\> echos eP > lpt1:
  11376. To include the 418command separator character [^] or the
  11377. 050redirection and piping symbols [<>|] in an ECHOS message, enclose
  11378. them in quotes (see 118Argument Quoting) or precede them with the
  11379. 086escape character.
  11380. If you want to embed a carriage return or other control character in the
  11381. message, you can use the 246@CHAR function or an escape sequence. For
  11382. instance, you might wish to print a carriage return at the start of your
  11383. message to move the cursor to the start of the line, so you can overwrite
  11384. text already on the screen. Use @CHAR[13] or %=r to print a carriage
  11385. return:
  11386. 615do i = 100 to 0 by -1
  11387. echos %=r%i` `
  11388. 610delay /m 1
  11389. enddo
  11390. ECHOS does not translate or modify the message text. For example,
  11391. carriage return characters are not translated to CR/LF pairs. ECHOS sends
  11392. only the characters you specify. The only character you cannot put into
  11393. an ECHOS message is the NUL character (ASCII 0).
  11394. To include the 418command separator character [^] or the
  11395. 050redirection and piping symbols [<>|] in an ECHOS message, enclose
  11396. them in quotes (see 118Argument Quoting) or precede them with the
  11397. 086escape character.
  11398. Trailing spaces in the message are normally ignored. To display trailing
  11399. spaces, enclose them in back-quotes, as in the example above.
  11400. ECHOS can not be used to change or display the current command-echo
  11401. state. Use 619ECHO to control echoing of commands in a batch file or
  11402. at the prompt.
  11403. ;---------------------------------------------------------------------------
  11404. !TOPIC 690 ECHOSERR
  11405. !TTY
  11406. Purpose: Display a message to the standard error device, without a
  11407. trailing carriage return and line feed.
  11408. Format: ECHOSERR message
  11409. message: Text to display.
  11410. !TTY
  11411. See also: 619ECHO, 620ECHOS, 689ECHOERR, 660SCREEN,
  11412. 661SCRPUT and 671TEXT.
  11413. Usage
  11414. ECHOSERR acts like ECHOS but sends its output to the standard error device
  11415. stderr (usually the screen) instead of the standard output device. If the
  11416. standard output of a batch file is redirected to a file or another device
  11417. with > or >>, ECHOSERR will still generate a screen message. You can
  11418. redirect ECHOSERR's output using redirection operators like >& and >&>,
  11419. which affect stderr. See 050Redirection and Piping for more information
  11420. about the standard output and standard error devices and redirection.
  11421. If you want to embed a carriage return or other control character in the
  11422. message, you can use the 246@CHAR function or an escape sequence. For
  11423. instance, you might wish to print a carriage return at the start of your
  11424. message to move the cursor to the start of the line, so you can overwrite
  11425. text already on the screen. Use @CHAR[13] or %=r to print a carriage
  11426. return:
  11427. 615do i = 100 to 0 by -1
  11428. echoserr %=r%i` `
  11429. 610delay /m 1
  11430. enddo
  11431. ECHOSERR does not translate or modify the message text. For example,
  11432. carriage return characters are not translated to CR/LF pairs. ECHOSERR sends
  11433. only the characters you specify. The only character you cannot put into
  11434. an ECHOSERR message is the NUL character (ASCII 0).
  11435. To include the 418command separator character [^] or the
  11436. 050redirection and piping symbols [<>|] in an ECHOSERR message, enclose
  11437. them in quotes (see 118Argument Quoting) or precede them with the
  11438. 086escape character.
  11439. Trailing spaces in the message are normally ignored. To display trailing
  11440. spaces, enclose them in back-quotes, as in the example above.
  11441. ECHOSERR can not be used to change or display the current command-echo
  11442. state. Use 619ECHO to control echoing of commands in a batch file or
  11443. at the prompt.
  11444. ;---------------------------------------------------------------------------
  11445. !TOPIC 621 ENDLOCAL
  11446. !TTY
  11447. Purpose: Restore the saved disk drive, directory, environment, alias
  11448. list, and special characters.
  11449. Format: ENDLOCAL [exportvar]
  11450. !TTY
  11451. See also: 665SETLOCAL.
  11452. Usage
  11453. The SETLOCAL command in a batch file saves the current disk drive, default
  11454. directory, all environment variables, the alias list, and the command
  11455. separator, escape character, parameter character, decimal separator, and
  11456. thousands separator. ENDLOCAL restores everything that was saved by the
  11457. previous SETLOCAL command.
  11458. For example, this batch file fragment saves everything, removes all aliases
  11459. so that user aliases will not affect batch file commands, changes the disk
  11460. and directory, changes the command separator, runs a program, and then
  11461. restores the original values:
  11462. setlocal
  11463. unalias *
  11464. cdd d:\test
  11465. setdos /c~
  11466. program ~ echo Done!
  11467. endlocal
  11468. SETLOCAL and ENDLOCAL are nestable up to 8 levels deep within a batch file.
  11469. You cannot use SETLOCAL and ENDLOCAL in an alias or at the command line.
  11470. You can "export" environment variables from inside a SETLOCAL by specifying
  11471. the variable names to be preserved following the ENDLOCAL. For example:
  11472. setlocal
  11473. set test=abcd
  11474. endlocal test
  11475. An ENDLOCAL is performed automatically at the end of a batch file if you
  11476. forget to do so. If you invoke one batch file from another without using
  11477. CALL, the first batch file is terminated, and an automatic ENDLOCAL is
  11478. performed; the second batch file inherits the settings as they were prior
  11479. to any SETLOCAL.
  11480. ;---------------------------------------------------------------------------
  11481. !TOPIC 622 ESET
  11482. !TTY
  11483. Purpose: Edit environment variables and aliases.
  11484. Format: ESET [/A /F /M] variable name...
  11485. variable name: The name of an environment variable, alias, or
  11486. function to edit.
  11487. /A(lias) /M(aster environment)
  11488. /F(unctions)
  11489. !TTY
  11490. See also: 595ALIAS, 678UNALIAS, 663SET, and 680UNSET.
  11491. Usage
  11492. ESET allows you to edit environment variables and aliases using line
  11493. editing commands (see 032Command-Line Editing).
  11494. For example, to edit the executable file search path use ESET PATH;
  11495. to edit the alias D, use ESET D.
  11496. ESET will search for environment variables first and then aliases. If you
  11497. have an environment variable and an alias with the same name, ESET will
  11498. edit the environment variable and ignore the alias unless you use the
  11499. /A option.
  11500. Environment variable and alias names are normally limited to 80
  11501. characters, and the name and value together normally cannot be longer
  11502. than 511 characters. ESET can edit any variable provided the variable
  11503. contains no more than 511 characters of text.
  11504. If you have enabled global aliases (see 595ALIAS), any changes made
  11505. to an alias with ESET will immediately affect all other copies of 4DOS
  11506. which are using the same alias list.
  11507. Options
  11508. !INDENT 5 5 0 5
  11509. /A: (Alias) Edit the named alias even if an environment variable of
  11510. the same name exists. If you have an alias and an
  11511. environment variable with the same name, you must use this
  11512. switch to be able to edit the alias.
  11513. /F: (Functions) Edit the named user-defined function.
  11514. /M: (Master environment) Edit an environment variable in the master
  11515. environment rather than the local environment. This option
  11516. is only useful from a secondary command shell (for example,
  11517. when an application has "shelled to DOS"). /M only
  11518. works for environment variables; it cannot be used to edit
  11519. the primary shell's aliases.
  11520. !INDENT 0
  11521. ;---------------------------------------------------------------------------
  11522. !TOPIC 623 EXCEPT
  11523. !TTY
  11524. Purpose: Perform a command on all available files except those specified.
  11525. Format: EXCEPT [/I"text"] (@file) (file) command
  11526. file: The file or files to exclude from the command.
  11527. @file: A text file containing the names of the
  11528. files to exclude, one per line (see 057@file lists
  11529. for details).
  11530. command: The command to execute, including all appropriate
  11531. arguments and switches.
  11532. /I: (match description)
  11533. !TTY
  11534. See also: 596ATTRIB and 078File Exclusion Ranges.
  11535. File Selection
  11536. Supports extended 073wildcards, 074ranges, 079multiple file
  11537. names, and 080include lists. Date, time, size, or file exclusion
  11538. ranges must appear immediately after the EXCEPT keyword.
  11539. Use wildcards with caution on LFN volumes; see 081LFN File Searches
  11540. for details.
  11541. Usage
  11542. EXCEPT provides a means of executing a command on a group of files and/or
  11543. subdirectories, and excluding a subgroup from the operation. EXCEPT is
  11544. intended primarily as a helper for external utilities which do not offer
  11545. exclusion ranges or any similar capability. The command may also be an
  11546. internal command, alias or batch file. However, an 078exclusion range
  11547. will generally be the preferable method for excluding files when using
  11548. internal commands.
  11549. You may use wildcards to specify the files to exclude from the command. The
  11550. first example erases all the files in the current directory except
  11551. those beginning with MEMO, and those whose extension is .WKS. The second
  11552. example copies all the files and subdirectories on drive C to drive D
  11553. except those in C:\MSC and C:\DOS, using the COPY command:
  11554. c:\> except (memo*.* *.wks) erase *.*
  11555. c:\> except (c:\msc c:\dos) copy c:\*.* d:\ /s
  11556. Note that in the second example, EXCEPT is used to hide subdirectories,
  11557. not files. Because COPY /S does not recurse into hidden directories by
  11558. default, this prevents the contents of the specified subdirectories from
  11559. being copied. Using EXCEPT to hide files from COPY /S would be less
  11560. successful:
  11561. c:\> except (*.tmp *.bak) copy c:\*.* d:\ /s Wrong!
  11562. This command would temporarily hide all .TMP and .BAK files in the current
  11563. directory before performing the COPY -- probably not what was intended!
  11564. You must quote any file names inside the parentheses which contain
  11565. whitespace or special characters (see 945File Names for details). For
  11566. example, to copy all files except those in the "Program Files" directory
  11567. to drive E:\:
  11568. c:\> except ("Program Files") copy /s *.* e:\
  11569. EXCEPT will assume that the files to be excluded are in the current
  11570. directory, unless another directory is specified explicitly.
  11571. EXCEPT prevents operations on the specified file(s) by setting the
  11572. hidden attribute, performing the command, and then clearing the hidden
  11573. attribute. If the command is aborted in an unusual way, you may need to
  11574. use the ATTRIB command to remove the hidden attribute from the file(s).
  11575. Caution: EXCEPT will not work with programs or commands that ignore the
  11576. hidden attribute or which work explicitly with hidden files, including
  11577. 609DEL /Z, and the /H (process hidden files) switch available
  11578. in some 4DOS file processing commands.
  11579. 078File exclusion ranges provide a faster and more flexible method
  11580. of excluding files from internal commands, and do not manipulate file
  11581. attributes, as EXCEPT does. However, exclusion ranges can only be used with
  11582. 4DOS internal commands; you must use EXCEPT for external commands.
  11583. 074Date, time, and size ranges can be used immediately after the word
  11584. EXCEPT to further qualify which files should be excluded from the
  11585. command. If the command is an internal command that supports ranges, an
  11586. independent range can also be used in the command itself. You can also use a
  11587. file exclusion range within the EXCEPT command; however, this will select
  11588. files to be excluded from EXCEPT, and therefore included in execution of
  11589. the command.
  11590. You can use 085command grouping to execute multiple commands with
  11591. a single EXCEPT. For example, the following command copies all files in
  11592. the current directory whose extensions begin with .DA, except the .DAT
  11593. files, to the D:\SAVE directory, then changes the first two characters of
  11594. the extension of the copied files to .SA:
  11595. c:\data> except (*.dat) (copy *.da* d:\save ^ ren *.da* *.sa*)
  11596. If you use 035filename completion to enter the filenames inside
  11597. the parentheses, type a space after the open parenthesis before
  11598. entering a partial filename or pressing Tab. Otherwise, the
  11599. command-line editor will treat the open parenthesis as the first
  11600. character of the filename to be completed.
  11601. Options
  11602. !INDENT 5 5 0 5
  11603. /I"text": Select files by matching text in their
  11604. descriptions. The text can include 073wildcards and
  11605. extended wildcards. The search text must be enclosed in
  11606. quotation marks, and must follow the /I immediately, with no
  11607. intervening spaces. You can select all filenames that have a
  11608. description with /I"[?]*", or all filenames that do not have
  11609. a description with /I"[]".
  11610. !INDENT 0
  11611. ;---------------------------------------------------------------------------
  11612. !TOPIC 624 EXIT
  11613. !TTY
  11614. Purpose: Return from 4DOS.
  11615. Format: EXIT [value]
  11616. value: The numeric exit code to return.
  11617. !TTY
  11618. See also: 600CANCEL and 654QUIT.
  11619. Usage
  11620. EXIT terminates the current copy of 4DOS. Use it to return to an
  11621. application when you have "shelled out" to work at the prompt, or to end a
  11622. command-line session.
  11623. To close the session, or to return to the application that started 4DOS,
  11624. type:
  11625. c:\> exit
  11626. If you specify a value, EXIT will return that value to the program that
  11627. started 4DOS. For example:
  11628. c:\> exit 255
  11629. The value is a number you can use to inform the program of some result,
  11630. such as the success or failure of a batch file and it can range from
  11631. 0 - 255. This feature is most useful for systems which use batch files to
  11632. automate their operation, such as bulletin boards, or custom application
  11633. programs like databases that shell to 4DOS to perform certain tasks.
  11634. You cannot EXIT from the primary 4DOS shell under DOS. If EXIT does not
  11635. seem to have any effect, you are probably in the primary shell.
  11636. Before exiting, 4DOS will execute the contents of any 1094EXIT batch
  11637. file.
  11638. ;---------------------------------------------------------------------------
  11639. !TOPIC 625 FFIND
  11640. !TTY
  11641. Purpose: Search for files by name or contents.
  11642. Format: FFIND [/A[[:][+|-]rhsad] /B /C /D[list] /E /F /I /I"text" /K /L
  11643. /M /N /O[[:][-]acdeginrsu] /P /R /S /[T|X]"xx" /U /V /Y] file...
  11644. list: A list of disk drive letters (without colons).
  11645. file: The file, directory, or list of files or directories to
  11646. display.
  11647. /A (Attribute select) /N(ot)
  11648. /B(are) /O(rder)
  11649. /C(ase sensitive) /P(ause)
  11650. /D(rive) /R(everse)
  11651. /E (upper case display) /S(ubdirectories)
  11652. /F (stop after match) /T"xx" (text search string)
  11653. /I(gnore wildcards) /U (summary only)
  11654. /I"text" (match description) /V(erbose)
  11655. /K (no headers) /X["xx"] (hex display/search string)
  11656. /L(ine numbers) /Y (prompt to continue after match)
  11657. /M (no footers)
  11658. !TTY
  11659. File Selection
  11660. Supports extended 073wildcards, 074ranges, 079multiple file
  11661. names, and 080include lists.
  11662. Usage
  11663. FFIND is a flexible search command that looks for files based on their names
  11664. and their contents. Depending on the options you choose, FFIND can display
  11665. filenames, matching text, or a combination of both in a variety of formats.
  11666. If you want to search for files by name, FFIND works much like the DIR
  11667. command. For example, to generate a list of all the .BTM files in the
  11668. current directory, you could use the command
  11669. c:\> ffind *.btm
  11670. The output from this command is a list of full pathnames, followed by the
  11671. number of files found.
  11672. If you want to limit the output to a list of .BTM files which contain the
  11673. string color, you could use this command instead:
  11674. c:\> ffind /t"color" *.btm
  11675. The output from this command is a list of files that contain the
  11676. string "color" along with the first line in each file that contains that
  11677. string. By default, FFIND uses a case-insensitve search, so the command
  11678. above will include files that contain "COLOR", "Color", "color", or any
  11679. other combination of upper-case and lower-case letters.
  11680. If you would rather see the last line of each file that contains the search
  11681. string, use the /R option, which forces FFIND to search from the end of
  11682. each file to the beginning. This option will also speed up searches
  11683. somewhat if you are looking for text that will normally be at the end of a
  11684. file, such as a signature line:
  11685. c:\> ffind /r /t"Sincerely," *.txt
  11686. You can use extended wildcards in the search string to increase the
  11687. flexibility of FFIND's search. For example, the following command will find
  11688. .TXT files which contain either the string "June" or "July" (it will also find
  11689. "Juny" and "Jule"). The /C option makes the search case-sensitive:
  11690. c:\> ffind /c /t"Ju[nl][ey]" *.txt
  11691. If you want to search for text that contains wildcard characters (*, ?,
  11692. [, or ]), you can use the /I option to force FFIND to interpret these
  11693. as normal characters instead of wildcards. The following command, for
  11694. example, finds all .TXT files that contain a question mark:
  11695. c:\> ffind /i /t"?" *.txt
  11696. At times, you may need to search for data that cannot be represented by ASCII
  11697. characters. You can use FFIND's /X option to represent the search string
  11698. in hexadecimal format (this option also changes the output to show hexadecimal
  11699. offsets rather than text lines). With /X the search must be represented
  11700. by pairs of hexadecimal digits separated by spaces; a search of this type is
  11701. always case-sensitive (in the example below, 41 63 65 is the hex code for
  11702. "Ace"):
  11703. c:\> ffind /x"41 63 65" *.txt
  11704. You can use FFIND's other options to further specify the files for which you
  11705. are searching and to modify the way in which the output is displayed.
  11706. You must quote any file names which contain whitespace or special
  11707. characters. See 945File Names for additional details.
  11708. Options
  11709. !INDENT 5 5 0 5
  11710. /A: (Attribute select) Find only those files that have the
  11711. specified attribute(s) set. The colon [:] after /A is optional.
  11712. !INDENT 5 5 5 5
  11713. Preceding an attribute letter with a hyphen [-] will select files
  11714. that do not have that attribute set. You can OR attributes
  11715. by preceding each attribute letter with a plus sign [+].
  11716. The attributes are:
  11717. R Read-only D subDirectory
  11718. H Hidden A Archive
  11719. S System
  11720. If no attributes are listed at all (e.g., FFIND /A ...), FFIND will
  11721. display all files and subdirectories including hidden and system
  11722. files. If attributes are combined, all the specified attributes must
  11723. match for a file to be selected. For example, /A:RHS will select only
  11724. those files with all three attributes set.
  11725. !INDENT 5 5 0 5
  11726. /B: (Bare) Display file names only and omit the text that matches
  11727. the search. This option is only useful in combination with /T or /X,
  11728. which normally force FFIND to display file names and matching text.
  11729. /C: (Case sensitive) Perform a case-sensitive search. This option
  11730. is only valid with /T, which defaults to a case-insensitive search. It
  11731. is not needed with a /X hexadecimal search, which is always
  11732. case-sensitive.
  11733. /D: (Drive) Search all files on one or more drives. If you use /D
  11734. without a list of drives, FFIND will search the drives specified in the
  11735. list of files. If no drive letters are listed, FFIND will search
  11736. all of the current drive. You can include a list of drives or a range
  11737. of drives to search as part of the /D option. For example, to search
  11738. drives C:, D:, E:, and G:, you can use either of these commands:
  11739. c:\> ffind /dcdeg ...
  11740. c:\> ffind /dc-eg ...
  11741. !INDENT 5 5 5 5
  11742. Drive letters listed after /D will be ignored when processing file
  11743. names which also include a drive letter. For example, this command
  11744. displays all the .BTM files on C: and E:, but only the .BAT files on D:
  11745. c:\> ffind /s /dce *.btm d:\*.bat
  11746. !INDENT 5 5 0 5
  11747. /E: (Upper case) Display filenames in the traditional upper case; also
  11748. see 664SETDOS /U and the 446UpperCase directive in 4DOS.INI.
  11749. /F: (First) Stops the search after the first match.
  11750. /I: (Ignore wildcards) Only meaningful when used in conjunction with
  11751. the /T"xx" option. Suppresses the recognition of wildcard characters
  11752. in the search text. This option is useful if you need to search for
  11753. characters that would normally be interpreted as wildcards: *, ?,
  11754. [, and ].
  11755. /I"text": Select filenames by matching text in their
  11756. descriptions. The text can include 073wildcards and
  11757. extended wildcards. The search text must be enclosed in
  11758. quotation marks, and must follow the /I immediately, with no
  11759. intervening spaces. You can select all filenames that have a
  11760. description with /I"[?]*", or all filenames that do not have
  11761. a description with /I"[]".
  11762. /K: (No headers) Suppress the display of the header or filename for
  11763. each matching text line.
  11764. /L: (Line numbers) Include the line number for each text line
  11765. displayed. FFIND numbers lines beginning with 1, unless
  11766. 475ListRowStart is set to 0 in 4DOS.INI. A new line is counted
  11767. for every CR or LF character (FFIND determines automatically which
  11768. character is used for line breaks in each file), or when line
  11769. length reaches 511 characters, whichever comes first.
  11770. /M: (No footers) Suppress the footer (the number of files and number
  11771. of matches) at the end of FFIND's display.
  11772. /N: (Not) Reverse the meaning of the search. /N will also set /B;
  11773. i.e. searches are on a file-by-file basis.
  11774. /O: (Order) Set the sort order for the files that FFIND
  11775. displays. You may use any combination of the following sorting
  11776. options; if multiple options are used, the listing will be sorted with
  11777. the first sort option as the primary key, the next as the secondary
  11778. key, and so on:
  11779. !INDENT 5 5 5 5
  11780. - Reverse the sort order for the next option
  11781. a Sort names and extensions in standard ASCII order, rather
  11782. than sorting numerically when digits are included in the
  11783. name or extension.
  11784. c Sort by compression ratio (the least compressed file in
  11785. the list will be displayed first).
  11786. d Sort by date and time (oldest first); for LFN drives,
  11787. also see /T.
  11788. e Sort by extension.
  11789. g Group subdirectories first, then files.
  11790. i Sort by the file description (ignored if /C or /O:c is
  11791. also used).
  11792. n Sort by filename (this is the default).
  11793. r Reverse the sort order for all options.
  11794. s Sort by size.
  11795. u Unsorted.
  11796. !INDENT 5 5 0 5
  11797. /P: (Pause) Wait for a key to be pressed after each screen page
  11798. before continuing the display. Your options at the prompt are
  11799. explained in detail under 045Page and File Prompts.
  11800. /R: (Reverse) Only meaningful when used in conjuction with the
  11801. /T"xx" or /X options. Searches each file from the end backwards to
  11802. the beginning. This option is useful if you want to display the last
  11803. occurrence of the search string in each file instead of the first (the
  11804. default). It can also speed up searches for information that is
  11805. normally at the end of a file, such as a signature.
  11806. /S: (Subdirectories) Display matches from the current directory and
  11807. all of its subdirectories. Note that FFIND /S will not search into
  11808. subdirectories with the hidden or system attributes set unless you also
  11809. specify /A:.
  11810. /T"xx": (Text search) Specify the text search string. /T must be
  11811. followed by a text string in double quotes (e.g., /t"color"). FFIND
  11812. will perform a case-insensitive search unless you also use the /C
  11813. option. For a hexadecimal search and/or hexadecimal display of the
  11814. location where the search string is found, see /X. You can specify
  11815. a search string with either /T or /X, but not both.
  11816. /U: (Summary) Only displays the summary line.
  11817. /V: (Verbose) Show every matching line. FFIND's default
  11818. behavior is to show only the first matching line then and then go on to
  11819. the next file. This option is only valid with /T or /X.
  11820. /X["xx xx ..."]: (Hexadecimal display / search) Specify hexadecimal display
  11821. and an optional hexadecimal search string.
  11822. !INDENT 5 5 5 5
  11823. If /X is followed by one or more pairs of hexadecimal digits in quotes
  11824. (e.g., /x"44 63 65"), FFIND will search for that exact sequence of
  11825. characters or data bytes without regard to the meaning of those bytes
  11826. as text. If those bytes are found, the offset is displayed (in
  11827. both decimal and hexadecimal). A search of this type will always be
  11828. case-sensitive.
  11829. If /X is not followed by a hexadecimal search string it must be used
  11830. in conjunction with /T, and will change the output format to display
  11831. offsets (in both decimal and hexadecimal) rather than actual text lines
  11832. when the search string is found. For example, this command uses /T
  11833. to display the first line in each .BTM file containing the word "hello":
  11834. c:\> ffind /t"hello" *.btm
  11835. --- c:\test.btm:
  11836. echo hello
  11837. If you use the same command with /X, the offset is displayed instead
  11838. of the text:
  11839. c:\> ffind /t"hello" /x *.btm
  11840. --- c:\test.btm:
  11841. Offset: 26 (1Ah)
  11842. You can specify a search string with either /T or /X, but not both.
  11843. !INDENT 5 5 0 5
  11844. /Y: (Prompt) Prompt to stop searching after each match. This option is
  11845. most useful when you are using FFIND to search for one specific file, and
  11846. don't want to display all files which include a particular search string.
  11847. !INDENT 0
  11848. ;---------------------------------------------------------------------------
  11849. !TOPIC 626 FOR
  11850. !TTY
  11851. Purpose: Repeat a command for several values of a variable.
  11852. Format: FOR [/A:[[+|-]rhsad] /D /F ["options"] /H /I"text" /L /R [path]]
  11853. %var IN ([@]set | start, step, end) [DO] command ...
  11854. options: Parsing options for a "file parsing" FOR.
  11855. path: The starting directory for a "recursive" FOR.
  11856. %var: The variable to be used in the command ("FOR
  11857. variable").
  11858. set: A set of values for the variable.
  11859. start: The starting value for a "counted" FOR.
  11860. step: The increment value for a "counted" FOR.
  11861. end: The limit value for a "counted" FOR.
  11862. command: A command or group of commands to be executed for
  11863. each value of the variable.
  11864. /A: (Attribute select) /I (match descriptions)
  11865. /D(isable "/") /L (counted loop)
  11866. /F(ile parsing) /R(ecursive)
  11867. /H(ide dots)
  11868. !TTY
  11869. See also: 687LFNFOR.
  11870. File Selection
  11871. Supports extended 073wildcards, 074ranges, 079multiple file
  11872. names, and 080include lists. Date, time, or size ranges must
  11873. appear immediately after the FOR keyword.
  11874. Use extended wildcards with caution on LFN volumes; see
  11875. 081LFN File Searches for details.
  11876. Usage
  11877. FOR begins by creating a set. It then executes a command for every member
  11878. of the set. The command can be an internal command, an alias, an external
  11879. command, or a batch file. The members of the set can be a list of file
  11880. names, text strings, a group of numeric values, or text read from a list of
  11881. files.
  11882. When the set is made up of text or several separate file names (not an
  11883. include list), the elements must be separated by spaces, tabs, commas, or
  11884. the switch character (normally a slash [/]).
  11885. FOR includes a large number of options, some of which duplicate functions
  11886. available in other 4DOS commands, and/or do not follow conventions you may
  11887. find in our other commands. Most of these extra options are included for
  11888. compatibility with CMD.EXE in the 25Windows NT line. However, we make
  11889. them available in 4DOS, 0204NT, and Take Command so that aliases
  11890. and batch files which use them can work under all three products.
  11891. The first three sections below ("Working with Files", "Working with Text", and
  11892. "Retrieving Text from Files") describe the traditional FOR command and the
  11893. enhancements to it which are part of 4DOS. The sections on "Parsing Text
  11894. from Files" and "Counted FOR Loops" describe features added for compatibility
  11895. with CMD.EXE. The section entitled "Other Notes" contains information you
  11896. may need if you use any aspect of the FOR command extensively.
  11897. Working with Files
  11898. Normally, the set is a list of files specified with wildcards. For
  11899. example, if you use this line in a batch file:
  11900. for %x in (*.txt) do list %x
  11901. then LIST will be executed once for each file in the current directory with
  11902. the extension .TXT. The FOR variable %x is set equal to each of the file
  11903. names in turn, then the 640LIST command is executed for each file. (You
  11904. could do the same thing more easily with a simple LIST *.TXT. We used FOR
  11905. here so you could get a feel for how it operates, using a simple
  11906. example. Many of the examples in this section are constructed in the same
  11907. way.)
  11908. The set can include multiple files or an include list, like this:
  11909. for %x in (d:\*.txt;*.doc;*.asc) do type %x
  11910. FOR supports 073wildcards and extended wildcards, as well as
  11911. 072extended parent directory names (e.g., ...\*.txt to process all of
  11912. the .TXT files that are contained in the directory 2 levels above the
  11913. current directory).
  11914. You must quote any file names within the set which contain whitespace or
  11915. special characters. The same restriction applies to names returned in the
  11916. FOR variable, if you pass them to 4DOS internal commands, or other commands
  11917. which require quoting filenames with whitespace. FOR does not quote returned
  11918. names automatically, even if you included quotes in the set. See
  11919. 945File Names for additional details on file name quoting.
  11920. If the set includes filenames, the file list can be further refined by
  11921. using 074date, time, size and 078file exclusion ranges. The range
  11922. or ranges must be placed immediately after the word FOR. Ranges will be
  11923. ignored if no wildcards are used inside the parentheses. For example, this
  11924. set is made up of all of the .TXT files that were created or updated on
  11925. July 1, 2000:
  11926. for /[d7-1-2000,+0] %x in (*.txt) do ...
  11927. If the command is an internal command that supports ranges, an independent
  11928. range can also be used in the command itself.
  11929. You can also refine the list by limiting it with the /A: option to select
  11930. only files that have specific attributes.
  11931. By default, FOR works only with files in the current directory or a specified
  11932. directory. With the /R option, FOR will also search for files in
  11933. subdirectories. For example, to work with all of the .TXT files in the
  11934. current directory and its subdirectories:
  11935. for /r %x in (*.txt) do ...
  11936. If you specify a directory name immediately after /R, FOR will start in
  11937. that directory and then search each of its subdirectories. This example
  11938. works with all of the .BAK files on drive D:
  11939. for /r d:\ %x in (*.bak) do ...
  11940. When you use wildcards to specify the set, FOR scans the directory and finds
  11941. each file which matches the wildcard name(s) you specified. If, during the
  11942. processing of the FOR command, you create a file that could be included in
  11943. the set, it may or may not appear in a future iteration of the same FOR
  11944. command. Whether the new file appears depends on its physical location in
  11945. the directory structure. For example, if you use FOR to execute a command
  11946. for all .TXT files, and the command also creates one or more new .TXT files,
  11947. those new files may or may not be processed during the current FOR command,
  11948. depending on where they are placed in the physical structure of the
  11949. directory. This is an operating system constraint over which 4DOS has no
  11950. control. Therefore, in order to achieve consistent results you should
  11951. construct FOR commands which do not create files that could become part of
  11952. the set for the current command.
  11953. Working with Text
  11954. The set can also be made up of text instead of file names. For example, to
  11955. create three files named file1, file2, and file3, each containing a blank
  11956. line:
  11957. for %suffix in (1 2 3) do echo. > file%suffix
  11958. You could also use the names of environment variables as the text. This
  11959. example displays the name and content of several variables from the
  11960. environment (see 131Using the Environment for details on the use of
  11961. square brackets when expanding environment variables). Enter this on one
  11962. line:
  11963. for %var in (path prompt comspec) do echo %var=%[%var]
  11964. Retrieving Text from Files
  11965. FOR can extract text from files in two different ways. The first method
  11966. extracts each line from each file in the set and places it in the
  11967. variable. To use this method, place an [@] at the beginning of the set,
  11968. in front of the file name or names.
  11969. For example, if you have a file called DRIVES.TXT that contains a list of
  11970. drives on your computer, one drive name per line (with a ":" after each
  11971. drive letter), you can print the free space on each drive this way:
  11972. for %d in (@drives.txt) do free %d > prn
  11973. Because the [@] is also a valid filename character, FOR first checks
  11974. to see if the file exists with the [@] in its name (i.e., a file named
  11975. @DRIVES.TXT). If so, the filename is treated as a normal argument. If it
  11976. doesn't exist, FOR uses the filename (without the [@]) as the file
  11977. from which to retrieve text.
  11978. If you use @CON as the filename, FOR will read from standard input (a
  11979. redirected input file) or a pipe; see 050Redirection and Piping for more
  11980. information). If you use @CLIP: as the filename, FOR will read any text
  11981. available from the Windows clipboard (see 051Redirection for details on
  11982. when you can use the clipboard under 4DOS).
  11983. Parsing Text from Files
  11984. The second method of working with text from files is to have FOR parse each
  11985. line of each file for you. To begin a "file-parsing" FOR, you must use the
  11986. /F option and then include one or more file names in the set. When you
  11987. use this form of FOR, the variable must be a single letter, for example, %a.
  11988. This method of parsing, included for compatibility with CMD.EXE, can be
  11989. cumbersome and inflexible. For a more powerful method, use FOR with
  11990. "@filename" as the set to retrieve each line from the file, as described
  11991. in the previous section. Then use variable functions like 291@INSTR,
  11992. 294@LEFT, 316@RIGHT, and 329@WORD to parse the line.
  11993. By default, FOR will extract the first word or token from each line and
  11994. return it in the variable. For example, to display the first word on each
  11995. line in the file FLIST.TXT:
  11996. for /f %a in (flist.txt) do echo %a
  11997. You can control the way FOR /F parses each line by specifying one or more
  11998. parsing options in a quoted string immediately after the /F. The available
  11999. options are:
  12000. !INDENT 5 5 5 5
  12001. skip=n: FOR /F will skip "n" lines at the beginning of each
  12002. file before parsing the remainder of the file.
  12003. tokens=n, m, ...: By default, FOR /F returns just the first word or
  12004. "token" from each parsed line in the variable you named. You can have
  12005. it return more than one token in the variable, or return tokens in
  12006. several variables, with this option.
  12007. This option is followed by a list of numbers separated by commas. The
  12008. first number tells FOR /F which token to return in the first variable,
  12009. the second number tells it which to return in the second variable,
  12010. etc. The variables follow each other alphabetically starting with the
  12011. variable you name on the FOR command line. This example returns the
  12012. first word of each line in each text file in %d, the second in %e,
  12013. and the third in %f:
  12014. for /f "tokens=1,2,3" %d in (*.txt) do ...
  12015. You can also indicate a range of tokens by separating the numbers with
  12016. a hyphen [-]. This example returns the first word of each line in
  12017. %p, the second through fifth words in %q, and the eighth word in %r:
  12018. for /f "tokens=1,2-5,8" %p in (*.txt) do ...
  12019. eol=c: If FOR /F finds the character "c" in the line, it will assume
  12020. that the character and any text following it are part of a comment and
  12021. ignore the rest of the line.
  12022. delims=xxx...: By default, FOR /F sees spaces and tabs as word or
  12023. token delimiters. This option replaces those delimiters with all of
  12024. the characters following the equal sign to the end of the string. This
  12025. option must therefore be the last one used in the quoted options string.
  12026. !INDENT 0
  12027. You can also use FOR /F to parse a single string instead of each line
  12028. of a file by using the string, in quotes, as the set. For example, this
  12029. command will assign variable A to the string "this", B to "is", etc., then
  12030. display "this" (enter the command on one line):
  12031. for /f "tokens=1,2,3,4" %a in ("this is a test") do echo %a
  12032. "Counted" FOR Loop
  12033. The "counted FOR" loop is included only for compatibility with CMD.EXE.
  12034. In most cases, you will find the 615DO command more useful for
  12035. performing counted loops.
  12036. In a counted FOR command, the set is made up of numeric values instead of
  12037. text or file names. To begin a counted FOR command, you must use the /L
  12038. option and then include three values, separated by commas, in the set. These
  12039. are the start, step, and end values. During the first iteration of the FOR
  12040. loop, the variable is set equal to the start value. Before each iteration,
  12041. the variable is increased by the step value. The loop ends when the
  12042. variable exceeds the end value. This example will print the numbers from 1
  12043. to 10:
  12044. for /l %val in (1,1,10) do echo %val
  12045. This example will print the odd numbers from 1 to 10 (1, 3, 5, 7, and 9):
  12046. for /l %val in (1,2,10) do echo %val
  12047. The step value can be negative. If it is, the loop will end when the
  12048. variable is less than the end value.
  12049. Other Notes
  12050. You can use either % or %% in front of the variable name. Either form
  12051. will work, whether the FOR command is typed from the command line or is
  12052. part of an alias or batch file (some of the traditional command processors
  12053. require a single % if FOR is used at the command line, but require %% if FOR
  12054. is used in a batch file). The variable name can be up to 80 characters long.
  12055. The word DO is optional.
  12056. If you use a single-character FOR variable name, that name is given
  12057. priority over any environment variable which starts with the same letter,
  12058. in order to maintain compatibility with the traditional FOR command. For
  12059. example, the following command tries to add a: and b: to the end of the
  12060. PATH, but will not work as intended:
  12061. c:\> for %p in (a: b:) do path %path;%p
  12062. The "%p" in "%path" will be interpreted as the FOR variable %p
  12063. followed by the text "ath", which is not what was intended. To get around
  12064. this, use a different letter or a longer name for the FOR variable, or use
  12065. square brackets around the variable name (see 131Using the Environment).
  12066. FOR variables can be referenced like normal environment variables,
  12067. but are not stored in the same way, and cannot be modified with the
  12068. 663SET, 622ESET, or 680UNSET commands.
  12069. The following example uses FOR with variable functions to delete the
  12070. .BAK files for which a corresponding .TXT file exists in the current
  12071. directory:
  12072. c:\docs> for %file in (*.txt) do del %@name[%file].bak
  12073. The above command would not work properly on an LFN drive, because the
  12074. returned FILE variable might contain whitespace. To correct this
  12075. problem, you would need two sets of quotes, one for DEL and one for %@NAME:
  12076. c:\docs> for %file in (*.txt) do del "%@name["%file"].bak"
  12077. You can use 085command grouping to execute multiple commands for
  12078. each element in the set. For example, the following command copies each
  12079. .WKQ file in the current directory to the D:\WKSAVE directory, then changes
  12080. the extension of each file in the current directory to .SAV. This should
  12081. be entered on one line:
  12082. c:\text> for %file in (*.wkq) do (copy "%file"
  12083. d:\wksave\ ^ ren "%file" *.sav)
  12084. In a batch file you can use GOSUB to execute a subroutine for every
  12085. element in the set. Within the subroutine, the FOR variable can be used
  12086. just like any environment variable. This is a convenient way to execute a
  12087. complex sequence of commands for every element in the set without CALLing
  12088. another batch file.
  12089. One unusual use of FOR is to execute a collection of batch files or
  12090. other commands with the same parameter. For example, you might want to
  12091. have three batch files all operate on the same data file. The FOR command
  12092. could look like this:
  12093. c:\> for %cmd in (filetest fileform fileprnt) do %cmd datafile
  12094. This line will expand to three separate commands:
  12095. filetest datafile
  12096. fileform datafile
  12097. fileprnt datafile
  12098. The variable that FOR uses (the %CMD in the example above) is
  12099. created in the environment and then erased when the FOR command is
  12100. done. (For compatibility with COMMAND.COM, a single-character FOR variable
  12101. is created in a special way that does not overwrite an existing environment
  12102. variable with the same name.) When using a multi-character variable name
  12103. you must be careful not to use the name of one of your environment variables
  12104. as a FOR variable. For example, a command that begins
  12105. c:\> for %path in ...
  12106. will write over your current path setting, then erase the path variable
  12107. completely when FOR is done.
  12108. FOR statements can be nested; the permissible nesting level depends on
  12109. the amount of free space in 4DOS's internal stack. If you receive a stack
  12110. overflow error when using FOR in complex, nested command sequences, see the
  12111. notes under the 574StackSize directive.
  12112. Options
  12113. !INDENT 5 5 0 5
  12114. /A:: (Attribute select) Process only those files that have the
  12115. specified attribute(s) set. /A: will be used only when
  12116. processing wildcard file names in the set. It will be
  12117. ignored for filenames without wildcards or other items in
  12118. the set. The colon [:] after /A is required.
  12119. !INDENT 5 5 5 5
  12120. Preceding an attribute letter with a hyphen [-] will select
  12121. files that do not have that attribute set. You can OR attributes
  12122. by preceding each attribute letter with a plus sign [+].
  12123. The attributes are:
  12124. R Read-only D subDirectory
  12125. H Hidden A Archive
  12126. S System
  12127. If no attributes are listed (e.g., FOR /A: IN (*.*) DO ...), FOR
  12128. will process all files and subdirectories including hidden and
  12129. system files. If attributes are combined, all the specified attributes
  12130. must match for a file to be included. For example, /A:RHS
  12131. will include only those files with all three attributes set.
  12132. For example, to process only those files with the archive
  12133. attribute set:
  12134. for /a:a %f in (*.*) echo %f needs a backup!
  12135. !INDENT 5 5 0 5
  12136. /D: (Disable "/") Disables the special processing of the forward
  12137. slash [/] character in the FOR set. For compatibility with certain
  12138. versions of COMMAND.COM (those prior to Windows 95/98/ME), 4DOS
  12139. normally treats a forward slash inside the set as an "escape"
  12140. character, discard the slash, and return the character after the
  12141. slash, followed by the remainder of the string. This behavior can
  12142. be used in batch files to separate a string into individual
  12143. characters (although 4DOS provides a much easier method with the
  12144. 291@INSTR and 294@LEFT variable functions).
  12145. !INDENT 5 5 5 5
  12146. The /D option must follow the FOR keyword and come before the
  12147. variable name. These examples show the effects of /D:
  12148. c:\> for %s in (/abcdef) do echo %s
  12149. a
  12150. bcdef
  12151. c:\> for /d %s in (/abcdef) do echo %s
  12152. /abcdef
  12153. !INDENT 5 5 0 5
  12154. /F: (File parsing) Return one or more words or tokens from each line
  12155. of each file in the set. The /F option can be followed by one or
  12156. more options in a quoted string which control how the parsing is
  12157. performed. See the details under "Parsing Text From Files", above.
  12158. /H: (Hide dots) Suppress the assignment of the "." and ".."
  12159. directories to FOR variable.
  12160. /I"text": Select filenames by matching text in their
  12161. descriptions. The text can include 073wildcards and
  12162. extended wildcards. The search text must be enclosed in
  12163. quotation marks, and must follow the /I immediately, with no
  12164. intervening spaces. You can select all filenames that have a
  12165. description with /I"[?]*", or all filenames that do not have
  12166. a description with /I"[]".
  12167. /L: (counted loop) Interpret the three values in the set as the
  12168. start, step, and end values of a counted loop. See the details under
  12169. "Counted FOR Loop", above.
  12170. /R: (Recursive) Look in the current directory and all of its
  12171. subdirectories for files in the set. If the /R is followed by a
  12172. directory name, look for files in that directory and all of its
  12173. subdirectories. Note that FOR /R will not search into subdirectories
  12174. with the hidden or system attributes set.
  12175. !INDENT 0
  12176. ;---------------------------------------------------------------------------
  12177. !TOPIC 627 FREE
  12178. !TTY
  12179. Purpose: Display the total disk space, total bytes used, total bytes
  12180. free, and the percent used on the specified (or default) drive(s).
  12181. Format: FREE [drive: ...]
  12182. drive: One or more drives to include in the report.
  12183. !TTY
  12184. See also: 645MEMORY.
  12185. Usage
  12186. FREE provides the same disk information as the external command
  12187. CHKDSK, but without the wait, since it does not check the
  12188. integrity of the file and directory structure of the disk.
  12189. A colon [:] is required after each drive letter. This example displays
  12190. the status of drives A and C:
  12191. c:\> free a: c:
  12192. If the volume serial number is available, it will appear after the drive
  12193. label or name.
  12194. ;---------------------------------------------------------------------------
  12195. !TOPIC 696 FUNCTION
  12196. !TTY
  12197. Purpose: Create a user-defined variable function.
  12198. Format: FUNCTION [/P /R file...] [name[=][value]]
  12199. file: One or more files to read for function definitions.
  12200. name: The name of the function you want to display or set.
  12201. value: Variable function to be substituted for the variable name.
  12202. /P(ause) /R(ead file)
  12203. !TTY
  12204. See also: 699UNFUNCTION.
  12205. Usage
  12206. FUNCTION allows you to create or display user-defined variable functions
  12207. that can be used everywhere 241variable functions are used.
  12208. If you invoke FUNCTION with no parameters, it will display the current
  12209. function list. If you include a name, with no equals sign or value,
  12210. FUNCTION will display the current definition of that function. The name
  12211. may include 073wildcards, in which case FUNCTION will display the
  12212. current values, if any, of all functions matching that name. For example
  12213. function *dx*
  12214. will display all functions which contain dx in their name.
  12215. If you include the equals sign and value, FUNCTION will create or update the
  12216. function referred to by name.
  12217. Parameters to the function are numbered from %0 to %255, and are replaced
  12218. with the matching argument when the function is called. %1 is the first
  12219. argument, %2 is the second, and so on. %0 is the function name. %n&
  12220. contains all of the function's arguments starting with the nth; %&
  12221. contains all arguments. If you wish to use a symbol other than the
  12222. ampersand [&] to refer to multiple arguments, you can use the
  12223. 439ParameterChar directive in 4DOS.INI or the 664SETDOS /P command
  12224. to define a different parameter character.
  12225. For example, the function:
  12226. function leftmost=`%@left[1,%1]`
  12227. will return the leftmost character in a string.
  12228. Note that function definitions will nearly always contain references to
  12229. variables, parameters, or other functions. To prevent these references from
  12230. being expanded at the time the function is defined, use back-quotes around
  12231. the function definition (as above.) See 118Argument Quoting for more
  12232. information on using back-quotes to delay variable expansion.
  12233. Local and Global Functions
  12234. The functions can be stored in either a "local" or "global" list.
  12235. With a local function list, any changes made to functions will only affect
  12236. the current copy of 4DOS. They will not be visible in other shells or
  12237. other sessions. A local function list is the default.
  12238. With a global function list, all copies of 4DOS will share the same
  12239. function list, and any changes made to functions in one copy will affect all
  12240. other copies.
  12241. You can control the type of function list on the Startup page of the
  12242. 648OPTION dialogs, with the 387LocalFunctions directive in 4DOS.INI,
  12243. or with the /L and /LF 352startup options.
  12244. There is no fixed rule for determining whether to use a local or global
  12245. function list. Depending on your work style, you may find it most convenient
  12246. to use one type, or a mixture of types in different sessions or shells. We
  12247. recommend that you start with the default approach, then modify it if you
  12248. find a situation where the default is not convenient.
  12249. Whenever you start a secondary shell which uses a local function list, it
  12250. inherits a copy of the functions from the previous shell. However, any
  12251. changes made to functions in the secondary shell will affect only that
  12252. shell, and will be lost when the secondary shell exits. If you want changes
  12253. made in a secondary shell to affect the previous shell, use a global
  12254. function list in both shells.
  12255. Options
  12256. !INDENT 5 5 0 5
  12257. /P: (Pause) This option is only effective when FUNCTION is used to
  12258. display existing definitions. It pauses the display after each page
  12259. and waits for a keystroke before continuing (see 045Page
  12260. and File Prompts).
  12261. /R: (Read file) This option loads a function list from a file. The
  12262. format of the file is the same as that of the FUNCTION display:
  12263. !INDENT 5 5 5 5
  12264. name=value
  12265. where name is the name of the function and value is its
  12266. value. You can use an equal sign [=] or space to
  12267. separate the name and value. Back-quotes are not required
  12268. around the value. You can add comments to the file by
  12269. starting each comment line with a colon [:]. You can
  12270. load multiple files with one FUNCTION /R command by placing the
  12271. names on the command line, separated by spaces:
  12272. c:\> function /r func1.lst func2.lst
  12273. Each definition in a FUNCTION /R file can be up to 511 characters long. The
  12274. definitions can span multiple lines in the file if each line, except the
  12275. last, is terminated with an 086escape character. If there is no
  12276. filename argument and input is redirected, FUNCTION /R will read from
  12277. stdin.
  12278. !INDENT 0
  12279. ;---------------------------------------------------------------------------
  12280. !TOPIC 628 GLOBAL
  12281. !TTY
  12282. Purpose: Execute a command in the current directory and its subdirectories.
  12283. Format: GLOBAL [/H /I /P /Q] command
  12284. command: The command to execute, including arguments and
  12285. switches.
  12286. /H(idden directories) /P(rompt)
  12287. /I(gnore exit codes) /Q(uiet)
  12288. !TTY
  12289. Usage
  12290. GLOBAL performs the command first in the current directory and then in
  12291. every subdirectory under the current directory. The command can be an
  12292. internal command, an alias, an external command, or a batch file.
  12293. This example copies the files in every directory on drive A to the
  12294. directory C:\TEMP:
  12295. a:\> global copy *.* c:\temp
  12296. If files with the same name are found in more than one directory on A:,
  12297. assuming COPY is the default internal command, the one found last will
  12298. be left in C:\TEMP. Which one of the identically named files is found
  12299. last is unpredictable!
  12300. If you use the /P option, GLOBAL will prompt for each subdirectory
  12301. before performing the command. You can use this option if you want to
  12302. perform the command in most, but not all subdirectories of the current
  12303. directory.
  12304. You can use 085command grouping to execute multiple commands in
  12305. each subdirectory. For example, the following command copies each .TXT
  12306. file in the current directory and all of its subdirectories to drive A. It
  12307. then changes the extension of each of the copied files to .SAV:
  12308. c:\> global (copy *.txt a: ^ ren *.txt *.sav)
  12309. If you receive a stack overflow error when using GLOBAL in complex, nested
  12310. command sequences, see the notes under the 574StackSize directive.
  12311. Options
  12312. !INDENT 5 5 0 5
  12313. /H: (Hidden directories) Forces GLOBAL to look for hidden and system
  12314. subdirectories. If you don't use this switch, directories with either
  12315. attribute will be ignored.
  12316. /I: (Ignore exit codes) If this option is not specified, GLOBAL will
  12317. terminate if the command returns a non-zero exit code. Use
  12318. /I if you want the command to continue in additional subdirectories
  12319. even if it returns an error in one subdirectory. Even if you use /I,
  12320. GLOBAL will normally halt execution if 4DOS receives a
  12321. Ctrl-C or Ctrl-Break.
  12322. /P: (Prompt) Forces GLOBAL to prompt with each directory name before
  12323. it performs the command. Your options at the prompt are
  12324. explained in detail under 045Page and File Prompts.
  12325. /Q: (Quiet) Do not display the directory names as each directory is
  12326. processed.
  12327. !INDENT 0
  12328. ;---------------------------------------------------------------------------
  12329. !TOPIC 629 GOSUB
  12330. !TTY
  12331. Purpose: Execute a subroutine in the current batch file.
  12332. Format: GOSUB label [variables]
  12333. label: The batch file label at the beginning of
  12334. the subroutine.
  12335. variables: Optional GOSUB variables
  12336. !TTY
  12337. See also: 599CALL, 630GOTO and 659RETURN.
  12338. Usage
  12339. GOSUB can only be used in batch files.
  12340. 4DOS allows subroutines in batch files. A subroutine must start with a
  12341. label (a colon [:] followed by a one-word label name) which appears on
  12342. a line by itself. Case differences are ignored when matching labels.
  12343. The subroutine must end with a RETURN statement.
  12344. The subroutine is invoked with a GOSUB command from another part of the
  12345. batch file. After the RETURN, processing will continue with the command
  12346. following the GOSUB command. For example, the following batch file
  12347. fragment calls a subroutine which displays the directory and returns:
  12348. echo Calling a subroutine
  12349. gosub subr1
  12350. echo Returned from the subroutine
  12351. quit
  12352. :subr1
  12353. dir /a/w
  12354. return
  12355. GOSUB searches the entire batch file for the label, starting at the
  12356. beginning of the file. If the label does not exist, the batch file is
  12357. terminated with the error message "Label not found."
  12358. You can define GOSUB variables by placing them after the label name on the
  12359. GOSUB line. For example:
  12360. Gosub Sub1 abc 15 "Hello World"
  12361. The variable names are defined on the label line. For example:
  12362. :Sub1 [str n world]
  12363. defines three variables - %str (set to "abc"), %n (set to 15), and %world
  12364. (set to "Hello World"). Note that the square brackets are required on the
  12365. label line. GOSUB variables are only defined for the duration of the
  12366. subroutine. They are not inherited by nested GOSUBs, and are destroyed by
  12367. the RETURN statement.
  12368. GOSUB calls with variables are limited to a maximum of 22 levels deep.
  12369. (There is no numerical limit on normal GOSUB calls.)
  12370. GOSUB variables are placed in the environment in a special form for
  12371. the duration of the subroutine, and will "mask" any environment
  12372. variables of the same name that existed before the subroutine was
  12373. called. GOSUB variables can be referenced like normal environment
  12374. variables, but are not stored in the same way, and cannot be
  12375. modified with the 663SET, 622ESET, or 680UNSET commands.
  12376. You cannot use SET within a subroutine to change the value of a
  12377. GOSUB variable. If you attempt to do so, the SET command will set
  12378. the standard environment variable of the same name, not the GOSUB
  12379. variable, but this value will be "masked" by the GOSUB variable and
  12380. will remain inaccessible until the subroutine ends.
  12381. GOSUB saves the 634IFF and 615DO states, so IFF statements inside a
  12382. subroutine won't interfere with statements in the part of the batch file
  12383. from which the subroutine was called.
  12384. You cannot 659RETURN from a GOSUB while inside a 615DO loop.
  12385. If 4DOS reaches the end of the batch file while inside a subroutine,
  12386. it will automatically return to the command after the GOSUB, just as
  12387. if an explicit 659RETURN command had been included as the last
  12388. line of the file.
  12389. Subroutines can be nested; the permissible nesting level depends on the
  12390. amount of free space in 4DOS's internal stack. If you receive a stack
  12391. overflow error when using GOSUB in complex, nested command sequences, see
  12392. the notes under the 574StackSize directive.
  12393. ;---------------------------------------------------------------------------
  12394. !TOPIC 630 GOTO
  12395. !TTY
  12396. Purpose: Branch to a specified line inside the current batch file.
  12397. Format: GOTO [/I] label
  12398. label: The batch file label to branch to.
  12399. /I(FF and DO continue)
  12400. !TTY
  12401. See also: 629GOSUB.
  12402. Usage
  12403. GOTO can only be used in batch files.
  12404. After a GOTO command in a batch file, the next line to be executed will be
  12405. the one immediately after the label. The label must begin with a colon
  12406. [:] and appear on a line by itself. The colon is required on the line
  12407. where the label is defined, but is not required in the GOTO command
  12408. itself. Case differences are ignored when matching labels. Note: The
  12409. COMMAND.COM limitation that only the first 8 characters in labels are used
  12410. does not exist in 4DOS. Batch files relying on this limitation may not run
  12411. correctly under 4DOS.
  12412. This batch file fragment checks for the existence of the file TEST.TXT. If
  12413. the file exists, the batch file jumps to C_EXISTS and copies all the
  12414. files from the current directory to the root directory on A:. Otherwise,
  12415. it prints an error message and exits.
  12416. if exist test.txt goto C_EXISTS
  12417. echo TEST.TXT doesn't exist - exiting.
  12418. quit
  12419. :C_EXISTS
  12420. copy *.* a:\
  12421. GOTO searches the entire batch file for the label, starting at the
  12422. beginning of the file. If the label does not exist, the batch file is
  12423. terminated with the error message "Label not found."
  12424. To avoid errors in the processing of nested statements and loops,
  12425. GOTO cancels all active 634IFF statements and 615DO / ENDDO
  12426. loops unless you use /I. This means that a normal GOTO (without
  12427. /I) may not branch to any label that is between an IFF and the
  12428. corresponding ENDIFF or between a DO and the corresponding ENDDO.
  12429. For compatibility with CMD.EXE in the 25Windows NT line, the command
  12430. GOTO :EOF
  12431. will end processing of the current batch file if the label :EOF does not
  12432. exist. However, this is less efficient than using the 654QUIT or
  12433. 600CANCEL command to end a batch file.
  12434. Options
  12435. !INDENT 5 5 0 5
  12436. /I: (IFF and DO continue) Prevents GOTO from canceling IFF
  12437. statements and DO loops. Use this option only if you are
  12438. absolutely certain that your GOTO command is branching
  12439. entirely within any current IFF statement and any active
  12440. DO / ENDDO block. Using /I under any other conditions
  12441. will cause an error later in your batch file.
  12442. !INDENT 5 5 5 5
  12443. You cannot branch into another IFF statement, another DO
  12444. loop, or a different IFF or DO nesting level, whether you
  12445. use the /I option or not. If you do, you will
  12446. eventually receive an "unknown command" error (or execution
  12447. of the UNKNOWN_CMD 595alias) on a subsequent ENDDO, ELSE,
  12448. ELSEIFF, or ENDIFF statement.
  12449. !INDENT 0
  12450. ;---------------------------------------------------------------------------
  12451. !TOPIC 697 HEAD
  12452. !TTY
  12453. Purpose: Display the beginning of the specified file(s).
  12454. Format: HEAD [/A:[[+|-]rhsad] /Cn /I"text" /Nn /P /Q /V] [@file] file...
  12455. file: The file or list of files that you want to display.
  12456. @file: A text file containing the names of the files to
  12457. display, one per line (see 057@file lists for details).
  12458. /A: (Attribute select) /P(ause)
  12459. /C (Number of bytes) /Q(uiet)
  12460. /I (match description) /V(erbose)
  12461. /N (Number of lines)
  12462. !TTY
  12463. See also: 640LIST, 698TAIL, and 677TYPE.
  12464. File Selection
  12465. Supports extended 073wildcards, 074ranges, 079multiple file
  12466. names, and 080include lists.
  12467. Usage
  12468. The HEAD command displays the first part of a file. It is normally only
  12469. useful for displaying ASCII text files. Executable files (.COM and .EXE)
  12470. and many data files may be unreadable when displayed with HEAD because they
  12471. include non-alphanumeric characters. You can press Ctrl-S to pause HEAD's
  12472. display and then any key to continue.
  12473. To display the first 15 lines of the files MEMO1 and MEMO2:
  12474. c:\> head /n15 memo1 memo2
  12475. To display text from the clipboard, use CLIP: as the file name. CLIP:
  12476. will not return any data unless the clipboard contains text. See
  12477. 051redirection for additional information on CLIP:, including details on
  12478. when you can use the clipboard under 4DOS.
  12479. Options
  12480. !INDENT 5 5 0 5
  12481. /A:: (Attribute select) Select only those files that have the
  12482. specified attribute(s) set. The colon [:] after /A is
  12483. required. Preceding an attribute letter with a hyphen [-]
  12484. will select files that do not have that attribute set. You can
  12485. OR attributes by preceding each attribute letter with a plus sign [+].
  12486. !INDENT 5 5 5 5
  12487. The attributes are:
  12488. R Read-only S System
  12489. H Hidden A Archive
  12490. If no attributes are listed at all (e.g., HEAD /A: ...), HEAD will
  12491. select all files including hidden and system files. If attributes are
  12492. combined, all the specified attributes must match for a file to be
  12493. selected. For example, /A:RHS will select only those files
  12494. with all three attributes set.
  12495. !INDENT 5 5 0 5
  12496. /C: Display the specified number of bytes. /C accepts b, k, or m
  12497. modifiers at the end of the number. b is the number of 512-byte blocks,
  12498. k is 1000's of bytes, K is kilobytes, m is millions of bytes, and M is
  12499. megabytes.
  12500. /I"text": Select files by matching text in their descriptions. The
  12501. text can include 073wildcards and extended wildcards. The search
  12502. text must be enclosed in quotation marks, and must follow the /I
  12503. immediately, with no intervening spaces. You can select all filenames
  12504. that have a description with /I"[?]*", or all filenames that do not
  12505. have a description with /I"[]".
  12506. /N: The number of lines to display. The default is 10.
  12507. /P: (Pause) Prompt after displaying each page. Your options at the
  12508. prompt are explained in detail under 045Page and File Prompts.
  12509. /Q: (Quiet) Don't display a header for each file. This is the
  12510. default behavior unless /V is specified.
  12511. /V: (Verbose) Display a header for each file.
  12512. !INDENT 0
  12513. ;---------------------------------------------------------------------------
  12514. !TOPIC 631 HELP
  12515. !TTY
  12516. Purpose: Display help for internal and external commands.
  12517. Format: HELP [topic]
  12518. topic: A help topic, internal command, or external command.
  12519. !TTY
  12520. Usage
  12521. If you type the command HELP by itself (or press F1 when the command
  12522. line is empty), the table of contents is displayed. If you type HELP plus a
  12523. topic name, that topic is displayed. For example:
  12524. help copy
  12525. displays information about the COPY command and its options.
  12526. For more information on this help system see 014Help Reference.
  12527. ;---------------------------------------------------------------------------
  12528. !TOPIC 632 HISTORY
  12529. !TTY
  12530. Purpose: Display, add to, clear, or read the history list.
  12531. Format: HISTORY [/A command /F /N /P /R filename]
  12532. command: A command to be added to the history list.
  12533. filename: The name of a file containing entries to be added to
  12534. the history list.
  12535. /A(dd) /P(ause)
  12536. /F(ree) /R(ead)
  12537. /N(o duplicates)
  12538. !TTY
  12539. See also: 613DIRHISTORY and 643LOG.
  12540. Usage
  12541. 4DOS keeps a list of the commands you have entered on the command line. See
  12542. 033Command History and Recall for information on command recall, which
  12543. allows you to use the history list to repeat or edit commands you have
  12544. previously executed.
  12545. The HISTORY command lets you view and manipulate the command history list
  12546. directly. If no parameters are entered, HISTORY will display the current
  12547. command history list:
  12548. c:\> history
  12549. With the options explained below, you can clear the list, add new commands
  12550. to the list without executing them, save the list in a file, or read a new
  12551. list from a file.
  12552. The number of commands saved in the history list depends on the length of
  12553. each command line. The history list size can be specified at startup from
  12554. 256 to 8192 characters (see the 382History directive). The default
  12555. size is 1024 characters.
  12556. Your history list can be stored either locally (a separate history list for
  12557. each copy of 4DOS) or globally (all copies of 4DOS share the same list). For
  12558. full details see the discussion of local and global history lists under
  12559. 033Command History and Recall.
  12560. You can use the HISTORY command as an aid in writing batch files by
  12561. redirecting the HISTORY output to a file and then editing the file
  12562. appropriately. However, it may be easier to use the 643LOG /H command
  12563. for this purpose.
  12564. You can disable the history list or specify a minimum command-line
  12565. length to save on the Command Line page of the 648OPTION dialogs, or
  12566. with the 433HistMin directive in 4DOS.INI.
  12567. You can save the history list by redirecting the output of HISTORY to a file.
  12568. This example saves the command history to a file called HISTFILE and reads it
  12569. back again immediately. If you leave out the HISTORY /F command on the
  12570. second line, the contents of the file will be appended to the current history
  12571. list instead of replacing it:
  12572. c:\> history > histfile
  12573. c:\> history /f
  12574. c:\> history /r histfile
  12575. If you need to save your history at the end of each day's work, you might use
  12576. commands like this in your AUTOEXEC.BAT or other startup file:
  12577. if exist c:\histfile history /r c:\histfile
  12578. alias shut*down `history > c:\histfile`
  12579. This restores the previous history list if it exists, then defines an alias
  12580. which will allow you to save the history before shutting off the system.
  12581. Options
  12582. !INDENT 5 5 0 5
  12583. /A: (Add) Add a command to the history list. This performs the same
  12584. function as the Ctrl-K key at the command line (see
  12585. 033Command History and Recall).
  12586. /F: (Free) Erase all entries in the command history list.
  12587. /N: (No duplicates) Removes duplicate entries (oldest first) from
  12588. the history list. Also see the 451HistDups .INI directive.
  12589. /P: (Prompt) Wait for a key after displaying each page of the
  12590. list. Your options at the prompt are explained in detail under
  12591. 045Page and File Prompts.
  12592. /R: (Read) Read the command history from the specified file and
  12593. append it to the history list currently held in memory. Each line in
  12594. the file must fit within the 044command line length limit.
  12595. !INDENT 5 5 5 5
  12596. If you are creating a HISTORY /R file by hand, and need
  12597. to create an entry that spans multiple lines in the file,
  12598. you can do so by terminating each line, except the last,
  12599. with an 086escape character. However, you cannot use
  12600. this method to exceed the command line length limit.
  12601. !INDENT 0
  12602. ;---------------------------------------------------------------------------
  12603. !TOPIC 633 IF
  12604. !TTY
  12605. Purpose: Execute a command if a condition or set of conditions is true.
  12606. Format: IF [NOT] condition [.AND. | .OR. | .XOR. [NOT]
  12607. condition ...] command
  12608. or
  12609. IF [NOT] condition [.AND. | .OR. | .XOR. [NOT]
  12610. condition ...] (command) ELSE (command)
  12611. condition: A test to determine if the command should be executed.
  12612. command: The command to execute if the condition is true.
  12613. !TTY
  12614. See also: 634IFF, 287@IF.
  12615. Usage
  12616. IF is normally used only in aliases and batch files. It is always followed
  12617. by one or more conditions and then a command. First, the conditions are
  12618. evaluated. If they are true, the command is executed. Otherwise, the
  12619. command is ignored. If you add a NOT before a condition, the command is
  12620. executed only when the condition is false.
  12621. You can link conditions with .AND., .OR., or .XOR., and you can
  12622. group conditions with parentheses (see Combining Tests below). You can also
  12623. nest IF statements.
  12624. The conditions can test strings, numbers, the existence of a file or
  12625. subdirectory, the exit code returned by the preceding external command, and
  12626. the existence of aliases and internal commands.
  12627. The command can be an alias, an internal command, an external command, or a
  12628. batch file. The entire IF statement, including all conditions and the
  12629. command, must fit on one line.
  12630. Some examples of IF conditions and commands are included below; additional
  12631. examples are included in the EXAMPLES.BTM file which came with 4DOS.
  12632. You can use 085command grouping to execute multiple commands if
  12633. the condition is true. For example, the following command tests if any
  12634. .TXT files exist. If they do, they are copied to drive A: and their
  12635. extensions are changed to .TXO:
  12636. if exist *.txt (copy *.txt a: ^ ren *.txt *.txo)
  12637. (Note that the IFF command provides a more structured method of executing
  12638. multiple commands if a condition or set of conditions is true.)
  12639. If you receive a stack overflow error when using IF in complex, nested
  12640. command sequences, see the notes under the 574StackSize directive.
  12641. Conditions
  12642. The conditional tests listed in the following sections are available in both
  12643. the IF and IFF commands. They fit into two categories: string and numeric
  12644. tests, and status tests. The tests can use environment variables, internal
  12645. variables and variable functions, file names, literal text, and numeric
  12646. values as their arguments.
  12647. String and Numeric Tests
  12648. Six test conditions can be used to test character strings. The same
  12649. conditions are available for both numeric and normal text strings (see
  12650. below for details). In each case you enter the test as:
  12651. string1 operator string2
  12652. The operator defines the type of test (equal, greater than or equal,
  12653. and so on). You should always use spaces on both sides of the
  12654. operator. The operators are:
  12655. Operator Tests
  12656. EQ or == string1 equal to string2
  12657. NE or != string1 not equal to string2
  12658. LT string1 less than string2
  12659. LE string1 less than or equal to string2
  12660. GE string1 greater than or equal to string2
  12661. GT string1 greater than string2
  12662. EQC string1 equal to string2, including character case
  12663. When IF compares two character strings, it will use either a numeric
  12664. comparison or a string comparison. A numeric comparison treats the
  12665. strings as numeric values and tests them arithmetically. A string
  12666. comparison treats the strings as text.
  12667. The difference between numeric and string comparisons is best explained by
  12668. looking at the way two values are tested. For example, consider comparing
  12669. the values 2 and 19. Numerically, 2 is smaller, but as a string it is
  12670. "larger" because its first digit is larger than the first digit of 19. So
  12671. the first of these conditions will be true, and the second will be false:
  12672. if 2 lt 19 ...
  12673. if "2" lt "19" ...
  12674. IF determines which kind of test to do by examining the first character of
  12675. each string. If both strings begin with a numeric character (a digit,
  12676. sign, or decimal separator), a numeric comparison is used. (If a string
  12677. begins with a decimal separator it is not considered numeric unless the next
  12678. character is a digit, and there are no more decimal separators within the
  12679. string. For example, ".07" is numeric, but ".a" and ".07.50" are not.) If
  12680. either value is non-numeric, a string comparison is used. To
  12681. force a string comparison when both values are or may be numeric, use
  12682. double quotes around the values you are testing, as shown above. Because
  12683. the double quote is not a numeric character, IF performs a string comparison.
  12684. Case differences are ignored in string comparisons (except by EQC). If two
  12685. strings begin with the same text but one is shorter, the shorter string is
  12686. considered to be "less than" the longer one. For example, "a" is less than
  12687. "abc", and "hello_there" is greater than "hello".
  12688. When you compare text strings, you may need to enclose the arguments
  12689. in double quotes in order to avoid syntax errors which can occur if
  12690. one of the argument values is empty (e.g., due to an environment
  12691. variable which has never been assigned a value). This technique
  12692. will not work for numeric comparisons, as the quotes will force a
  12693. string compare, so with numeric tests you must be sure that all
  12694. variables are assigned values before the test is done.
  12695. Numeric comparisons work with both integer and decimal values. The values
  12696. to be compared must contain only numeric digits, decimal points, and an
  12697. optional sign (+ or -). The number may contain up to 20 digits to
  12698. the left of the decimal point, and 10 digits to the right.
  12699. 161Internal variables and 241variable functions are very
  12700. powerful when combined with string and numeric comparisons. They allow you
  12701. to test the state of your system, the characteristics of a file, date and
  12702. time information, or the result of a calculation. You may want to review
  12703. the variables and variable functions when determining the best way to set
  12704. up an IF test.
  12705. This batch file fragment tests for a string value:
  12706. input "Enter your selection : " %%cmd
  12707. if "%cmd" == "WP" goto wordproc
  12708. if "%cmd" NE "GRAPHICS" goto badentry
  12709. This example calls GO.BTM if the first two characters in the file MYFILE
  12710. are "GO":
  12711. if "%@left[2,%@line[myfile,0]]" == "GO" call go.btm
  12712. The next two examples test whether there is more than 500 KBytes of free
  12713. memory or more than 2 MBytes of free EMS memory (the EMS example only
  12714. applies to 4DOS):
  12715. c:\> if %@dosmem[K] gt 500 echo Over 500K free
  12716. c:\> if %@ems[M] gt 2 echo Over 2 MB EMS free
  12717. Status Tests
  12718. These conditions test the system or 4DOS status. You can use
  12719. internal variables and variable functions to test many other parts of the
  12720. system status.
  12721. DEFINED variable
  12722. If the variable exists in the environment, the condition is
  12723. true. This is equivalent to testing whether the variable is not
  12724. empty, for example the following two commands are equivalent:
  12725. if defined abc echo Hello
  12726. if "%abc" != "" echo Hello
  12727. Note that DEFINED tests only for environment variables, not for
  12728. internal variables like _4VER or _ANSI.
  12729. ERRORLEVEL [operator] n
  12730. This test retrieves the exit code of the preceding external
  12731. program. By convention, programs return an exit code of 0 when
  12732. they are successful and a number between 1 and 255 to indicate an
  12733. error. The condition can be any of the operators listed above
  12734. (EQ, !=, GT, etc.). If no operator is specified, the
  12735. default is GE. The comparison is done numerically.
  12736. Not all programs return an explicit exit code. For programs
  12737. which do not, the behavior of ERRORLEVEL is undefined.
  12738. EXIST filename
  12739. If the file exists, the condition is true. You can use wildcards
  12740. in the filename, in which case the condition is true if any file
  12741. matching the wildcard name exists.
  12742. Do not use IF EXIST to test for existence of a directory (use IF
  12743. ISDIR instead). Due to variations in operating system internals,
  12744. IF EXIST will not return consistent results when used to test for
  12745. the existence of a directory.
  12746. ISALIAS aliasname
  12747. If the name is defined as an alias, the condition is true.
  12748. ISDIR | DIREXIST path
  12749. If the subdirectory exists, the condition is true.
  12750. ISFUNCTION functionname
  12751. If the name is defined as a user-defined function, the condition
  12752. is true.
  12753. ISINTERNAL command
  12754. If the specified command is an active internal command, the
  12755. condition is true. Commands can be activated and deactivated
  12756. with the 664SETDOS /I command.
  12757. ISLABEL labelname
  12758. If the specified name exists as a label in the current batch
  12759. file, the condition is true. Labels may be one or more words
  12760. long.
  12761. The first batch file fragment below tests for the existence of A:\JAN.DOC
  12762. before copying it to drive C (this avoids an error message if the file does
  12763. not exist):
  12764. if exist a:\jan.doc copy a:\jan.doc c:\
  12765. This example tests the exit code of the previous program and stops all
  12766. batch file processing if an error occurred:
  12767. if errorlevel == 0 goto success
  12768. echo "External Error -- Batch File Ends!"
  12769. cancel
  12770. Combining Tests
  12771. You can negate the result of any test with NOT, and combine tests of
  12772. any type with .AND., .OR., and .XOR..
  12773. When two tests are combined with .AND., the result is true if both
  12774. individual tests are true. When two tests are combined with .OR., the
  12775. result is true if either (or both) individual tests are true. When two
  12776. tests are combined with .XOR., the result is true only if one of the
  12777. tests is true and the other is false.
  12778. This example runs a program called DATALOAD if today is Monday or Tuesday:
  12779. if "%_dow" == "Mon" .or. "%_dow" == "Tue" dataload
  12780. Test conditions are always scanned from left to right -- there is no implied
  12781. order of precedence, as there is in some programming languages. You can,
  12782. however, force a specific order of testing by grouping conditions with
  12783. parentheses, for example (enter this on one line):
  12784. if (%a == 1 .or. (%b == 2 .and. %c == 3)) echo something
  12785. Parentheses can only be used when the portion of the condition inside the
  12786. parentheses contains at least one ".and.", ".or.", or ".xor.". Parentheses
  12787. on a simple condition which does not combine two or more tests will be taken
  12788. as part of the string to be tested, and will probably make the test
  12789. fail. For example, the first of these IF tests would fail; the second would
  12790. succeed:
  12791. if (a == a) ...
  12792. if (a == a .and. b == b) ...
  12793. Parentheses can be nested. Under 4DOS, the permissible nesting level depends
  12794. on the amount of free space in 4DOS's internal stack; if you receive a stack
  12795. overflow error when using nested parentheses, see the notes under the
  12796. 574StackSize directive.
  12797. ;---------------------------------------------------------------------------
  12798. !TOPIC 634 IFF
  12799. !TTY
  12800. Purpose: Perform IF / THEN / ELSE conditional execution of commands.
  12801. Format: IFF [NOT] condition [.AND. | .OR. | .XOR. [NOT]
  12802. condition ...] THEN ^ commands
  12803. [ELSEIFF condition THEN ^ commands] ...
  12804. [ELSE ^ commands]
  12805. ^ ENDIFF
  12806. condition: A test to determine if the command(s) should be
  12807. executed.
  12808. commands: One or more commands to execute if the condition(s)
  12809. is true. If you use multiple commands, they must be
  12810. separated by command separators or be placed on
  12811. separate lines of a batch file.
  12812. !TTY
  12813. See also: 633IF and 287@IF.
  12814. Usage
  12815. IFF is similar to the IF command, except that it can perform one set of
  12816. commands when a condition or set of conditions is true and a different set
  12817. of commands when the conditions are false.
  12818. IFF can also execute multiple commands when the conditions are true or
  12819. false; IF normally executes only one command. IFF imposes no limit on the
  12820. number of commands and is generally a "cleaner" and more structured command
  12821. than IF.
  12822. IFF is always followed by one or more conditions. If they are true, the
  12823. commands that follow the word THEN are executed. Additional conditions can
  12824. be tested with ELSEIFF. If none of these conditions are true, the commands
  12825. that follow the word ELSE are executed. After the selected commands (if
  12826. any) are executed, processing continues after the word ENDIFF.
  12827. If you add a NOT before the condition, the THEN commands are executed only
  12828. when the condition is false and the ELSE commands are executed only when
  12829. the condition is true.
  12830. The commands may be separated by command separators, or may be on separate
  12831. lines of a batch file. You should include a command separator or a line
  12832. break after a THEN, before an ELSEIFF, and before and after an ELSE.
  12833. IFF supports all of the same conditions as IF including string and numeric
  12834. comparisons, DEFINED, ERRORLEVEL, EXIST, ISALIAS, ISDIR /
  12835. DIREXIST, ISFUNCTION, ISINTERNAL, and ISLABEL. See 633IF for
  12836. details on these conditions, and on linking them together using the
  12837. .AND. .OR. and .XOR. operators and parentheses. You can nest IFF
  12838. statements up to 15 levels deep.
  12839. The commands can include any internal command, alias, external command, or
  12840. batch file.
  12841. The following batch file fragment tests the monitor type (monochrome or
  12842. color), and sets the appropriate colors and prompt:
  12843. iff "%_monitor" == "color" then
  12844. color bright white on blue ^ cls
  12845. prompt=$e[s$e[1;1f$e[41;1;37m$e[K Path: $p$e[u$e[44;37m$n$g
  12846. else
  12847. prompt=$e[s$e[1;1f$e[0;7m$e[K Path: $p$e[u$e[0m$n$g
  12848. endiff
  12849. (The above example uses 915ANSI color sequences in the prompt.
  12850. See 652PROMPT for additional details.
  12851. The alias in this second example checks to see if the argument is a
  12852. subdirectory. If so, the alias deletes the subdirectory's files and removes
  12853. it (enter this on one line):
  12854. c:\> alias prune `iff isdir %1 then ^ del /sxz %1 ^ else ^
  12855. echo Not a directory!^endiff`
  12856. Be sure to read the cautionary notes about GOTO and IFF under the
  12857. 630GOTO command before using a GOTO inside an IFF statement.
  12858. If you pipe data to an IFF, the data will be passed to the command(s)
  12859. following the IFF, not to IFF itself.
  12860. ;---------------------------------------------------------------------------
  12861. !TOPIC 635 INKEY
  12862. !TTY
  12863. Purpose: Get a single keystroke from the user and store it in an
  12864. environment variable.
  12865. Format: INKEY [/C /D /K"keys" /M /P /Wn /X] [prompt] %%varname
  12866. prompt: Optional text that is displayed as a prompt.
  12867. varname: The variable that will hold the user's keystroke.
  12868. /C(lear buffer) /P(assword)
  12869. /D(igits only) /W(ait)
  12870. /K (valid keystrokes) /X (no carriage return)
  12871. /M(ouse button)
  12872. !TTY
  12873. See also: 636INPUT and 638KEYSTACK.
  12874. Usage
  12875. INKEY optionally displays a prompt. Then it waits for a specified time or
  12876. indefinitely for a keystroke, and places the keystroke into an environment
  12877. variable. It is normally used in batch files and aliases to get a menu
  12878. choice or other single-key input. Along with the INPUT command, INKEY
  12879. allows great flexibility in reading input from within a batch file or
  12880. alias.
  12881. If prompt text is included in an INKEY command, it is displayed while INKEY
  12882. waits for input.
  12883. The following batch file fragment prompts for a character and stores it in
  12884. the variable NUM:
  12885. inkey Enter a number from 1 to 9: %%num
  12886. INKEY reads standard input for the keystroke, so it will accept keystrokes
  12887. from a redirected file or from the 53Keystack. You can supply a
  12888. list of valid keystrokes with the /K option.
  12889. Standard keystrokes with ASCII values between 1 and 255 are stored directly
  12890. in the environment variable. Extended keystrokes (for example, function
  12891. keys and cursor keys) are stored as a string in decimal format, with a
  12892. leading @ (for example, the F1 key is @59). The Enter key is
  12893. stored as an extended keystroke, with the code @28. See
  12894. 911ASCII and Key Codes for a list of the ASCII and extended key codes.
  12895. To test for a non-printing ASCII keystroke returned by INKEY use the
  12896. 243@ASCII function to get the numeric value of the key. For example, to
  12897. test for Esc, which has an ASCII value of 27:
  12898. inkey Enter a key: %%key
  12899. if "%@ascii[%key]" == "27" echo Esc pressed
  12900. If you press Ctrl-C or Ctrl-Break while INKEY is waiting for a key,
  12901. execution of an alias will be terminated, and execution of a batch file
  12902. will be suspended while you are asked whether to cancel the batch job. A
  12903. batch file can handle Ctrl-C and Ctrl-Break itself with the 647ON
  12904. BREAK command.
  12905. Options
  12906. !INDENT 5 5 0 5
  12907. /C: (Clear buffer) Clears the keyboard buffer before INKEY accepts
  12908. keystrokes. If you use this option, INKEY will ignore any
  12909. keystrokes which you type, either accidentally or
  12910. intentionally, before INKEY is ready to accept input.
  12911. /D: (Digits only) Prevents INKEY from accepting any keystroke except
  12912. a digit from 0 to 9.
  12913. /K"keys": (Valid keystrokes) Specify the permissible
  12914. keystrokes. The list of valid keystrokes should be enclosed
  12915. in double quotes. For alphabetic keys the validity test is not
  12916. case-sensitive. You can specify extended keys by enclosing their
  12917. names in square brackets (within the quotes), for example:
  12918. !INDENT 5 5 5 5
  12919. inkey /k"ab[Alt-F10]" Enter A, B, Alt-F10 %%var
  12920. See 893Keys and Key Names for a complete listing of
  12921. the key names you can use within the square brackets, and a
  12922. description of the key name format.
  12923. If an invalid keystroke is entered, 4DOS will echo the
  12924. keystroke if possible, beep, move the cursor back one
  12925. character, and wait for another keystroke.
  12926. !INDENT 5 5 0 5
  12927. /M: (Mouse buttons) Returns @240 for the left button, @241 for the
  12928. right button, and @242 for the middle button.
  12929. /P: (Password) Prevents INKEY from echoing the character.
  12930. /W: (Wait) Timeout period, in seconds, to wait for a response. If no
  12931. keystroke is entered by the end of the timeout period, INKEY
  12932. returns with the variable unchanged. This allows you to continue the
  12933. batch file if the user does not respond in a given period of time. You
  12934. can specify /W0 to return immediately if there are no keys waiting
  12935. in the keyboard buffer.
  12936. /X: (No carriage return) Prevents INKEY from displaying a
  12937. carriage return and line feed after the user's entry.
  12938. !INDENT 5 5 5 5
  12939. For example, the following batch file fragment waits up to
  12940. 10 seconds for a character, then tests to see if a "Y" was
  12941. entered:
  12942. set net=N
  12943. inkey /K"YN" /w10 Load network (Y/N)? %%net
  12944. iff "%net" == "Y" then
  12945. rem Commands to load the network go here
  12946. endiff
  12947. !INDENT 0
  12948. ;---------------------------------------------------------------------------
  12949. !TOPIC 636 INPUT
  12950. !TTY
  12951. Purpose: Get a string from the keyboard and save it in an environment
  12952. variable.
  12953. Format: INPUT [/C /D /E /Ln /N /P /Wn /X] [prompt] %%varname
  12954. prompt: Optional text that is displayed as a prompt.
  12955. varname: The variable that will hold the user's input.
  12956. /C(lear buffer) /N(o colors)
  12957. /D(igits only) /P(assword)
  12958. /E(dit) /W(ait)
  12959. /L(ength) /X (no carriage return)
  12960. !TTY
  12961. See also: 635INKEY and 638KEYSTACK.
  12962. Usage
  12963. INPUT optionally displays a prompt. Then it waits for a specified time or
  12964. indefinitely for your entry. It places any characters you type into an
  12965. environment variable. INPUT is normally used in batch files and aliases to
  12966. get multi-key input. Along with the INKEY command, INPUT allows great
  12967. flexibility in reading user input from within a batch file or alias.
  12968. If prompt text is included in an INPUT command, it is displayed while INPUT
  12969. waits for input. Standard command-line editing keys may be used to edit
  12970. the input string as it is entered. If you use the /P password option,
  12971. INPUT will echo asterisks instead of the keys you type.
  12972. All characters entered up to, but not including, the carriage return are
  12973. stored in the variable.
  12974. The following batch file fragment prompts for a string and stores it in the
  12975. variable FNAME:
  12976. input Enter the file name: %%fname
  12977. INPUT reads standard input, so it will accept text from a redirected file
  12978. or from the KEYSTACK.
  12979. If you press Ctrl-C or Ctrl-Break while INPUT is waiting for input,
  12980. execution of an alias will be terminated, and execution of a batch file
  12981. will be suspended while you are asked whether to cancel the batch job. A
  12982. batch file can handle Ctrl-C and Ctrl-Break itself with the 647ON
  12983. BREAK command.
  12984. In 4DOS you can 052pipe text to INPUT from another command, which will
  12985. stash the first line of the command's output in the specified
  12986. variable. However, this trick will not work in 0204NT or Take Command,
  12987. which implement pipes differently. The 265@EXECSTR function provides a
  12988. more portable way to get the first line of a command's output.
  12989. Options
  12990. !INDENT 5 5 0 5
  12991. /C: (Clear buffer) Clears the keyboard buffer before INPUT accepts
  12992. keystrokes. If you use this option, INPUT will ignore any
  12993. keystrokes which you type, either accidentally or
  12994. intentionally, before INPUT is ready.
  12995. /D: (Digits only) Prevents INPUT from accepting any keystroks except
  12996. digits from 0 to 9.
  12997. /E: (Edit) Allows you to edit an existing value. If there is no
  12998. existing value for varname, INPUT proceeds as if /E had
  12999. not been used, and allows you to enter a new value.
  13000. /Ln: (Length) Sets the maximum number of characters which INPUT will
  13001. accept to "n". If you attempt to enter more than this
  13002. number of characters, INPUT will beep and prevent further
  13003. input (you will still be able to edit the characters typed
  13004. before the limit was reached).
  13005. /N: (No colors) Disables the use of input colors defined in the
  13006. 465InputColors directive in 4DOS.INI, and forces INPUT to use the
  13007. default display colors.
  13008. /P: (Password) Tells INPUT to echo asterisks, instead of the
  13009. characters you type.
  13010. /W: (Wait) Timeout period, in seconds, to wait for a response. If no
  13011. keystroke is entered by the end of the timeout period, INPUT
  13012. returns with the variable unchanged. This allows you to continue the
  13013. batch file if the user does not respond in a given period of time. If
  13014. you enter a key before the timeout period, INPUT will wait indefinitely
  13015. for the remainder of the line. You can specify /W0 to return
  13016. immediately if there are no keys waiting in the keyboard buffer.
  13017. /X: (No carriage return) Prevents INPUT from adding a carriage
  13018. return and line feed after the user's entry.
  13019. !INDENT 0
  13020. ;---------------------------------------------------------------------------
  13021. !TOPIC 637 KEYBD
  13022. !TTY
  13023. Purpose: Set the state of the keyboard toggles: Caps Lock, Num Lock,
  13024. and Scroll Lock.
  13025. Format: KEYBD [/Cn /Nn /Sn]
  13026. /C(aps lock) /S(croll lock)
  13027. /N(um lock)
  13028. n can be either 0 to turn off the toggle or 1 to turn on the toggle.
  13029. !TTY
  13030. Usage
  13031. Most keyboards have 3 toggle keys, the Caps Lock, Num Lock, and Scroll
  13032. Lock. The toggle key status is usually displayed by three lights at the
  13033. top right corner of the keyboard.
  13034. This command lets you turn any toggle key on or off. It is most useful in
  13035. batch files and aliases if you want the keys set a particular way before
  13036. collecting input from the user.
  13037. For example, to turn off the Num Lock and Caps Lock keys, you can use this
  13038. command:
  13039. c:\> keybd /c0 /n0
  13040. If you use the KEYBD command with no switches, it will display the present
  13041. state of the toggle keys.
  13042. KEYBD works by performing a BIOS setting. Some memory resident programs
  13043. that monitor the physical keyboard rather than BIOS settings may not
  13044. recognize that the state of the toggle keys has changed after a KEYBD
  13045. command.
  13046. The toggle key state is typically the same for all sessions, and changes
  13047. made with KEYBD in one session will therefore affect all other sessions. The
  13048. only exception is when running under OS/2, where KEYBD affects only the
  13049. current 4DOS session.
  13050. Options
  13051. !INDENT 5 5 0 5
  13052. /C: (Caps lock) Turn the Caps Lock key on or off.
  13053. /N: (Num lock) Turn the Num Lock key on or off.
  13054. /S: (Scroll lock) Turn the Scroll Lock key on or off.
  13055. !INDENT 0
  13056. ;---------------------------------------------------------------------------
  13057. !TOPIC 638 KEYSTACK
  13058. !TTY
  13059. Purpose: Feed keystrokes to a program or command automatically.
  13060. Format: KEYSTACK [!] [/Wx] ["abc"] [keyname[n]] ...
  13061. !: Signal to clear the Keystack and the keyboard buffer.
  13062. x: Delay in clock ticks.
  13063. "abc": Literal characters to be placed in the Keystack.
  13064. keyname: Name or code for a key to be placed in the
  13065. Keystack.
  13066. n: Number of times to repeat the named key.
  13067. /W(ait)
  13068. !TTY
  13069. Usage
  13070. KEYSTACK takes a series of keystrokes and feeds them to a program or
  13071. command as if they were typed at the keyboard. When the program has used
  13072. all of the keystrokes in the keystack buffer, it will begin to read the
  13073. keyboard for input, as it normally would.
  13074. KEYSTACK places keystrokes into a buffer. When an application program (or
  13075. 4DOS itself) requests another keystroke, the "stacked" keystroke is retrieved
  13076. from the buffer. The KEYSTACK command must be executed before running the
  13077. program which is going to receive the keystrokes in order to put the
  13078. keystrokes into the buffer first, so the program can find them when it runs.
  13079. KEYSTACK will only work if the memory-resident program 703KSTACK.COM has
  13080. been loaded. KSTACK is usually loaded from 109AUTOEXEC.BAT. If KSTACK is
  13081. not loaded, the KEYSTACK command will display an error message. To load
  13082. KSTACK.COM, add this line to AUTOEXEC.BAT:
  13083. d:\path\KSTACK.COM
  13084. where d:\path is the directory where your 4DOS files are stored.
  13085. Programs that bypass DOS and the BIOS for keyboard input cannot read
  13086. keystrokes entered with KEYSTACK. If you use KEYSTACK and then run such a
  13087. program, the keystrokes will not appear in the program, but may appear at
  13088. the prompt when you exit the program and return to 4DOS.
  13089. Characters entered within double quotes ("abc") will be sent "as is" to
  13090. the application. The only items allowed outside double quotes are key
  13091. names, key codes, the ! and /W options, and a repeat count.
  13092. See 893Keys and Key Names for a complete listing of key names and a
  13093. description of the key name and numeric key code format. If you want to
  13094. send the same key name or numeric code several times, you can follow it with
  13095. a repeat count in square brackets. For example, to send the Enter key 4
  13096. times, you can use this command:
  13097. keystack enter [4]
  13098. The repeat count works only with individual keystrokes, or numeric keystroke
  13099. or character values. It cannot be used with quoted strings.
  13100. An exclamation mark [!] will clear all pending keystrokes, both in the
  13101. KEYSTACK buffer and in the BIOS keyboard buffer.
  13102. For example, to start a program that needs a single space to skip its
  13103. opening screen you could use the command:
  13104. c:\comm> keystack 32 ^ progname
  13105. This places a space (ASCII code 32) in the buffer, then runs the program.
  13106. When the program looks for a keystroke to end the display of the opening
  13107. screen the keystroke is already in the buffer, and the opening screen is
  13108. removed immediately.
  13109. You can store a maximum of 511 text or special characters in the KEYSTACK
  13110. buffer. A delay takes two character slots in the buffer. Each
  13111. time the KEYSTACK command is executed, it will clear any remaining
  13112. keystrokes stored by a previous KEYSTACK command.
  13113. You may need to experiment with your programs and insert delays (see the
  13114. /W option) to find a keystroke sequence that works for a particular
  13115. program.
  13116. Advanced Options
  13117. KEYSTACK treats the number 0 as a special case; it is used with programs
  13118. that flush the keyboard buffer. When KEYSTACK processes a key value of 0,
  13119. it tells the program the buffer is clear, so subsequent keystrokes will be
  13120. accepted normally. Some programs will require several "0"s before they
  13121. will accept input; you may need to experiment to determine the correct
  13122. number.
  13123. For example, the following batch file starts a spreadsheet program and loads
  13124. the file specified on the command line when the batch file is invoked:
  13125. pushd c:\finance
  13126. keystack 0 Enter 0 Enter 0 Enter 0 Enter 0 Enter "/FR" 0 "%1" Enter
  13127. spread
  13128. popd
  13129. The sequence of "0 Enter" pairs tells the program that the keyboard buffer is
  13130. empty, then passes a carriage return, repeating this sequence five
  13131. times. (You must determine the actual sequence required by your software
  13132. through experimentation. Few programs require as long a startup sequence as
  13133. is shown here.) This gets the program to a point where an empty spreadsheet
  13134. is displayed. The rest of the KEYSTACK line issues a File Retrieve command
  13135. (/FR), simulates an empty keyboard buffer once more, enters the file name
  13136. passed on the batch command line (%1), and finally enters a carriage return
  13137. to end the file name.
  13138. Here's the same command defined as an alias (enter this on one line):
  13139. alias sload `pushd c:\finance ^ keystack 0 Enter 0 Enter 0 Enter 0
  13140. Enter 0 Enter "/FR" 0 "%1" Enter ^ spread ^ popd`
  13141. KEYSTACK mimics the BIOS by stacking both an ASCII code and a scan code for
  13142. each key. It does so by calculating the code for each character, whether it
  13143. is entered as part of a quoted string, as a key name, or as an ASCII value
  13144. less than 128. However, if you are stacking keys for a program which
  13145. distinguishes between keys with the same symbol, like the plus on the
  13146. keyboard and the gray plus, you will have to calculate the codes for the keys
  13147. on the numeric keypad yourself.
  13148. Calculate the value ((256 * scan code) + ASCII code) and enter that numeric
  13149. value as an argument for KEYSTACK. For example, for the Enter key on the
  13150. numeric keypad, the scan code is 224 and the ASCII code is 13, so to stack
  13151. both values use ((256 * 224) + 13) or KEYSTACK 57357. Try this approach if
  13152. a "normal" KEYSTACK command does not work (for example, if you use KEYSTACK
  13153. Enter for the Enter key and the program doesn't see the correct
  13154. character). To stack such combined key codes you must use the numeric
  13155. value, not the key name. See 911ASCII and Key Codes for a complete list
  13156. of ASCII codes and scan codes.
  13157. Option
  13158. !INDENT 5 5 0 5
  13159. /W: (Wait) Delay the next keystroke in the KEYSTACK buffer by a
  13160. specified number of clock "ticks". A clock tick is
  13161. approximately 1/18 second. The number of clock ticks to
  13162. delay should be placed immediately after the W, and must
  13163. be between 1 and 65535 (65535 ticks is about 1 hour). You
  13164. can use the /W option as many times as desired and at
  13165. any point in the string of keystrokes except within double
  13166. quotes. Some programs may need the delays provided by
  13167. /W in order to receive keystrokes properly from
  13168. KEYSTACK. The only way to determine what delay is needed is
  13169. to experiment. Sometimes a combination of a delay and an
  13170. "empty buffer" signal (a 0) are required.
  13171. !INDENT 5 5 5 5
  13172. For example, to start the program CADX and send it an F7, a delay
  13173. of one second, an indication that the keyboard buffer is empty, and
  13174. a carriage return:
  13175. c:\> keystack F7 /W18 0 Enter ^ cadx
  13176. !INDENT 0
  13177. ;---------------------------------------------------------------------------
  13178. !TOPIC 687 LFNFOR
  13179. !TTY
  13180. Purpose: Enable and disable LFN support for FOR wildcards in vDosPlus.
  13181. Format: LFNFOR [ON | OFF]
  13182. !TTY
  13183. See also: 626FOR, 334@ALTNAME, and 296@LFN.
  13184. Usage
  13185. If you use wildcards in the set of a FOR command, 4DOS returns long
  13186. file names on an LFN volume by default. For example, the command:
  13187. c:\> for %f in (*.*) do echo %f
  13188. will, by default, display the long version of each filename in the
  13189. current directory.
  13190. You can alter this behavior with LFNFOR. After the command
  13191. c:\> lfnfor off
  13192. the same command will return the short version of each filename in
  13193. the current directory. You can restore the default behavior with
  13194. the command
  13195. c:\> lfnfor on
  13196. If you enter LFNFOR without either ON or OFF, 4DOS will report the
  13197. current state of LFNFOR.
  13198. LFNFOR is included for compatibilty with COMMAND.COM. Under 4DOS,
  13199. you may find it easier to use 334@ALTNAME and 296@LFN to
  13200. convert between long and short filenames returned by FOR.
  13201. LFNFOR only affects the filenames and pathnames in a FOR command,
  13202. and only when wildcards are used in the set. It has no effect on
  13203. DIR, SELECT, or any other command which returns file and path names.
  13204. ;---------------------------------------------------------------------------
  13205. !TOPIC 639 LH
  13206. !TTY
  13207. Purpose: Load a memory resident program into an Upper Memory Block (UMB).
  13208. Format: LH [/L:r1,n1;r2,n2;... /S] filename
  13209. or
  13210. LOADHIGH [/L:r1,n1;r2,n2;... /S] filename
  13211. filename: The name of the program to load into high memory.
  13212. /L(oad region) /S(hrink)
  13213. !TTY
  13214. Usage
  13215. LH and LOADHIGH are synonyms. You can use either one.
  13216. If you load memory-resident programs into UMBs, you will have more room in
  13217. conventional memory for application programs. If your system has no UMBs,
  13218. or if the program is larger than the largest UMB, then LOADHIGH will load
  13219. the program into conventional base memory.
  13220. For example, to load the program C:\UTIL\CACHE.EXE into high memory:
  13221. c:\> loadhigh c:\util\cache.exe
  13222. The /L and /S switches are designed to aid in optimizing the use
  13223. of upper memory by selecting one or more UMB regions for a particular
  13224. memory-resident program to use.
  13225. While a complete discussion of memory optimization techniques is well
  13226. beyond the scope of this help system (see also
  13227. the 65535external DOS help system), the basic technique is to load each
  13228. memory-resident program into a specific region to free up the maximum
  13229. possible amount of base memory.
  13230. Options
  13231. !INDENT 5 5 0 5
  13232. /L:r1,n1;r2,n2;... : (Load region) Specifies which region(s)
  13233. should be used for the program, and optionally the minimum
  13234. free space required in a region before the program is
  13235. allowed access to that region.
  13236. !INDENT 5 5 5 5
  13237. If /L is not used, all upper memory regions are
  13238. available to the program. If /L is used, you must
  13239. specify one or more regions (r1, r2, etc.); only
  13240. those regions will be made available. Upper memory regions
  13241. are numbered sequentially beginning with 1 (region 0 refers
  13242. to low memory).
  13243. If only a region number is given, the entire region is made
  13244. available to the program (assuming there is free space in
  13245. the region). If a size is given for a particular region
  13246. (n1, n2, etc.), then the region is only made
  13247. available if the free space in the region is equal to or
  13248. greater than that size. All sizes are in bytes. Any region
  13249. not available to a particular program is "locked out" while
  13250. that program is loading and made available again once the
  13251. program is loaded. If the combination of /L values you
  13252. use does not provide sufficient upper memory space for the
  13253. program to load, it will be loaded in low memory.
  13254. You can combine /L values in several ways. In each of
  13255. the following examples, if the requested space is not
  13256. available or is insufficient the program is loaded into low
  13257. memory:
  13258. lh /l:2 filename
  13259. The program can use region 2 only.
  13260. lh /l:2;3 filename
  13261. The program can use regions 2 and 3 only.
  13262. lh /l:2,2048 filename
  13263. The program can use region 2 only, and only if it
  13264. has 2048 or more bytes free.
  13265. lh /l:2,2048;3 filename
  13266. The program can use region 2 if it has 2048 or more
  13267. bytes free, and region 3 regardless of how many
  13268. bytes it has free
  13269. !INDENT 5 5 0 5
  13270. /S: (Shrink) Shrinks each region selected by /L to the minimum
  13271. size used in /L before loading the program. This prevents
  13272. memory-resident programs which take all available memory from using
  13273. more than you want them to.
  13274. !INDENT 0
  13275. ;---------------------------------------------------------------------------
  13276. !TOPIC 640 LIST
  13277. !TTY
  13278. Purpose: Display a file, with forward and backward paging and scrolling.
  13279. Format: LIST [/A:[[+|-]rhsad] /H /I /I"text" /Ln /N /R /S /T"text" /W /X]
  13280. [@file] file...
  13281. file: A file or list of files to display.
  13282. @file: A text file containing the names of files to view,
  13283. one per line (see 057@file lists for details).
  13284. /A: (Attribute select) /R(everse)
  13285. /H(igh bit off) /S(tandard input)
  13286. /I(gnore wildcards) /T (search for text)
  13287. /I"text" (match description) /W(rap)
  13288. /L(ine offset) /X (heX display mode)
  13289. /N (line Numbers)
  13290. !TTY
  13291. See also: 697HEAD, 698TAIL, and 677TYPE.
  13292. File Selection
  13293. Supports extended 073wildcards, 074ranges, 079multiple file
  13294. names, and 080include lists.
  13295. Use wildcards with caution on LFN volumes; see 081LFN File Searches for details.
  13296. Usage
  13297. LIST provides a fast and flexible way to view a file, without the overhead
  13298. of loading and using a text editor.
  13299. For example, to display a file called MEMO.DOC:
  13300. c:\> list memo.doc
  13301. LIST is most often used for displaying ASCII text files. It can be used for
  13302. other files which contain non-alphabetic characters, but you may need to use
  13303. hex mode (see below) to read these files.
  13304. LIST uses the cursor pad to scroll through the file. The following keys
  13305. have special meanings:
  13306. Space Display the next page of the file (same as PgDn).
  13307. Home Display the first page of the file.
  13308. End Display the last page of the file.
  13309. Esc Exit the current file.
  13310. Del Prompt to delete the file.
  13311. Insert Prompt to save the file or pipe to a new name.
  13312. Tab Set a new tab size.
  13313. Ctrl-PgUp Display previous file.
  13314. Ctrl-PgDn Display next file.
  13315. Ctrl-C Quit LIST.
  13316. Up Scroll up one line.
  13317. Down Scroll down one line.
  13318. Left Scroll left 8 columns.
  13319. Right Scroll right 8 columns.
  13320. Ctrl-Left Scroll left 40 columns.
  13321. Ctrl-Right Scroll right 40 columns.
  13322. F1 Display online help
  13323. Del Prompt whether to delete the file.
  13324. Ins Prompt whether to save the pipe or file to a new
  13325. name.
  13326. Tab Prompt for a new default tab size.
  13327. B Go back one file to the previous file in the current
  13328. group of files.
  13329. F Prompt and search for a string.
  13330. Ctrl-F Prompt and search for a string, searching backward from
  13331. the end of the file.
  13332. G Go to a specific line, or, in hex mode, to a specific
  13333. hexadecimal offset.
  13334. H Toggle the "strip high bit" (/H) option.
  13335. I Display information on the current file (the full
  13336. name, size, date, and time).
  13337. L Toggle the "line numbering" (/L) option.
  13338. N Find next matching string.
  13339. Ctrl-N Find previous match in the file.
  13340. P Print the current page or the entire file.
  13341. W Toggle the "line wrap" (/W) option.
  13342. X Toggle the hex-mode display (/X) option.
  13343. Text searches performed with F, N, Ctrl-F, and Ctrl-N are not
  13344. case-sensitive unless you hold a Shift key while pressing F or Ctrl-F,
  13345. in which case the searches become case-sensitive.
  13346. If the display is currently in hexadecimal mode and you press F or Ctrl-F,
  13347. you will be prompted for whether you want to search in hexadecimal mode. If
  13348. you answer Y, you should then enter the search string as a sequence of
  13349. 2-digit hexadecimal numbers separated by spaces, for example 41 63 65 (these
  13350. are the 912ASCII values for the string "Ace"). Hexadecimal searches are
  13351. case-sensitive, and search for exactly the string whose ASCII values you
  13352. enter. The string can be any sequence of bytes in this mode, not just text.
  13353. When the search string is found LIST displays the line containing the string
  13354. at the top of the screen, and highlights the string it found. Any
  13355. additional occurrences of the string on the same display page are also
  13356. highlighted. Highlighting is intended for use with text files; in binary
  13357. files the search string will be found, but may not be highlighted properly.
  13358. You can use 073wildcards in the search string. For example, you can
  13359. search for the string "to*day" to find the next line which contains
  13360. the word "to" followed by the word "day" later on the same line, or
  13361. search for the numbers "101" or "401" with the search string "[14]01". If you
  13362. begin the search string with a back-quote [`], or enclose it in
  13363. back-quotes, wildcard characters in the string will be treated as normal text
  13364. with no special wildcard meaning.
  13365. LIST saves the search string used by F, N, Ctrl-F, and Ctrl-N, so
  13366. you can LIST multiple files and search for the same string simply by
  13367. pressing N in each file, or repeat your search the next time you use LIST.
  13368. You can use the /T switch to specify search text for the first
  13369. file. When you do so, LIST begins a search as soon as the file is
  13370. loaded. Use /I to ignore wildcards in the initial search string,
  13371. and /R to make the initial search go backwards from the end of the
  13372. file. When you LIST multiple files with a single LIST command, these
  13373. switches affect only the first file; they are ignored for the second and
  13374. subsequent files.
  13375. You can use the G key to go to a specific line number in the file (or
  13376. to a specified hexadecimal offset in hex mode). LIST numbers lines
  13377. beginning with 1, unless 475ListRowStart is set to 0. A new line
  13378. is counted for every CR or LF character (LIST determines automatically
  13379. which character is used for line breaks in each file), or when line
  13380. length reaches 511 characters, whichever comes first.
  13381. LIST normally allows long lines in the file to extend past the right edge
  13382. of the screen. You can use the horizontal scrolling keys (see above) to
  13383. view text that extends beyond the screen width. If you use the W
  13384. command or /W switch to wrap the display, each line is wrapped when it
  13385. reaches the right edge of the screen, and the horizontal scrolling keys are
  13386. disabled.
  13387. To view output from another command simply pipe the output of the
  13388. command to LIST, for example:
  13389. c:\> dir | list
  13390. Normally LIST will detect input from a pipe auomatically, but if it
  13391. does not, use /S to explicitly specify piped input.
  13392. To view text from the clipboard, use CLIP: as the file to be listed. CLIP:
  13393. will not return any data unless the clipboard contains text. See
  13394. 051redirection for additional information on CLIP:, including details on
  13395. when you can use the clipboard under 4DOS.
  13396. If you print the file which LIST is displaying, you will be asked
  13397. whether you wish to print the entire file or the current display page. The
  13398. print format will match the display format. If you have switched
  13399. to hexadecimal or wrapped mode, that mode will be used for the printed
  13400. output as well. If you print in wrapped mode, long lines will be
  13401. wrapped at the width of the display. If you print in normal display
  13402. mode without line wrap, long lines will be wrapped or truncated by the
  13403. printer, not by LIST.
  13404. Printed output normally goes to device LPT1. If you wish to send the
  13405. printed output to another device, use the Commands page of the 648OPTION
  13406. dialogs, or the 441Printer directive in 4DOS.INI.
  13407. If you specify a directory name instead of a filename as an argument, LIST
  13408. will display each of the files in that directory.
  13409. Most of the LIST keystrokes can be reassigned with 481key mapping
  13410. directives in 4DOS.INI.
  13411. You can set the colors used by LIST on the Commands page of the 648OPTION
  13412. dialogs, or the 467ListColors and 468ListStatBarColors directives in
  13413. 4DOS.INI. If ListColors is not used, the LIST display will use the current
  13414. default colors. If ListStatBarColors is not used, the status bar will use the
  13415. reverse of the LIST display colors.
  13416. By default, LIST sets tab stops every 8 columns. You can change this
  13417. behavior on the Display page of the 648OPTION dialogs, or with the
  13418. 444TabStops .INI file directive.
  13419. LIST normally writes text directly to the screen. If you have an unusual
  13420. display adapter which does not support direct video output, see the
  13421. 572OutputBIOS directive.
  13422. Options
  13423. !INDENT 5 5 0 5
  13424. /A:: (Attribute select) Select only those files that have the specified
  13425. attribute(s) set. The colon [:] after /A is required.
  13426. !INDENT 5 5 5 5
  13427. Preceding an attribute letter with a hyphen [-] will select
  13428. files that do not have that attribute set. You can OR attributes
  13429. by preceding each attribute letter with a plus sign [+].
  13430. The attributes are:
  13431. R Read-only S System
  13432. H Hidden A Archive
  13433. If no attributes are listed at all (e.g., LIST /A: ...), LIST will
  13434. select all files including hidden and system files. If attributes are
  13435. combined, all the specified attributes must match for a file to be
  13436. selected. For example, /A:RHS will select only those
  13437. files with all three attributes set.
  13438. !INDENT 5 5 0 5
  13439. /H: (High bit off) Strip the high bit from each character before
  13440. displaying. This is useful when displaying files created by
  13441. some word processors that turn on the high bit for
  13442. formatting purposes. You can toggle this option on and off
  13443. from within LIST with the H key.
  13444. /I: (Ignore wildcards) Only meaningful when used in conjunction with
  13445. the /T "text" option. Directs LIST to interpret characters such as
  13446. *, ?, [, and ] as literal characters instead of wildcard
  13447. characters. /I affects only the initial search started by /T, not
  13448. subsequent searches started from within LIST.
  13449. /I"text": Select files by matching text in their
  13450. descriptions. The text can include 073wildcards and
  13451. extended wildcards. The search text must be enclosed in
  13452. quotation marks, and must follow the /I immediately, with no
  13453. intervening spaces. You can select all filenames that have a
  13454. description with /I"[?]*", or all filenames that do not have
  13455. a description with /I"[]".
  13456. /Ln: (Line offset) Start at line n (no space is allowed between L and
  13457. n). This option only affects the initial page display; it does not
  13458. prevent you from subsequently scrolling back to the start of the file.
  13459. If /X is also specified, n designates a hexadecimal offset from the
  13460. start of file. Thus, the /L option is equivalent to the G (goto) key.
  13461. /N: (line numbers) Display line numbers. This option is useful with
  13462. source code listings and other text files where the exact line numbers
  13463. are important. You can toggle this option on and off from within LIST
  13464. with the L key.
  13465. /R: (Reverse) Only meaningful when used in conjuction with the
  13466. /T "text" option. Directs LIST to search for text from the end of
  13467. the file instead of from the beginning of the file. Using this switch
  13468. can speed up searches for text that is normally near the end of the
  13469. file, such as a signature. /R affects only the initial search
  13470. started by /T, not subsequent searches started from within LIST.
  13471. /S: (Standard input) Read from standard input rather than a
  13472. file. This allows you to redirect command output and view it with
  13473. LIST. Normally, LIST will detect input from a redirected command and
  13474. adjust automatically. However, you may find circumstances when /S is
  13475. required. For example, to use LIST to display the output of DIR you
  13476. could use either of these commands:
  13477. !INDENT 5 5 5 5
  13478. c:\> dir | list
  13479. c:\> dir | list /s
  13480. !INDENT 5 5 0 5
  13481. /T: (Text) Search for text in the first file. This option is the
  13482. same as pressing F, but it allows you to specify the search text on
  13483. the command line. The text must be contained in quotation marks if
  13484. it contains spaces, punctuation, or wildcard characters. For example, to
  13485. search for the string 4DOS in the file README.DOC, you can use this
  13486. command:
  13487. !INDENT 5 5 5 5
  13488. c:\> list /t4dos readme.doc
  13489. The search text may include 073wildcards and extended wildcards. For
  13490. example, to search for the words Hello and John on the same line in the
  13491. file LETTER.DAT:
  13492. c:\> list /t"Hello*John" letter.dat
  13493. When you LIST multiple files with a single LIST command, /T only
  13494. initiates a search in the first file. It is ignored for the second and
  13495. subsequent files. Also see /I and /R.
  13496. If /X is also given, the argument of /T must be an enclosed in double
  13497. quotes sequence of 2-digit hexadecimal numbers separated by spaces, for
  13498. example "E8 0C 66 01 00".
  13499. !INDENT 5 5 0 5
  13500. /W: (Wrap) Wrap the text at the right edge of the screen. This
  13501. option is useful when displaying files that don't have a carriage
  13502. return at the end of each line. The horizontal scrolling
  13503. keys do not work when the display is wrapped. You can toggle this
  13504. option on and off from within LIST with the W key.
  13505. /X: (hex mode) Display the file in hexadecimal (hex) mode. This
  13506. option is useful when displaying executable files and other
  13507. files that contain non-text characters. Each byte of the
  13508. file is shown as a pair of hex characters. The corresponding
  13509. text is displayed to the right of each line of hexadecimal data. You
  13510. can toggle this mode on and off from within LIST with the X key.
  13511. !INDENT 0
  13512. ;---------------------------------------------------------------------------
  13513. !TOPIC 641 LOADBTM
  13514. !TTY
  13515. Purpose: Switch a batch file to or from BTM mode.
  13516. Format: LOADBTM [ON | OFF]
  13517. !TTY
  13518. Usage
  13519. 4DOS recognizes two kinds of 102batch files: .BAT and .BTM. Batch
  13520. files executing in BTM mode run two to ten times faster than in BAT
  13521. mode. (However, BTM mode should not be used to load
  13522. memory-resident programs in DOS, nor should BTM mode be used for
  13523. self-modifying batch files.) Batch files automatically start in the
  13524. mode indicated by their extension.
  13525. The LOADBTM command turns BTM mode on and off. It can be used to
  13526. switch modes in either a .BAT or .BTM file. If you use LOADBTM with
  13527. no argument, it will display the current batch mode: LOADBTM ON or
  13528. LOADBTM OFF.
  13529. Using LOADBTM to repeatedly switch modes within a batch file is not
  13530. efficient. In most cases the speed gained by running some parts of the file
  13531. in BTM mode will be more than offset by the speed lost through repeated
  13532. loading of the file each time BTM mode is invoked.
  13533. LOADBTM can only be used within a batch file. It is most often used
  13534. to switch a .BAT file into BTM mode after memory-resident programs
  13535. are loaded, to convert a .BAT file to BTM mode without changing its
  13536. extension, or to switch a .BTM file into BAT mode in order to load
  13537. memory-resident programs.
  13538. The following .BAT file fragment loads some memory resident programs (TSRs),
  13539. and then switches to BTM mode:
  13540. rem Because this file has a .BAT extension,
  13541. rem the initial default state is LOADBTM OFF
  13542. rem Loading TSRs...
  13543. ansi.com
  13544. mouse.com
  13545. rem Switch to high-speed (BTM) mode now that
  13546. rem TSRs are loaded
  13547. loadbtm on
  13548. path c:\;c:\util;c:\dos
  13549. alias /r c:\aliases
  13550. .....
  13551. ;---------------------------------------------------------------------------
  13552. !TOPIC 643 LOG
  13553. !TTY
  13554. Purpose: Save a log of commands to a disk file.
  13555. Format: LOG [/E /H /W file] [ON | OFF | text]
  13556. file: The name of the file to hold the log.
  13557. text: An optional message that will be added to the log.
  13558. /E(rror log) /W(rite to file)
  13559. /H(istory log)
  13560. !TTY
  13561. See also: 632HISTORY.
  13562. Usage
  13563. LOG keeps a record of all internal and external commands you use, whether
  13564. they are executed from the prompt or from a batch file. Each entry includes
  13565. the shell level and the current system date and time, along with the actual
  13566. command after any alias or variable expansion. You can use the log file as
  13567. a record of your daily activities. The 399LogOn directive can be used
  13568. to enable command logging by default when 4DOS starts.
  13569. LOG with the /H option keeps a similar record called a "history
  13570. log." The history log records only commands entered at the prompt; it does
  13571. not record batch file commands. In addition, the history log does not record
  13572. the date and time for each command, and it records commands before aliases
  13573. and variables are expanded. The 400HistLogOn directive can be used to
  13574. enable history logging by default when 4DOS starts.
  13575. By default, LOG writes to the file 4DOSLOG in the root directory of C:. The
  13576. default file name for LOG /H is 4DOSHLOG. You can set the default log file
  13577. names on the Options 2 page of the 648OPTION dialogs, or with the
  13578. 437LogName and 432HistLogName directives in the .INI file.
  13579. Entering LOG or LOG /H with no parameters displays the name of the log file
  13580. and the log status (ON or OFF):
  13581. c:\> log
  13582. LOG (C:\4DOSLOG) is OFF
  13583. To enable or disable logging, add the word "ON" or "OFF" after the LOG
  13584. command:
  13585. c:\> log on
  13586. or
  13587. c:\> log /h on
  13588. Entering LOG or LOG /H with text writes a message to the log file, even if
  13589. logging is set OFF. This allows you to enter headers in the log file:
  13590. c:\> log "Started work on the database system"
  13591. The LOG file format looks like this:
  13592. [date time] command
  13593. where the date and time are formatted according to the country code set
  13594. for your system.
  13595. The LOG /H output can be used as the basis for writing batch files. Start
  13596. LOG /H, then execute the commands that you want the batch file to
  13597. execute. When you are finished, turn LOG /H off. The resulting file can be
  13598. turned into a batch file that performs the same commands with little or no
  13599. editing.
  13600. Options
  13601. !INDENT 5 5 0 5
  13602. /E: (Error log) This option saves all error messages to the log. It
  13603. applies only to the command log; /E has no effect on the history log.
  13604. /H: (History log) This option makes the other options on the command
  13605. line (after the /H) apply to the history log. For example, to turn on
  13606. history logging and write to the file C:\LOG\HLOG:
  13607. !INDENT 5 5 5 5
  13608. c:\> log /h /w c:\log\hlog
  13609. !INDENT 5 5 0 5
  13610. /W: (Write) This switch specifies a different filename for the LOG or
  13611. LOG /H output. It also automatically performs a LOG ON
  13612. command. For example, to turn logging on and write the log
  13613. to C:\LOG\LOGFILE:
  13614. !INDENT 5 5 5 5
  13615. c:\> log /w c:\log\logfile
  13616. !INDENT 5 5 0 5
  13617. Once you select a new file name with the LOG /W or LOG /H/W
  13618. command, LOG will use that file until you issue another LOG /W
  13619. or LOG /H/W command, or until you restart the vDosPlus session.
  13620. Turning LOG or LOG /H off or on does not change the file name.
  13621. !INDENT 0
  13622. ;---------------------------------------------------------------------------
  13623. !TOPIC 644 MD
  13624. !TTY
  13625. Purpose: Create a subdirectory.
  13626. Format: MD [/N /S] path...
  13627. or
  13628. MKDIR [/N /S] path...
  13629. path: The name of one or more directories to create.
  13630. /N(o update) /S(ubdirectories)
  13631. !TTY
  13632. See also: 655RD.
  13633. Usage
  13634. MD and MKDIR are synonyms. You can use either one.
  13635. MD creates a subdirectory anywhere in the directory tree. To create a
  13636. subdirectory from the root, start the path with a backslash [\]. For
  13637. example, this command creates a subdirectory called MYDIR in the root
  13638. directory:
  13639. c:\> md \mydir
  13640. If no path is given, the new subdirectory is created in the current
  13641. directory. This example creates a subdirectory called DIRTWO in the
  13642. current directory:
  13643. c:\mydir> md dirtwo
  13644. To create a directory from the parent of the current directory (that is, to
  13645. create a sibling of the current directory), start the pathname with two
  13646. periods and a backslash [..\].
  13647. You must quote any path which contains whitespace or special characters
  13648. (see 945File Names for details).
  13649. If MD creates one or more directories, they will be added automatically to
  13650. the 048extended directory search database unless the /N option is
  13651. specified.
  13652. Options
  13653. !INDENT 5 5 0 5
  13654. /N: (No update) Do not update the 048extended directory search
  13655. database, JPSTREE.IDX. This is useful when creating a temporary
  13656. directory which you do not want to appear in the extended search
  13657. database.
  13658. /S: (Subdirectories) MD creates one directory at a time unless you
  13659. use the /S option. If you need to create the directory
  13660. C:\ONE\TWO\THREE and none of the named directories exist,
  13661. you can use /S to have MD create all of the necessary
  13662. subdirectories for you in a single command:
  13663. !INDENT 5 5 5 5
  13664. c:\> md /s \one\two\three
  13665. !INDENT 0
  13666. ;---------------------------------------------------------------------------
  13667. !TOPIC 645 MEMORY
  13668. !TTY
  13669. Purpose: Display the amount and status of system RAM.
  13670. Format: MEMORY
  13671. !TTY
  13672. Usage
  13673. MEMORY displays information about the RAM in your system.
  13674. MEMORY lists the amount of total RAM in your system and the amount
  13675. available for applications after DOS, 4DOS, and memory-resident programs
  13676. have been loaded; the amount of EMS expanded memory, XMS extended memory,
  13677. and total extended memory; the HMA status; and the amount of memory 4DOS
  13678. is using for environment variable space, alias space, function space, and
  13679. history space.
  13680. You can use the information from the MEMORY display to fine tune your
  13681. system, to aid in setting the proper alias and environment sizes in
  13682. 4DOS.INI, and to be sure that you have sufficient memory for your largest
  13683. applications.
  13684. If you compare the free RAM displayed by MEMORY with the free RAM displayed
  13685. by CHKDSK and some memory map programs, MEMORY will usually show a slightly
  13686. higher value. The difference is the size of the environment passed to
  13687. these external programs; most memory mapping programs do not count the
  13688. passed environment as free space, but MEMORY does.
  13689. ;---------------------------------------------------------------------------
  13690. !TOPIC 646 MOVE
  13691. !TTY
  13692. Purpose: Move files to a new directory and drive.
  13693. Format: MOVE [/A:[[+|-]rhsad] /C /D /E /F /G /H /I"text" /M /N /O /P /Q
  13694. /R /S /T /U /V /W /Z] [@file] source... destination
  13695. source: A file or list of files to move.
  13696. destination: The new location for the files.
  13697. @file: A text file containing the names of the source
  13698. files to move, one per line (see 057@file lists
  13699. for details).
  13700. /A: (Attribute select) /O (move if not exist)
  13701. /C(hanged) /P(rompt)
  13702. /D(irectory) /Q(uiet)
  13703. /E (no error messages) /R(eplace)
  13704. /F(orce delete) /S(ubdirectory tree)
  13705. /G (percent moved) /T(otal)
  13706. /H(idden and system) /U(pdate)
  13707. /I (match descriptions) /V(erify)
  13708. /M(odified files) /W(ipe)
  13709. /N(othing) /Z (overwrite readonly files)
  13710. !TTY
  13711. See also: 606COPY and 658REN.
  13712. File Selection
  13713. Supports extended 073wildcards, 074ranges,
  13714. 079multiple file names, and 080include lists. Date, time, size or
  13715. file exclusion ranges anywhere on the line apply to all source files.
  13716. Use wildcards with caution on LFN volumes; see 081LFN File Searches for
  13717. details.
  13718. Usage
  13719. The MOVE command moves one or more files from one directory to another,
  13720. whether the directories are on the same drive or not. It has the same
  13721. effect as copying the files to a new location and then deleting the
  13722. originals. Like COPY and RENAME, MOVE works with single files, multiple
  13723. files, and sets of files specified with an include list.
  13724. The simplest MOVE command moves a single source file to a new location and,
  13725. optionally, gives it a new name. These two examples both move one file
  13726. from drive C: to the root directory on drive A:
  13727. c:\> move myfile.dat a:\
  13728. c:\> move myfile.dat a:\savefile.dat
  13729. In both cases, MYFILE.DAT is removed from drive C: after it has been copied
  13730. to drive A:. If a file called MYFILE.DAT in the first example, or
  13731. SAVEFILE.DAT in the second example, already existed on drive A:, it would
  13732. be overwritten. (This demonstrates the difference between MOVE and
  13733. RENAME. MOVE will move files between drives and will overwrite the
  13734. destination file if it exists; RENAME will not.)
  13735. When you move a single file, the destination can be a directory
  13736. name or a file name. If it is a directory name, and you add a backslash
  13737. [\] to the end of the name, MOVE will display an error message if
  13738. the name does not refer to an existing directory. You can use this feature
  13739. to keep MOVE from treating a mistyped destination directory name as
  13740. a file name, and attempting to move the source file to that name.
  13741. If you MOVE multiple files, the destination must be a directory name. MOVE
  13742. will move each file into the destination directory with its original
  13743. name. If the destination is not a directory, MOVE will display an error
  13744. message and exit. For example, if C:\FINANCE\MYFILES is not a directory,
  13745. this command will display an error; otherwise, the files will be moved to
  13746. that directory:
  13747. c:\> move *.wks *.txt c:\finance\myfiles
  13748. The /D option can be used for single or multiple file moves; it
  13749. checks to see whether the destination is a directory, and will
  13750. prompt to see if you want to create the destination directory if it
  13751. doesn't exist.
  13752. If MOVE creates one or more destination directories, they will be added
  13753. automatically to the 048extended directory search database.
  13754. You cannot move a file to a character device like the printer, or to
  13755. itself.
  13756. Be careful when you use MOVE with the 662SELECT command. If you
  13757. SELECT multiple files and the destination is not a directory (for example,
  13758. because of a misspelling), MOVE will assume it is a file name. In this
  13759. case each file will be moved in turn to the destination file, overwriting the
  13760. previous file, and then the original will be erased before the next file is
  13761. moved. At the end of the command, all of the original files will have been
  13762. erased and only the last file will exist as the destination file.
  13763. You can avoid this problem by using square brackets with SELECT instead of
  13764. parentheses (be sure that you don't allow the command line to get too long
  13765. -- watch the character count in the upper left corner while you're selecting
  13766. files). MOVE will then receive one list of files to move instead of a
  13767. series of individual filenames, and it will detect the error and halt. You
  13768. can also add a backslash [\] to the end of the destination name to ensure
  13769. that it is the name of a subdirectory (see above).
  13770. Advanced Features and Options
  13771. MOVE first attempts to rename the file(s), which is the fastest way to move
  13772. files between subdirectories on the same drive. If that fails (e.g., because
  13773. the destination is on a different drive or already exists), MOVE will copy the
  13774. file(s) and then delete the originals.
  13775. If MOVE must physically copy the files and delete the originals, rather
  13776. than renaming them (see above), then some disk space may be freed on the
  13777. source drive. MOVE displays the amount of disk space recovered unless the
  13778. the move is to the same drive, or /Q option is used (see below). It does
  13779. so by comparing the amount of free disk space before and after the MOVE
  13780. command is executed. However, this amount may be incorrect if you are using
  13781. a deletion tracking system which retains deleted files for later recovery,
  13782. or if another program performs a file operation while the MOVE command is
  13783. executed.
  13784. When physically copying files, MOVE preserves the hidden, system, and
  13785. read-only attributes of the source files, and sets the archive attribute of
  13786. the destination files. However, if the files can be renamed, and no
  13787. copying is required, then the file attributes are not changed.
  13788. Use caution with the /A: and /H switches (both of which can allow MOVE to
  13789. process hidden files) when you are physically moving files, and both the
  13790. source and destination directories contain file descriptions. If the source
  13791. file specification matches the description file name (normally
  13792. DESCRIPT.ION), and you tell MOVE to process hidden files, the DESCRIPT.ION
  13793. file itself will be moved, overwriting any existing file descriptions in the
  13794. destination directory. For example, if the C:\DATA directory contains
  13795. file descriptions, this command would overwrite any existing descriptions in
  13796. the D:\SAVE directory:
  13797. c:\data> move /h d*.* d:\save\
  13798. If you remove the hidden attribute from the DESCRIPT.ION file the same
  13799. caution applies even if you do not use /A:, /H, or /K, as DESCRIPT.ION
  13800. is then treated like any other file. You can use an 078exclusion range
  13801. to prevent the descriptions file from being moved:
  13802. c:\data> move /[!%192_dname] /h d*.* d:\save\
  13803. In an LFN environment, if you MOVE files with long filenames to a volume which
  13804. does not support them, 4DOS will store the destination files with their short,
  13805. FAT-compatible names. You can view the short names before executing the
  13806. MOVE with the 612DIR /X command.
  13807. Use caution when using wildcards with MOVE in an LFN environment. For
  13808. compatibility with COMMAND.COM, 4DOS's wildcard matching will match both
  13809. short and long filenames. This can move files you did not expect.
  13810. See 081LFN File Searches for additional details on the last two items
  13811. above.
  13812. Options
  13813. !INDENT 5 5 0 5
  13814. /A:: (Attribute select) Select only those files that have the
  13815. specified attribute(s) set. The colon [:] after /A is required.
  13816. !INDENT 5 5 5 5
  13817. Preceding an attribute letter with a hyphen [-] will select
  13818. files that do not have that attribute set. You can OR attributes
  13819. by preceding each attribute letter with a plus sign [+].
  13820. The attributes are:
  13821. R Read-only S System
  13822. H Hidden A Archive
  13823. If no attributes are listed at all (e.g., MOVE /A: *.* ...), MOVE
  13824. will select all files including hidden and system files. If attributes
  13825. are combined, all the specified attributes must match for a file to be
  13826. selected. For example, /A:RHS will select only those files with all
  13827. three attributes set.
  13828. See the cautionary note under Advanced Features and Options above
  13829. before using /A: when both source and destination directories contain
  13830. file descriptions.
  13831. !INDENT 5 5 0 5
  13832. /C: (Changed files) Move files only if the destination file exists
  13833. and is older than the source (see also /U). This option is useful
  13834. for updating the files in one directory from those in another without
  13835. moving any newly-created files. (Before using /C in a network
  13836. environment be sure to read the note under /U.)
  13837. /D: (Directory) Requires that the destination be a directory. If the
  13838. destination does not exist, MOVE will prompt to see if you
  13839. want to create it. If the destination exists as a file,
  13840. MOVE will fail with an "Access denied" error. Use this
  13841. option to avoid having MOVE accidentally interpret your
  13842. destination name as a file name when it's really a mistyped
  13843. directory name.
  13844. /E: (No error messages) Suppress all non-fatal error messages, such
  13845. as "File not found." Fatal error messages, such as "Drive not ready,"
  13846. will still be displayed. This option is most useful in batch files and
  13847. aliases.
  13848. /F: (Force delete) This option has no effect in vDosPlus.
  13849. /G: Displays the percent moved. This is useful when moving large
  13850. files across a network to ensure the move is proceeding.
  13851. /H: (Hidden) Move all files, including hidden and system files. See
  13852. the cautionary note under Advanced Features and Options above
  13853. before using /H when both source and destination directories contain
  13854. file descriptions.
  13855. /I"text": Select source files by matching text in their
  13856. descriptions. The text can include 073wildcards and
  13857. extended wildcards. The search text must be enclosed in
  13858. quotation marks, and must follow the /I immediately, with no
  13859. intervening spaces. You can select all filenames that have a
  13860. description with /I"[?]*", or all filenames that do not have
  13861. a description with /I"[]".
  13862. /M: (Modified files) Move only files that have the archive bit set.
  13863. The archive bit will remain set after the MOVE; to clear it use
  13864. 596ATTRIB.
  13865. /N: (Nothing) Do everything except actually move the file(s). This
  13866. option is most useful for testing what a complex MOVE command will do.
  13867. /N does NOT prevent creation of destination subdirectories when used
  13868. with /S.
  13869. /O: Don't move the file(s) unless the target doesn't exist.
  13870. /P: (Prompt) Prompt the user to confirm each move. Your options at
  13871. the prompt are explained in detail under 045Page and File Prompts.
  13872. /Q: (Quiet) Don't display filenames, the total number of files moved,
  13873. or the amount of disk space recovered, if any. This option is
  13874. most often used in batch files. See also /T.
  13875. /R: (Replace) Prompt for a Y or N response before overwriting
  13876. an existing destination file. See also the 4DOS.INI 450CopyPrompt
  13877. directive.
  13878. /S: (Subdirectories) Move an entire subdirectory tree to another
  13879. location. MOVE will attempt to create the destination directories if
  13880. they don't exist, and will remove empty subdirectories after the
  13881. move. When /D is used with /S, you will be prompted if the first
  13882. destination directory does not exist, but subdirectories below that will
  13883. be created automatically by MOVE. If MOVE /S creates one or more
  13884. destination directories, they will be added automatically to the
  13885. 048extended directory search database.
  13886. !INDENT 5 5 5 5
  13887. If you attempt to use /S to move a subdirectory tree into part of
  13888. itself, MOVE will detect the resulting infinite loop, display an error
  13889. message, and exit.
  13890. Do not use /S with @file lists; see 057@file lists for details.
  13891. Note that MOVE /S will not search into subdirectories with the hidden
  13892. or system attributes set unless you also specify /A: or /H.
  13893. !INDENT 5 5 0 5
  13894. /T: (Total) Don't display filenames as they are moved, but display the
  13895. total number of files moved and the amount of free disk space
  13896. recovered, if any.
  13897. /U: (Update) Move each source file only if it is newer than a matching
  13898. destination file or if a matching destination file does not
  13899. exist (also see /C). This option is useful for moving
  13900. new or changed files from one directory to another.
  13901. !INDENT 5 5 5 5
  13902. The time comparisons used with /U may not always work
  13903. reliably across a network, due to differences in time zone and
  13904. in the file time storage method between the local and remote
  13905. systems. Be sure to do some non-destructive testing (e.g. with
  13906. /N) before depending on this option to yield the results you
  13907. want in a network environment.
  13908. !INDENT 5 5 0 5
  13909. /V: (Verify) Verify each disk write. This is the same as executing
  13910. the VERIFY ON command, but is only active during the MOVE. /V does not
  13911. read back the file and compare its contents with what was written; it
  13912. only verifies that the data written to disk is physically readable.
  13913. /W: (Wipe) If the MOVE is to a different drive, overwrite the old
  13914. file with zeros before deleting it (like DEL /W).
  13915. /Z: (Overwrite) Overwrite read-only destination files. Without
  13916. this option, MOVE will fail with an "Access denied" error if the
  13917. destination file has its read-only attribute set.
  13918. !INDENT 0
  13919. For comparison with the external DOS MOVE command refer to
  13920. the 65535external DOS help system.
  13921. ;---------------------------------------------------------------------------
  13922. !TOPIC 647 ON
  13923. !TTY
  13924. Purpose: Execute a command in a batch file when a specific condition
  13925. occurs.
  13926. Format: ON BREAK [command]
  13927. or
  13928. ON ERROR [command]
  13929. or
  13930. ON ERRORMSG [command]
  13931. !TTY
  13932. Usage
  13933. ON can only by used in batch files.
  13934. ON sets a "watchdog" that remains in effect for the duration of the current
  13935. batch file. Whenever a BREAK or ERROR condition occurs after ON has been
  13936. executed, the corresponding command is automatically executed.
  13937. ON BREAK will execute the command if the user presses Ctrl-C or
  13938. Ctrl-Break.
  13939. ON ERROR and ON ERRORMSG will execute the command after any 4DOS or
  13940. operating system error (including 083critical errors). That
  13941. is, they will detect errors such as a disk write error, and 4DOS errors
  13942. such as a COPY command that fails to copy any files, or the use of an
  13943. invalid command option.
  13944. ON ERROR executes the command immediately after the error occurs,
  13945. without displaying any 4DOS error message (operating system
  13946. errors may still be displayed in some cases). ON ERRORMSG displays the
  13947. appropriate error message, then executes the command. If both are
  13948. specified, ON ERROR will take precedence, and the ON ERRORMSG setting will be
  13949. ignored. The remainder of this section discusses both settings together,
  13950. using the term ON ERROR[MSG].
  13951. ON BREAK and ON ERROR[MSG] are independent of each other. You can use either
  13952. one, or both, in any batch file.
  13953. Each time ON BREAK or ON ERROR[MSG] is used, it defines a new command to be
  13954. executed for a break or error, and any old command is discarded. If you
  13955. use ON BREAK or ON ERROR[MSG] with no following command, that type of error
  13956. handling is disabled. Error handling is also automatically disabled when
  13957. the batch file exits.
  13958. ON BREAK and ON ERROR[MSG] only affect the current batch file. If you CALL
  13959. another batch file, the first batch file's error handling is suspended, and
  13960. the CALLed file must define its own error handling. When control returns
  13961. to the first batch file, its error handling is reactivated.
  13962. The command can be any command that can be used on a batch file line by
  13963. itself. Frequently, it is a 630GOTO or 629GOSUB command. For
  13964. example, the following fragment traps any user attempt to end the batch
  13965. file by pressing Ctrl-C or Ctrl-Break. It scolds the user for
  13966. trying to end the batch file and then continues displaying the numbers:
  13967. on break gosub gotabreak
  13968. do i = 1 to 1000
  13969. echo %i
  13970. enddo
  13971. quit
  13972. :gotabreak
  13973. echo Hey! Stop that!!
  13974. return
  13975. You can use a 085command group as the command if you want to execute
  13976. multiple commands, for example:
  13977. on break (echo Oops, got a break!^quit)
  13978. ON BREAK and ON ERROR[MSG] always assume that you want to continue executing
  13979. the batch file. After the command is executed, control automatically returns
  13980. to the next command in the batch file (the command after the one that was
  13981. interrupted by the break or error). The only way to avoid continuing the
  13982. batch file after a break or error is for the command to transfer control to
  13983. another point with 630GOTO, end the batch file with 654QUIT or
  13984. 600CANCEL, or start another batch file (without CALLing it).
  13985. When handling an error condition with ON ERROR[MSG], you may find it useful to
  13986. use 161internal variables, particularly %164_? and
  13987. %218_SYSERR, to help determine the cause of the error.
  13988. The ON ERROR[MSG] command will not be invoked if an error occurs
  13989. while reading or writing a redirected input file, output file, or pipe.
  13990. If a break or error occurs while the command specified in ON BREAK or
  13991. ON ERROR[MSG] is executing, the command will be restarted. This means you
  13992. must use caution to avoid or handle any possible errors in the commands
  13993. invoked by ON ERROR[MSG], since such errors can cause an infinite loop
  13994. and/or a stack overflow condition.
  13995. ;---------------------------------------------------------------------------
  13996. !TOPIC 648 OPTION
  13997. !TTY
  13998. Purpose: Modify 4DOS configuration.
  13999. Format: OPTION [//optname=value ...]
  14000. optname: An .INI file directive to set or modify.
  14001. value: A new value for that directive.
  14002. !TTY
  14003. See also: 356.INI File Directives and 018OPTION Reference.
  14004. Usage
  14005. If the OPTION command is used without any parameters, it displays a set of
  14006. dialogs which allows you to modify many of the configuration options stored
  14007. in the .INI file.
  14008. OPTION handles most standard .INI file settings. More advanced settings,
  14009. including all those listed under 481Key Mapping Directives and
  14010. 550Advanced Directives cannot be modified with the OPTION
  14011. dialogs. These settings must be inserted or modified in the .INI
  14012. file manually. For more details see 353Modifying the .INI File.
  14013. OPTION does not preserve comments when saving modified settings in the
  14014. .INI file. To be sure .INI file comments are preserved, put them on
  14015. separate lines in the file. See 353Modifying the .INI File for
  14016. additional details.
  14017. OPTION runs the external program OPTION.EXE to display the dialogs. If 4DOS
  14018. cannot find OPTION.EXE it will display an error message. OPTION.EXE must
  14019. be run with the OPTION command, and will not work if you invoke it directly.
  14020. For information about using the OPTION dialogs, see 018OPTION Reference.
  14021. Setting Individual Options
  14022. If you follow the OPTION command with one or more sequences of a double slash
  14023. mark [//] followed by an option=value setting, the OPTION
  14024. dialogs or notebook will not appear. Instead, the new settings will take
  14025. effect immediately, and will be in effect for the current session only. This
  14026. example turns off batch file echo and changes the input colors to bright cyan
  14027. on black (enter this all on one line):
  14028. c:\> option //BatchEcho = No //InputColors = bri cya on bla
  14029. Option values may contain whitespace. However, you cannot enter an option
  14030. value which contains the "//" string.
  14031. This feature is most useful for testing settings quickly, and in aliases or
  14032. batch files which depend on certain options being in effect.
  14033. If you are setting more than one directive, it is more efficient to combine
  14034. them into one OPTION command because 4DOS must load the external OPTION.EXE
  14035. program for each OPTION //... command.
  14036. Changes made with // are temporary. They will not be saved in the
  14037. .INI file, even if you subsequently load the option dialogs and select Save.
  14038. ;---------------------------------------------------------------------------
  14039. !TOPIC 649 PATH
  14040. !TTY
  14041. Purpose: Display or alter the list of directories that 4DOS will
  14042. search for executable files, batch files, and files with
  14043. executable extensions that are not in the current directory.
  14044. Format: PATH [directory[;directory...]]
  14045. directory: The full name of a directory to include in the
  14046. path setting.
  14047. !TTY
  14048. See also: 622ESET and 663SET.
  14049. Usage
  14050. When 4DOS is asked to execute an external command (a .COM, .EXE, .BTM,
  14051. or .BAT file or executable extension), it first looks for the file in
  14052. the current directory. If it fails to find an executable file in the
  14053. current directory, it will search each of the directories specified in
  14054. the PATH setting.
  14055. For example, after the following PATH command, 4DOS will search for an
  14056. executable file in four directories: the current directory, the root
  14057. directory on drive C, then the DOS subdirectory on C, and then the UTIL
  14058. subdirectory on C:
  14059. c:\> path c:\;c:\dos;c:\util
  14060. The list of directories to search can be set or viewed with the PATH
  14061. command. The list is stored as an environment string named 138PATH,
  14062. and can also be set or viewed with SET, and edited with ESET.
  14063. Directory names in the path must be separated by semicolons [;]. Each
  14064. directory name is shifted to upper case to maintain compatibility with
  14065. programs which can only recognize upper case directory names in the path. If
  14066. you modify your path with the 663SET or 622ESET command, you
  14067. may include directory names in lower case. These may cause trouble with
  14068. some programs, which assume that all path entries have been shifted to
  14069. upper case.
  14070. On drives which support long filenames, some directory names may include
  14071. spaces or other special characters. Unlike other commands where quotes are
  14072. required, such names should not be quoted in the PATH.
  14073. If you enter PATH with no parameters, the current path is displayed.
  14074. Entering PATH and a semicolon clears the search path so that only the
  14075. current directory is searched for executable files (this is the default at
  14076. system startup).
  14077. Some applications also use the PATH to search for their data files.
  14078. 4DOS normally searches the path for files with the extensions .COM, .EXE,
  14079. .BTM, and .BAT (in that order). However, if you include an explicit
  14080. file extension on a command name (for example, WP.EXE), the search will
  14081. find files with that name and extension in the current directory and
  14082. every directory in the path. It will not locate other executable files
  14083. with the same base name (e.g., WP.COM).
  14084. The standard list of extensions for which to search can be modified by
  14085. setting 477PathExt to Yes in 4DOS.INI, then setting the
  14086. 143PATHEXT variable.
  14087. If you have an entry in the path which consists of a single period
  14088. [.], the current directory will not be searched first, but instead
  14089. will be searched when 4DOS reaches the "." in the path. This allows
  14090. you to delay the search of the current directory for executable files and
  14091. files with executable extensions. In rare cases, this feature may not be
  14092. compatible with applications which use the path to find their files; if you
  14093. experience a problem, you will have to remove the "." from the path while
  14094. using any such application.
  14095. In normal use, 4DOS can create a path as long as 506 characters (the
  14096. command-line limit is 511 characters, and "PATH " takes five). However,
  14097. some DOS applications expect a path no longer than the traditional limit of
  14098. 123 characters.
  14099. To create a path longer than the command line length limit, use PATH
  14100. repeatedly to append additional directories to the path:
  14101. path [first list of directories]
  14102. path %path;[second list of directories]
  14103. ...
  14104. You cannot use this method to extend the path beyond 506 characters (the
  14105. 511-byte internal buffer limit, with room for "PATH "). It is usually more
  14106. efficient to use aliases to load application programs than to create a long
  14107. PATH. See 595ALIAS for details.
  14108. If you specify an invalid directory in the path, it will be skipped and the
  14109. search will continue with the next directory in the path.
  14110. ;---------------------------------------------------------------------------
  14111. !TOPIC 650 PAUSE
  14112. !TTY
  14113. Purpose: Suspend batch file or alias execution.
  14114. Format: PAUSE [text]
  14115. text: The message to be displayed as a user prompt.
  14116. !TTY
  14117. Usage
  14118. A PAUSE command will suspend execution of a batch file or alias, giving you
  14119. the opportunity to change disks, turn on the printer, etc.
  14120. PAUSE waits for any key to be pressed and then continues execution. You
  14121. can specify the text that PAUSE displays while it waits for a keystroke, or
  14122. let it use the default message:
  14123. Press any key when ready...
  14124. If you press Ctrl-C or Ctrl-Break while PAUSE is waiting for a key,
  14125. execution of an alias will be terminated, and execution of a batch file
  14126. will be suspended while you are asked whether to cancel the batch job. In
  14127. a batch file you can handle Ctrl-C and Ctrl-Break yourself with the
  14128. 647ON BREAK command.
  14129. ;---------------------------------------------------------------------------
  14130. !TOPIC 651 POPD
  14131. !TTY
  14132. Purpose: Return to the disk drive and directory at the top of the
  14133. directory stack.
  14134. Format: POPD [*]
  14135. !TTY
  14136. See also: 614DIRS, 653PUSHD, and 047Directory Navigation.
  14137. Usage
  14138. Each time you use the PUSHD command, it saves the current disk drive and
  14139. directory on the internal directory stack. POPD restores the last drive
  14140. and directory that was saved with PUSHD and removes that entry from the
  14141. stack. You can use these commands together to change directories, perform
  14142. some work, and return to the starting drive and directory.
  14143. Directory changes made with POPD are recorded for display in the
  14144. 040directory history window. Directory changes made with POPD are
  14145. recorded in the directory history list and can be displayed in the directory
  14146. history window.
  14147. This example saves and changes the current disk drive and directory with
  14148. PUSHD, and then restores it. The current directory is shown in the prompt:
  14149. c:\> pushd d:\database\test
  14150. d:\database\test> popd
  14151. c:\>
  14152. You can use the DIRS command to see the complete list of saved drives and
  14153. directories (the directory stack).
  14154. The POPD command followed by an asterisk [*] clears the directory stack
  14155. without changing the current drive and directory.
  14156. If the directory on the top of the stack is not on the current drive,
  14157. POPD will switch to the drive and directory on the top of the stack without
  14158. changing the default directory on the current drive.
  14159. ;---------------------------------------------------------------------------
  14160. !TOPIC 652 PROMPT
  14161. !TTY
  14162. Purpose: Change the command-line prompt.
  14163. Format: PROMPT [text]
  14164. text: Text to be used as the new command-line prompt.
  14165. !TTY
  14166. Usage
  14167. You can change and customize the command-line prompt at any time. The
  14168. prompt can include normal text, and system information such as the current
  14169. drive and directory, the time and date, and the amount of memory
  14170. available. You can create an informal "Hello, Bob!" prompt or an
  14171. official-looking prompt full of impressive information.
  14172. The prompt text can contain special character sequences in the form $?,
  14173. where ? is one of the characters listed below:
  14174. a The ampersand character [&].
  14175. b The vertical bar character [|].
  14176. c The open parenthesis [(].
  14177. d Current date, in the format: Mon 6-19-00 (the month, day,
  14178. and year are formatted according to your current country
  14179. settings.
  14180. D Current date, in the format: Mon Jun 19, 2000.
  14181. e The ASCII ESC character (decimal 27).
  14182. f The close parenthesis [)].
  14183. g The > character.
  14184. h Backspace over the previous character.
  14185. J Date in ISO 8601 international format (yyyy-mm-dd).
  14186. K Date in ISO 8601 week date format (yyyy-Www-d).
  14187. l The < character.
  14188. m Time in hours and minutes using 24-hour format.
  14189. M Time in hours and minutes using the default country format and
  14190. retaining "a" or "p", e.g. 4:07p.
  14191. n Current drive letter.
  14192. p Current drive and directory (lower case).
  14193. P Current drive and directory (upper case on drives which do
  14194. not support long filenames; directory names shown in mixed case as
  14195. stored on the disk on LFN drives.)
  14196. q The = character.
  14197. r The numeric exit code of the last external command.
  14198. s The space character.
  14199. t Current 24-hour time, in the format hh:mm:ss.
  14200. T Current 12-hour time, in the format hh:mm:ss[a|p].
  14201. U The current user (the value of the environment variable
  14202. 147LOGINNAME).
  14203. v Operating system version number, in the format 7.10.
  14204. w Current working directory in a shortened format (lower
  14205. case). If the current directory is the root or a first level
  14206. subdirectory, it is displayed as-is. If it is second level or
  14207. deeper, the path is truncated in the display.
  14208. W Current working directory in a shortened format (upper case
  14209. on drives which do not support long filenames; directory names
  14210. shown in mixed case as stored on the disk on LFN drives.)
  14211. xd: Current directory on drive d:, in lower case, including drive
  14212. letter. (Uses the actual case of the directory name as stored on
  14213. the disk for LFN drives.)
  14214. Xd: Current directory on drive d:, in upper case, including drive
  14215. letter.
  14216. z Current shell nesting level; the primary command processor is
  14217. shell 0.
  14218. + Display one + character for each directory on the PUSHD directory
  14219. stack.
  14220. $ The $ character.
  14221. _ CR/LF (go to beginning of a new line).
  14222. For example, to set the prompt to the current date and time, with a ">" at
  14223. the end:
  14224. c:\> prompt $D $t $g
  14225. Mon Jun 19, 2000 10:29:19 >
  14226. You can include the PROMPT command in your 109AUTOEXEC.BAT file to
  14227. set the prompt whenever you start vDosPlus, in 1094START, or in
  14228. any batch file that runs when 4DOS starts.
  14229. The default prompt is $n$g (drive name plus ">") on drives A and B, and
  14230. $p$g (current drive and directory plus ">") on all other drives.
  14231. If you enter PROMPT with no arguments, the prompt will be reset to its
  14232. default value. The current setting of the PROMPT will be stored in an
  14233. environment variable named 139PROMPT.
  14234. Along with literal text, special characters, and 915ANSI sequences, you
  14235. can include any 131environment variable, 161internal variable, or
  14236. 241variable function in a prompt. For example, if you want to display
  14237. the amount of free memory in the command prompt, plus the current drive and
  14238. directory, you could use this command:
  14239. c:\> prompt (%%@dosmem[K]K) $p$g
  14240. (601K) c:\data>
  14241. Notice that the @DOSMEM function is shown with two leading percent signs
  14242. [%]. If you used only one percent sign, the @DOSMEM function would be
  14243. expanded once when the PROMPT command was executed, instead of every time
  14244. the prompt is displayed. As a result, the amount of memory would never
  14245. change from the value it had when you entered the PROMPT command. You can
  14246. also use back-quotes to delay expanding the variable function until the
  14247. prompt is displayed:
  14248. c:\> prompt `(%@dosmem[K]K) $p$g`
  14249. You can use this feature along with the 264@EXEC variable function
  14250. to create a complex prompt which not only displays information but executes
  14251. commands. For example, to execute an alias which checks battery status each
  14252. time the prompt is displayed (enter the alias on one line):
  14253. c:\> alias cbatt `if %_apmlife lt 30 beep 440 4 880 4 440 4 880 4`
  14254. c:\> prompt `%@exec[@cbatt]$p$g`
  14255. You can include 915ANSI escape sequences in the PROMPT text. This example
  14256. uses ANSI sequences to set a prompt that displays the shell level, date, time
  14257. and path in color on the top line of the screen (enter the command on one
  14258. line:
  14259. c:\> prompt $e[s$e[1;1f$e[41;1;37m$e[K[$z] $d
  14260. Time: $t$h$h$h Path: $p$e[u$e[0;32m$n$g
  14261. You may find it helpful to define a different prompt in secondary shells,
  14262. perhaps including $z in the prompt to display the shell level. To do so,
  14263. place a PROMPT command in your 1094START file and use 633IF or
  14264. 634IFF statements to set the appropriate prompt for different shells.
  14265. ;---------------------------------------------------------------------------
  14266. !TOPIC 653 PUSHD
  14267. !TTY
  14268. Purpose: Save the current disk drive and directory, optionally changing
  14269. to a new drive and directory.
  14270. Format: PUSHD [path]
  14271. path: The name of the new default drive and directory.
  14272. !TTY
  14273. See also: 601CD, 602CDD, 614DIRS, 651POPD, and 047Directory Navigation.
  14274. Usage
  14275. PUSHD saves the current drive and directory on a "last in, first out"
  14276. directory stack. The POPD command returns to the last drive and directory
  14277. that was saved by PUSHD. You can use these commands together to change
  14278. directories, perform some work, and return to the starting drive and
  14279. directory. The DIRS command displays the contents of the directory stack.
  14280. To save the current drive and directory, without changing directories, use
  14281. the PUSHD command by itself, with no path.
  14282. If a path is specified as part of the PUSHD command, the current drive
  14283. and directory are saved and PUSHD changes to the specified drive and
  14284. directory. If the path includes a drive letter, PUSHD changes to the
  14285. specified directory on the new drive without changing the current directory
  14286. on the original drive.
  14287. This example saves the current directory and changes to C:\WORDP\MEMOS,
  14288. then returns to the original directory:
  14289. c:\> pushd \wordp\memos
  14290. c:\wordp\memos> popd
  14291. c:\>
  14292. You should quote the path name if it contains whitespace or special
  14293. characters. See 945File Names for additional details.
  14294. If PUSHD cannot change to the directory you have specified it will attempt to
  14295. search the 049CDPATH and the 048extended directory search
  14296. database. You can also use 073wildcards in the path to
  14297. force an extended directory search. See 047Directory Navigation
  14298. for complete details on these and other directory navigation features.
  14299. Directory changes made with PUSHD are also recorded in the
  14300. 040directory history list and can be displayed in the directory history
  14301. window.
  14302. The directory stack can hold up to 511 characters, or between 20 and 40
  14303. entries (depending on the length of the names). If you exceed this limit,
  14304. the oldest entry is removed before adding a new entry.
  14305. ;---------------------------------------------------------------------------
  14306. !TOPIC 654 QUIT
  14307. !TTY
  14308. Purpose: Terminate the current batch file.
  14309. Format: QUIT [value]
  14310. value: The numeric exit code to return to 4DOS or to the
  14311. previous batch file.
  14312. !TTY
  14313. See also: 600CANCEL and 624EXIT.
  14314. Usage
  14315. QUIT provides a simple way to exit a batch file before reaching the end of
  14316. the file. If you QUIT a batch file called from another batch file, you
  14317. will be returned to the previous file at the line following the original
  14318. CALL.
  14319. QUIT only ends the current batch file. To end all batch file processing,
  14320. use the CANCEL command.
  14321. If you specify a value, QUIT will set the ERRORLEVEL or exit code to that
  14322. value. For information on exit codes, see the 633IF command and the
  14323. %162? variable.
  14324. You can also use QUIT to terminate an alias. If you QUIT an alias while
  14325. inside a batch file, QUIT will end both the alias and the batch file and
  14326. return you to the command prompt or to the calling batch file.
  14327. ;---------------------------------------------------------------------------
  14328. !TOPIC 655 RD
  14329. !TTY
  14330. Purpose: Remove one or more subdirectories.
  14331. Format: RD [/I"text"] [@file] path...
  14332. or
  14333. RMDIR [/I"text"] [@file] path...
  14334. path: The name of one or more subdirectories to remove.
  14335. @file: A text file containing the names of the directories to
  14336. remove, one per line (see 057@file lists for details).
  14337. /I: (match descriptions)
  14338. !TTY
  14339. See also: 644MD.
  14340. File Selection
  14341. Supports extended 073wildcards, 074ranges, 079multiple file
  14342. names, and 080include lists.
  14343. Usage
  14344. RD and RMDIR are synonyms. You can use either one.
  14345. RD removes directories from the directory tree. For example, to remove the
  14346. subdirectory MEMOS from the subdirectory WP:
  14347. c:\> rd \wp\memos
  14348. Before using RD, you must delete all files and subdirectories (and their
  14349. files) in the path you want to remove. Remember to remove hidden and
  14350. read-only files as well as normal files (you can use DEL /Z to delete
  14351. hidden and read-only files).
  14352. You can use wildcards in the path.
  14353. You must quote any path which contains whitespace or special
  14354. characters. See 945File Names for additional details.
  14355. If RD removes one or more directories, they will be deleted automatically
  14356. from the 048extended directory search database.
  14357. You cannot remove the root directory, the current directory (.), any
  14358. directory above the current directory in the directory tree, or any
  14359. directory in use by another process in a multitasking system.
  14360. Option
  14361. !INDENT 5 5 0 5
  14362. /I"text": Select directories by matching text in their
  14363. descriptions. The text can include 073wildcards and
  14364. extended wildcards. The search text must be enclosed in
  14365. quotation marks, and must follow the /I immediately, with no
  14366. intervening spaces. You can select all filenames that have a
  14367. description with /I"[?]*", or all filenames that do not have
  14368. a description with /I"[]".
  14369. !INDENT 0
  14370. ;---------------------------------------------------------------------------
  14371. !TOPIC 656 REBOOT
  14372. !TTY
  14373. Purpose: Do a warm or cold system reboot or change the power state.
  14374. Format: REBOOT [/C /M /P /S /V]
  14375. /C(old reboot) /S(uspend)
  14376. /M(onitor off) /V(erify)
  14377. /P(ower off)
  14378. !TTY
  14379. Usage
  14380. The /M, /P, /S and /V options of this command will work in vDosPlus.
  14381. With the /V option it will prompt for confirmation (Y or N) before
  14382. suspending or turning off the monitor or vDosPlus.
  14383. For example, to power off vDosPlus:
  14384. c:\> reboot /p
  14385. Options
  14386. !INDENT 5 5 0 5
  14387. /C: (Cold) Do a "cold" reboot. This option does not work in vDosPlus.
  14388. !INDENT 5 5 0 5
  14389. /M: (Monitor off) Shut off the display, if the system has a VESA
  14390. BIOS and VESA Display Power Management Signalling is supported. The
  14391. monitor is turned back on when a typematic key is pressed. Like /S,
  14392. this option does not actually reboot.
  14393. !INDENT 5 5 5 5
  14394. If the current video mode is not supported by the VESA BIOS, it may
  14395. switch the display to a supported mode (usually a text mode) before
  14396. it turns the monitor off.
  14397. !INDENT 5 5 0 5
  14398. /P: (Power off) Turn off vDosPlus using the APM functions.
  14399. !INDENT 5 5 0 5
  14400. /S: (Suspend) Enter suspend state, if the system has APM version
  14401. 1.1 or newer. vDosPlus lost focus when it enters this state. Like /M,
  14402. this option does not actually reboot.
  14403. !INDENT 5 5 0 5
  14404. /V: (Verify) Prompt for confirmation (Y or N) before rebooting or
  14405. changing the power state.
  14406. !INDENT 0
  14407. ;---------------------------------------------------------------------------
  14408. !TOPIC 657 REM
  14409. !TTY
  14410. Purpose: Put a comment in a batch file.
  14411. Format: REM [comment]
  14412. comment: The text to include in the batch file.
  14413. !TTY
  14414. Usage
  14415. The REM command lets you place a remark or comment in a batch file. Batch
  14416. file comments are useful for documenting the purpose of a batch file and
  14417. the procedures you have used. For example:
  14418. rem This batch file provides a menu-based utility system.
  14419. rem Clear the screen and get selection
  14420. cls
  14421. REM must be followed by a space or tab character and then your
  14422. comment. Comments can be up to 511 characters long. 4DOS will normally
  14423. ignore everything on the line after the REM command, including quote
  14424. characters, redirection symbols, and other commands.
  14425. If ECHO is ON, the comment is displayed. Otherwise, it is ignored. If ECHO
  14426. is ON and you don't want to display the line, preface the REM command with an
  14427. at sign [@].
  14428. You can also place a comment in a batch file by starting the comment line
  14429. with two colons [::]. In essence this creates a batch file "label"
  14430. without a valid label name. Such comments are processed slightly faster than
  14431. those entered with REM, because they do not require 4DOS to
  14432. handle a command.
  14433. You can use REM to create a zero-byte file if you use a redirection symbol
  14434. after the REM command. For example, to create the zero-byte file C:\FOO:
  14435. c:\> rem > foo
  14436. (This capability is included for compatibility with COMMAND.COM. A simpler
  14437. method for creating a zero-byte file with 4DOS is to use >filename as a
  14438. command, with no actual command before the [>] redirection character.)
  14439. ;---------------------------------------------------------------------------
  14440. !TOPIC 658 REN
  14441. !TTY
  14442. Purpose: Rename files or subdirectories.
  14443. Format: REN [/A:[[+|-]rhsad] /E /I"text" /N /P /Q /S /T][@file]
  14444. old_name... new_name
  14445. or
  14446. RENAME [/A:[[+|-]rhsad] /E /I"text" /N /P /Q /S /T][@file]
  14447. old_name... new_name
  14448. old_name: Original name of the file(s) or subdirectory.
  14449. new_name: New name to use, or new path on the same drive.
  14450. @file: A text file containing the names of the source files
  14451. to rename, one per line (see 057@file lists for
  14452. details).
  14453. /A: (Attribute select) /P(rompt)
  14454. /E (no error messages) /Q(uiet)
  14455. /I (match descriptions) /S(ubdirectory)
  14456. /N(othing) /T(otal)
  14457. !TTY
  14458. See also: 606COPY and 646MOVE.
  14459. File Selection
  14460. Supports extended 073wildcards, 074ranges, 079multiple file
  14461. names, and 080include lists.
  14462. Use wildcards with caution on LFN volumes; see 081LFN File Searches
  14463. for details.
  14464. Usage
  14465. REN and RENAME are synonyms. You may use either one.
  14466. REN lets you change the name of a file or a subdirectory, or move one or
  14467. more files to a new subdirectory on the same drive. (If you want to move
  14468. files to a different drive, use MOVE.)
  14469. In its simplest form, you give REN the old_name of an existing file or
  14470. subdirectory and then a new_name. The new_name must not already exist --
  14471. you can't give two files the same name (unless they are in different
  14472. directories). The first example renames the file MEMO.TXT to MEM.TXT. The
  14473. second example changes the name of the \WORD directory to \WP:
  14474. c:\> rename memo.txt mem.txt
  14475. c:\> rename \word \wp
  14476. You must quote any file names which contain whitespace or special
  14477. characters. See 945File Names for additional details.
  14478. You can also use REN to rename a group of files that you specify with
  14479. wildcards, as multiple files, or in an include list. When you do, the
  14480. new_name must use one or more wildcards to show what part of each filename
  14481. to change. Both of the next two examples change the extensions of multiple
  14482. files to .SAV:
  14483. c:\> ren file1.txt file2.dat file3.idx *.sav
  14484. c:\> ren *.txt *.sav
  14485. REN can move files to a different subdirectory on the same drive. When it
  14486. is used for this purpose, REN requires one or more filenames for the
  14487. old_name and a directory name for the new_name:
  14488. c:\> ren memo.txt \wp\memos\
  14489. c:\> ren oct.dat nov.dat \data\save\
  14490. The final backslash in the last two examples is optional. If you use it,
  14491. you force REN to recognize the last argument as the name of a directory,
  14492. not a file. The advantage of this approach is that if you accidentally
  14493. mistype the directory name, REN will report an error instead of renaming
  14494. your files in a way that you didn't intend.
  14495. REN can also move files to a new directory and change their name at the
  14496. same time if you specify both a path and file name for new_name. In this
  14497. example, the files are renamed with an extension of .SAV as they are moved
  14498. to a new directory:
  14499. c:\> ren *.dat \data\save\*.sav
  14500. If you use REN to rename a directory, the new_name must normally be
  14501. specified explicitly, and cannot contain wildcards. You can
  14502. override this restriction with /S. When you rename a directory
  14503. the 048extended directory search database will be automatically
  14504. updated to reflect the change.
  14505. REN does not change a file's attributes. The new_name file(s) will have
  14506. the same attributes as old_name.
  14507. Options
  14508. !INDENT 5 5 0 5
  14509. /A:: (Attribute select) Rename only those files that have the
  14510. specified attribute(s) set. The colon [:] after /A is required.
  14511. !INDENT 5 5 5 5
  14512. Preceding an attribute letter with a hyphen [-] will select
  14513. files that do not have that attribute set. You can OR attributes
  14514. by preceding each attribute letter with a plus sign [+].
  14515. The attributes are:
  14516. R Read-only D subDirectory
  14517. H Hidden A Archive
  14518. S System
  14519. If no attributes are listed at all (e.g., REN /A: ...), REN will
  14520. rename all matching files (and subdirectories, if /S is specified or
  14521. wildcards are not used), including those with the hidden or system
  14522. attributes. If attributes are combined, all the specified attributes
  14523. must match for a file to be selected. For example, /A:RHS will select
  14524. only those files with all three attributes set.
  14525. !INDENT 5 5 0 5
  14526. /E: (No error messages) Suppress all non-fatal error messages,
  14527. such as "File not found." Fatal error messages, such as "Drive not
  14528. ready," will still be displayed. This option is most useful in batch
  14529. files.
  14530. /I"text": Select files by matching text in their
  14531. descriptions. The text can include 073wildcards and
  14532. extended wildcards. The search text must be enclosed in
  14533. quotation marks, and must follow the /I immediately, with no
  14534. intervening spaces. You can select all filenames that have a
  14535. description with /I"[?]*", or all filenames that do not have
  14536. a description with /I"[]".
  14537. /N: (Nothing) Do everything except actually rename the file(s). This
  14538. option is useful for testing what a REN command will
  14539. actually do.
  14540. /P: (Prompt) Prompt the user to confirm each rename operation. Your
  14541. options at the prompt are explained in detail under 045Page and File
  14542. Prompts.
  14543. /Q: (Quiet) Don't display filenames or the number of files renamed.
  14544. This option is most often used in batch files. See also /T.
  14545. /S: (Subdirectory) Normally, you can rename a subdirectory only if
  14546. you do not use any wildcards in the new_name. This prevents
  14547. subdirectories from being renamed inadvertently when a group
  14548. of files is being renamed with wildcards. /S will let
  14549. you rename a subdirectory even when you use wildcards. /S does not
  14550. cause REN to process files in the current directory and all
  14551. subdirectories as it does in some other file processing commands. To
  14552. rename files throughout a directory tree, use a 628GLOBAL REN.
  14553. /T: (Total) Don't display filenames as they are renamed, but report
  14554. the number of files renamed. See also /Q.
  14555. !INDENT 0
  14556. ;---------------------------------------------------------------------------
  14557. !TOPIC 659 RETURN
  14558. !TTY
  14559. Purpose: Return from a GOSUB (subroutine) in a batch file.
  14560. Format: RETURN [value]
  14561. value: The exit code (0 to 255) to return to 4DOS or to
  14562. the previous batch file.
  14563. !TTY
  14564. See also: 629GOSUB.
  14565. Usage
  14566. 4DOS allows subroutines in batch files.
  14567. A subroutine begins with a label (a colon followed by a word) and ends with
  14568. a RETURN command.
  14569. The subroutine is invoked with a GOSUB command from another part of the
  14570. batch file. When a RETURN command is encountered the subroutine
  14571. terminates, and execution of the batch file continues on the line following
  14572. the original GOSUB. If RETURN is encountered without a GOSUB, 4DOS will
  14573. display a "Missing GOSUB" error.
  14574. You cannot execute a RETURN from inside a 615DO loop.
  14575. The following batch file fragment calls a subroutine which displays the
  14576. files in the current directory:
  14577. echo Calling a subroutine
  14578. gosub subr1
  14579. echo Returned from the subroutine
  14580. quit
  14581. :subr1
  14582. dir /a/w
  14583. return
  14584. If you specify a value, RETURN will set the internal exit code to that
  14585. value. The exit code should be tested immediately upon return from the
  14586. subroutine and before it is reset by another command. For information on
  14587. exit codes from internal commands, see the 164_? variable.
  14588. ;---------------------------------------------------------------------------
  14589. !TOPIC 660 SCREEN
  14590. !TTY
  14591. Purpose: Position the cursor on the screen and optionally display a
  14592. message.
  14593. Format: SCREEN row column [text]
  14594. row: The new row location for the cursor.
  14595. column: The new column location for the cursor.
  14596. text: Optional text to display at the new cursor location.
  14597. !TTY
  14598. See also: 619ECHO, 661SCRPUT, 671TEXT, and 684VSCRPUT.
  14599. Usage
  14600. SCREEN allows you to create attractive screen displays in batch files. You
  14601. use it to specify where a message will appear on the screen. You can use
  14602. SCREEN to create menus and other similar displays. For example, the
  14603. following batch file fragment displays part of a menu:
  14604. @echo off ^ cls
  14605. screen 3 10 Select a number from 1 to 4:
  14606. screen 6 20 1 - Word Processing
  14607. screen 7 20 2 - Spreadsheet
  14608. ...
  14609. SCREEN does not change the screen colors. To display text in specific
  14610. colors, use SCRPUT or VSCRPUT. SCREEN always leaves the cursor at the end
  14611. of the displayed text.
  14612. The row and column values are zero-based, so on a standard 25 line by 80
  14613. column display, valid rows are 0 - 24 and valid columns are 0 - 79. You
  14614. can also specify the row and column as offsets from the current cursor
  14615. position. Begin the value with a plus sign [+] to move the cursor down
  14616. the specified number of rows or to the right the specified number of
  14617. columns, or with a minus sign [-] to move the cursor up or to the
  14618. left. This example prints a string 3 lines above the current position, in
  14619. absolute column 10:
  14620. screen -3 10 Hello, World!
  14621. If you specify 999 for the row, SCREEN will center the text
  14622. vertically on the display. If you specify 999 for the column,
  14623. SCREEN will center the text horizontally. This example prints a message at
  14624. the center of the display:
  14625. screen 999 999 Hello, World
  14626. SCREEN checks for a valid row and column, and displays a "Usage" error
  14627. message if either value is out of range.
  14628. ;---------------------------------------------------------------------------
  14629. !TOPIC 661 SCRPUT
  14630. !TTY
  14631. Purpose: Position text on the screen and display it in color.
  14632. Format: SCRPUT row col [BRIght] [BLInk] fg ON [BRIght] bg text
  14633. row: Starting row
  14634. col: Starting column
  14635. fg: Foreground character color
  14636. bg: Background character color
  14637. text: The text to display
  14638. !TTY
  14639. See also: 619ECHO, 660SCREEN, 671TEXT, and 684VSCRPUT.
  14640. Usage
  14641. SCRPUT allows you to create attractive screen displays in batch files. You
  14642. use it to specify where a message will appear on the screen and what colors
  14643. will be used to display the message text. You can use SCRPUT to create
  14644. menu displays, logos, etc.
  14645. SCRPUT works like SCREEN, but requires you to specify the display
  14646. colors. See 892Colors and Color Names for details about colors and notes
  14647. on the use of bright background colors.
  14648. The row and column values are zero-based, so on a standard 25 line by 80
  14649. column display, valid rows are 0 - 24 and valid columns are 0 - 79. SCRPUT
  14650. checks for a valid row and column, and displays a "Usage" error message if
  14651. either value is out of range.
  14652. You can also specify the row and column as offsets from the current cursor
  14653. position. Begin the value with a plus sign [+] to move down the specified
  14654. number of rows or to the right the specified number of columns, or with a
  14655. minus sign [-] to move up or to the left.
  14656. If you specify 999 for the row, SCRPUT will center the text vertically. If
  14657. you specify 999 for the column, SCRPUT will center the text horizontally.
  14658. SCRPUT normally does not move the cursor when it displays the text. However,
  14659. if you have set 572OutputBIOS to Yes in 4DOS.INI, SCRPUT will leave the
  14660. cursor at the end of the displayed text.
  14661. The following batch file fragment displays part of a menu, in color:
  14662. cls white on blue
  14663. scrput 3 10 bri whi on blu Select an option:
  14664. scrput 6 20 bri red on blu 1 - Word Processing
  14665. scrput 7 20 bri yel on blu 2 - Spreadsheet
  14666. ...
  14667. If you have an unusual display adapter which does not support the direct
  14668. video output used by SCRPUT, see the 572OutputBIOS directive.
  14669. ;---------------------------------------------------------------------------
  14670. !TOPIC 662 SELECT
  14671. !TTY
  14672. Purpose: Interactively select files for a command.
  14673. Format: SELECT [/1 /A[[:][+|-]rhsad] /C[HP] /D /E /H /I"text" /J /L
  14674. /O[[:][-]acdeginrsu] /T:acw /X /Z] [command] ... (files...)...
  14675. command: The command to execute with the selected files.
  14676. files: The files from which to select. File names may be
  14677. enclosed in either parentheses or square brackets.
  14678. The difference is explained in the usage text.
  14679. /1 (one selection) /J(ustify names)
  14680. /A: (Attribute select) /L(ower case)
  14681. /C[HP] (Compression) /O(rder)
  14682. /D(isable color) /T(ime)
  14683. /E (use upper case) /X (display short names)
  14684. /H(ide dots) /Z (use FAT format)
  14685. /I (match descriptions)
  14686. !TTY
  14687. File Selection
  14688. Supports extended 073wildcards, 074ranges, 079multiple file
  14689. names, and 080include lists. Ranges must appear immediately
  14690. after the SELECT keyword.
  14691. Use wildcards with caution on LFN volumes; see 081LFN File Searches for
  14692. details.
  14693. Usage
  14694. SELECT allows you to select files for internal and external commands by
  14695. using a full-screen "point and shoot" display. You can have SELECT execute
  14696. a command once for each file you select, or have it create a list of files
  14697. for a command to work with. The command can be an internal command, an
  14698. alias, an external command, or a batch file.
  14699. If you use parentheses around the files, SELECT executes the command once
  14700. for each file you have selected. During each execution, one of the
  14701. selected files is passed to the command as an argument. If you use square
  14702. brackets around files, the SELECTed files are combined into a single list,
  14703. separated by spaces. The command is then executed once with the entire
  14704. list presented part of its command-line arguments.
  14705. Using the SELECT File List
  14706. When you execute the SELECT command, the file list is displayed in a
  14707. full-screen format which includes a top-line status bar and shows the
  14708. command to be executed, the number of files marked, and the number of Kbytes
  14709. in those files.
  14710. SELECT supports the mouse for selecting and scrolling the list. You can also
  14711. use uses the cursor up, cursor down, PgUp, and PgDn keys to scroll through
  14712. the file list. You can also use character matching to find specific
  14713. files, just as you can in any 894popup window. While the file list is
  14714. displayed you can enter any of the following keys to select or unselect
  14715. files, display files, execute the command, or exit:
  14716. !INDENT 5 5 5 5
  14717. + or space: Select a file, or unselect a marked file.
  14718. -: Unselect a marked file.
  14719. *: Reverse all of the current marks (except those on
  14720. subdirectories). If no files have been marked you can use * to mark
  14721. all of the files.
  14722. /: Unselect all files.
  14723. Ctrl-L: View the current highlighted file with 640LIST. When
  14724. you exit from LIST, the SELECT screen will be restored.
  14725. Enter: Execute the command with the marked files, or with the
  14726. currently highlighted file if no files have been marked.
  14727. Esc: Skip the files in the current display and go on to the next
  14728. file specification inside the parentheses or brackets (if any).
  14729. Ctrl-C or Ctrl-Break: Cancel the current SELECT command entirely.
  14730. !INDENT 0
  14731. On FAT drives the file list is shown in standard FAT directory format, with
  14732. names at the left an descriptions at the right. On LFN drives the format is
  14733. similar but more space is allowed for the name, and the description is not
  14734. shown. In this format long names are truncated if they do not fit in the
  14735. allowable space. For a short-name format (including descriptions) on long
  14736. filename drives, use the /X and / or /Z switches.
  14737. When displaying descriptions in the short filename format, SELECT adds a
  14738. right arrow [] at the end of the line if the description is too
  14739. long to fit on the screen. This symbol will alert you to the existence of
  14740. additional description text. You can use the left and right arrow keys to
  14741. scroll the description area of the screen horizontally and view the
  14742. additional text.
  14743. You can display the filenames in color by using the 663SET command to
  14744. create an environment variable called 133COLORDIR, or using the
  14745. Commands page of the 648OPTION dialogs or a text editor to set the
  14746. 463ColorDir directive in your .INI file. If you do not use the COLORDIR
  14747. variable or the ColorDir directive, SELECT will use the default screen
  14748. colors for all files. See the discussion of color-coded directories under
  14749. 612DIR for more details. To disable directory color coding within
  14750. SELECT, use the /D option.
  14751. You can set the default colors used by SELECT on the Commands page of the
  14752. OPTION dialogs or with the 469SelectColors and 470SelectStatBarColors
  14753. directives in the .INI file. If SelectColors is not used, the SELECT
  14754. display will use the current default colors. If SelectStatBarColors is not
  14755. used, the status bar will use the reverse of the SELECT colors.
  14756. Creating SELECT Commands
  14757. In the simplest form of SELECT, you merely specify the command and then the
  14758. list of files from which you will make your selection(s). For example:
  14759. c:\> select copy (*.com *.exe) a:\
  14760. will let you select from among the .COM files on the current
  14761. drive, and will then invoke the COPY command to copy each file you select
  14762. to drive A:. After the .COM files are done, the operations will be repeated
  14763. for the .EXE files.
  14764. If you want to select from a list of all the .COM and .EXE files mixed
  14765. together, create an 080include list inside the parentheses by
  14766. inserting a semicolon:
  14767. c:\> select copy (*.com;*.exe) a:\
  14768. Finally, if you want the SELECT command to send a single list of files to
  14769. COPY, instead of invoking COPY once for each file you select, put the file
  14770. names in square brackets instead of parentheses:
  14771. c:\> select copy [*.com;*.exe] a:\
  14772. If you use brackets, you have to be sure that the resulting command (the
  14773. word COPY, the list of files, and the destination drive in this example) does
  14774. not exceed the command line length limit: 511 characters for internal
  14775. commands or 126 characters for external commands. The current line length is
  14776. displayed by SELECT while you are marking files to help you to conform to
  14777. these limits.
  14778. The parentheses or brackets enclosing the file name(s) can appear anywhere
  14779. within the command; SELECT assumes that the first set of parentheses or
  14780. brackets it finds is the one containing the list of files from which you
  14781. wish to make your selection.
  14782. You must quote any file names inside the parentheses which contain
  14783. whitespace or special characters. See 945File Names for additional
  14784. details. For example, to copy selected files from the "Program Files"
  14785. directory to the E:\SAVE directory:
  14786. c:\> select copy ("Program Files\*.*") e:\save\
  14787. File names passed to the command will be quoted automatically if
  14788. they contain whitespace or special characters.
  14789. The list of files from which you wish to select can be further refined by
  14790. using 074date, time, size, and 078file exclusion ranges. The range(s)
  14791. must be placed immediately after the word SELECT. If the command is an
  14792. internal command that supports ranges, an independent range can also be used
  14793. in the command itself.
  14794. You cannot use command grouping to make SELECT execute several commands,
  14795. because SELECT will assume that the parentheses are marking the list of files
  14796. from which to select, and will display an error message or give incorrect
  14797. results if you try to use parentheses for command grouping instead. (You
  14798. can use a SELECT command inside command grouping parentheses, you just
  14799. can't use command grouping to specify a group of commands for SELECT to
  14800. execute.)
  14801. Advanced Topics
  14802. If you don't specify a command, the selected filename(s) will become the
  14803. command. For example, this command defines an alias called UTILS that
  14804. selects from the executable files in the directory C:\UTIL, and then
  14805. executes them in the order marked:
  14806. c:\> alias utils select (c:\util\*.com;*.exe;*.btm;*.bat)
  14807. If you want to use 035filename completion to enter the filenames
  14808. inside the parentheses, type a space after the opening
  14809. parenthesis. Otherwise, the command-line editor will treat the open
  14810. parenthesis as the first character of the filename.
  14811. When displaying descriptions, SELECT adds a right arrow [] at the end of
  14812. the line if the description is too long to fit on the screen. This symbol
  14813. will alert you to the existence of additional description text. You can
  14814. use the left and right arrow keys to scroll the screen horizontally and view
  14815. the additional text.
  14816. With the /I option, you can select files based on their
  14817. descriptions. SELECT will display files if their description matches the
  14818. text after the /I switch. The search is not case sensitive. You can
  14819. use wildcards and extended wildcards as part of the text.
  14820. When sorting file names and extensions for the SELECT display, 4DOS
  14821. normally assumes that sequences of digits should be sorted numerically (for
  14822. example, the file DRAW2 would come before DRAW03 because 2 is numerically
  14823. smaller than 03), rather than strictly alphabetically (where DRAW2 would
  14824. come second because "2" comes after "0"). You can defeat this behavior and
  14825. force a strict alphabetic sort with the /O:a option.
  14826. SELECT normally writes text directly to the screen. If you have an unusual
  14827. display adapter which does not support direct video output, see the
  14828. 572OutputBIOS directive.
  14829. If you receive a stack overflow error when using SELECT in complex,
  14830. nested command sequences, see the notes under the 574StackSize
  14831. directive.
  14832. Options
  14833. !INDENT 5 5 0 5
  14834. /1: (1 selection) Limits selection to a single file.
  14835. /A: (Attribute select) Display only those files that have the
  14836. specified attribute(s) set. The colon [:] after /A is optional.
  14837. !INDENT 5 5 5 5
  14838. Preceding an attribute letter with a hyphen [-] will select
  14839. files that do not have that attribute set. You can OR attributes
  14840. by preceding each attribute letter with a plus sign [+].
  14841. The attributes are:
  14842. R Read-only D subDirectory
  14843. H Hidden A Archive
  14844. S System
  14845. If no attributes are listed at all (e.g., SELECT /A ...),
  14846. SELECT will display all files and subdirectories
  14847. including hidden and system files. If attributes are
  14848. combined, all the specified attributes must match for a file
  14849. to be included in the listing. For example, /A:RHS will
  14850. display only those files with all three attributes set.
  14851. !INDENT 5 5 0 5
  14852. /C: (Compression) Display per-file and total compression ratios
  14853. on compressed drives. The compression ratio is displayed instead
  14854. of the file description. The ratio is left blank for directories
  14855. and files with a length of 0 bytes, and for files on non-compressed
  14856. drives. The compression ratios will not be visible on LFN drives
  14857. unless you use /Z to switch to the traditional short filename
  14858. format.
  14859. !INDENT 5 5 5 5
  14860. Using /CH displays compression ratios like /C, but
  14861. bases the calculation on the host drive's cluster size. This
  14862. gives a more accurate picture of the space saved
  14863. through compression than is given by /C.
  14864. If /CP is used instead of /C, the compression is
  14865. displayed as a percentage instead of a ratio. If /CHP
  14866. is used instead of /CH, the host compression is
  14867. displayed as a percentage. The /CHP option must be
  14868. entered as shown; you can not use /CPH.
  14869. See the 612DIR /C documentation for more details on how compression
  14870. ratios are calculated.
  14871. !INDENT 5 5 0 5
  14872. /D: (Disable color coding) Temporarily turn off directory color
  14873. coding within SELECT.
  14874. /E: (Use upper case) Display filenames in the upper
  14875. case; also see 664SETDOS /U and the 446UpperCase
  14876. directive in 4DOS.INI.
  14877. /H: (Hide dots) Suppress the display of the "." and ".." directories.
  14878. /I"text": Display filenames by matching text in their
  14879. descriptions. The text can include 073wildcards and
  14880. extended wildcards. The search text must be enclosed in
  14881. quotation marks, and must follow the /I immediately, with no
  14882. intervening spaces. You can select all filenames that have a
  14883. description with /I"[?]*", or all filenames that do not have
  14884. a description with /I"[]".
  14885. /J: (Justify names) Justify (align) filename extensions and display
  14886. them in the traditional format.
  14887. /L: (Lower case) Display file and directory names in lower case;
  14888. also see 664SETDOS /U and the 446UpperCase directive in 4DOS.INI.
  14889. /O: (Order) Set the sort order for the files. The order can be any
  14890. combination of the following options:
  14891. !INDENT 5 5 5 5
  14892. - Reverse the sort order for the next option.
  14893. a Sort names and extensions in standard ASCII order, rather
  14894. than sorting numerically when digits are included in the
  14895. name or extension.
  14896. c Sort by compression ratio (the least compressed file in
  14897. the list will be displayed first). If /O:c is used with
  14898. /CH or /CHP, the sort will be based on the host-drive
  14899. compression ratios. For information on supported
  14900. compression systems, see /C above.
  14901. d Sort by date and time (oldest first).
  14902. e Sort by extension.
  14903. g Group subdirectories first, then files.
  14904. i Sort by the file description (ignored if /C or /O:c is
  14905. also used).
  14906. n Sort by filename (this is the default).
  14907. r Reverse the sort order for all options.
  14908. s Sort by size.
  14909. u Unsorted.
  14910. !INDENT 5 5 0 5
  14911. /T:acw: (Time display) Specify which of the date and time fields on
  14912. an LFN drive should be displayed and used for sorting:
  14913. !INDENT 5 5 0 5
  14914. a last access date and time (access time is not saved
  14915. on LFN volumes).
  14916. c creation date and time.
  14917. w last write date and time (this is the default).
  14918. !INDENT 5 5 0 5
  14919. /X: (Display short names): Display short filenames, in the
  14920. traditional FAT format (like /Z), on LFN drives
  14921. /Z: (Use FAT format) Display filenames on an LFN drive in the
  14922. traditional FAT format, with the short filename at the left and the
  14923. description at the right.
  14924. !INDENT 0
  14925. ;---------------------------------------------------------------------------
  14926. !TOPIC 663 SET
  14927. !TTY
  14928. Purpose: Display, create, modify, or delete environment variables.
  14929. Format: SET [/A /E /M /P /R file...] [name[=][value]]
  14930. file: One or more files containing variable definitions.
  14931. name: The name of the environment variable to define or modify.
  14932. value: The new value for the variable.
  14933. /A(rithmetic) /P(ause)
  14934. /E(nvironment) /R(ead from file)
  14935. /M(aster)
  14936. !TTY
  14937. See also: 622ESET and 680UNSET.
  14938. Usage
  14939. Every program and command inherits an 131environment, which is a list
  14940. of variable names, each of which is followed by an equal sign and some text.
  14941. Many programs use entries in the environment to modify their own actions.
  14942. If you simply type the SET command with no options or arguments, it will
  14943. display all the names and values currently stored in the environment.
  14944. Typically, you will see an entry called 134COMSPEC, an entry called
  14945. 138PATH, an entry called CMDLINE, and whatever other environment
  14946. variables you and your programs have established:
  14947. set
  14948. COMSPEC=C:\COMMAND.COM
  14949. PATH=C:\;C:\DOS;C:\UTIL
  14950. CMDLINE=E:\UTIL\MAPMEM.EXE
  14951. To add a variable to the environment, type SET, a space, the variable name,
  14952. an equal sign, and the text:
  14953. set mine=c:\finance\myfiles
  14954. The variable name is converted to upper case, the text after the equal sign
  14955. will be left just as you entered it. If the variable already exists, its
  14956. value will be replaced with the new text that you entered.
  14957. Normally you should not put a space on either side of the equal sign. A
  14958. space before the equal sign will become part of the name; a space after the
  14959. equal sign will become part of the value.
  14960. vDosPlus has a feature to access environment variables of Windows. Values
  14961. enclosed in double %%'s will be converted to the value of that Windows
  14962. variable if set. For instance:
  14963. set mine=%%mine%%
  14964. vDosPlus sets two DOS environment variables by default:
  14965. set win_username=%%username%%
  14966. set win_vdos=%%vdos%% (defaulting to not_set)
  14967. If you use SET to create a variable with the same name as one of the 4DOS
  14968. 161internal variables, you will disable the internal variable. If
  14969. you later execute a batch file or alias that depends on that internal
  14970. variable, it may not operate correctly.
  14971. To display the contents of a variable, type SET plus the variable name:
  14972. set mine
  14973. If the name contains one or more 073wildcards, SET will display all
  14974. matching environment variables.
  14975. You can edit environment variables with the 622ESET command. To remove
  14976. variables from the environment, use 680UNSET, or type SET plus a
  14977. variable name and an equal sign:
  14978. set mine=
  14979. The variable name is limited to a maximum of 80 characters, the name
  14980. and value together cannot be longer than 511 characters.
  14981. Unless you use /M, SET only affects the environment of the current
  14982. command processor and the programs it executes. If you EXIT to a parent
  14983. command processor, the original environment will be unchanged.
  14984. The size of the environment can be specified on the Startup page of the
  14985. 648OPTION dialogs, with the 377Environment and 378EnvFree
  14986. directives in 4DOS.INI, or with the /E: 352startup option.
  14987. Options
  14988. !INDENT 5 5 0 5
  14989. /A: (Arithmetic) Evaluate the value as an arithmetic expression;
  14990. store the result in the specified variable and display it to standard
  14991. output. SET /A supports the same operators as the 263@EVAL
  14992. function.
  14993. !INDENT 5 5 5 5
  14994. Warnings: SET /A was never an officially documented or sanctioned
  14995. option. Use it at your own risk. While this feature was apparently
  14996. introduced to provide some compatibility with Microsoft's CMD.EXE,
  14997. be aware that 4DOS's SET /A differs from CMD's in features and
  14998. syntax. Using SET /A in batch files to be run by either shell will
  14999. require careful study: use only those operators supported by both;
  15000. remember to space around all operators; 131variables in the
  15001. expression require both leading and trailing percent signs; use
  15002. 118double quotes around the expression if it contains troublesome
  15003. characters like the 041caret, ampersand or 052vertical bar.
  15004. Unless you need it for CMD.EXE compatibility, the documented 263@EVAL
  15005. function should be used instead of SET /A.
  15006. !INDENT 5 5 0 5
  15007. /E: (Environment) When used together with /M, set both the master and
  15008. local environments. Note: SET /E /M does not propagate to any other
  15009. environment instances. For example, if you do it in a 4th level 4DOS,
  15010. the top level (master) and the current (local) environments are modified,
  15011. but the level 2 and level 3 environments are not.
  15012. /M: (Master) Display or modify the master environment rather than
  15013. the local environment. This option is only useful in secondary
  15014. shells.
  15015. /P: (Pause) Wait for a key to be pressed after each screen page before
  15016. continuing the display. Your options at the prompt are
  15017. explained in detail under 045Page and File Prompts.
  15018. /R: (Read) Read environment variables from a file. This is much
  15019. faster than loading variables from a batch file with
  15020. multiple SET commands. Each entry in the file must fit
  15021. within the 511-byte command line length limit for 4DOS. The
  15022. file is in the same format as the SET display (i.e., name=value), so
  15023. SET /R can accept as input a file generated by redirecting SET
  15024. output. For example, the following commands will save the
  15025. environment variables to a file, and then reload them from
  15026. that file:
  15027. !INDENT 5 5 5 5
  15028. set > varlist
  15029. set /r varlist
  15030. You can load variables from multiple files by listing the
  15031. filenames individually after the /R. You can add
  15032. comments to a variable file by starting the comment line
  15033. with a colon [:].
  15034. If you are creating a SET /R file by hand, and need to
  15035. create an entry that spans multiple lines in the file, you
  15036. can do so by terminating each line, except the last, with an
  15037. 086escape character. However, you cannot use this
  15038. method to exceed the command line length limit.
  15039. !INDENT 0
  15040. ;---------------------------------------------------------------------------
  15041. !TOPIC 664 SETDOS
  15042. !TTY
  15043. Purpose: Display or set the 4DOS configuration.
  15044. Format: SETDOS [/A? /B? /C? /D? /E? /Fn.n /G?? /I+|- command /L? /M? /N?
  15045. /P? /R? /S?:? /U? /V? /X[+|-]n /Y?]
  15046. /A(NSI) /N(o clobber)
  15047. /B(right background) /P(arameter character)
  15048. /C(ompound) /R(ows)
  15049. /D(escriptions) /S(hape of cursor)
  15050. /E(scape character) /U(pper case)
  15051. /F(ormat for @EVAL) /V(erbose)
  15052. /G (numeric separators) /W (switch character)
  15053. /I(nternal commands) /X (expansion, special characters)
  15054. /L(ine) /Y (debug batch files)
  15055. /M(ode for editing)
  15056. !TTY
  15057. Usage
  15058. SETDOS allows you to customize certain aspects of 4DOS to suit your
  15059. personal tastes or the configuration of your system. Each of these options
  15060. is described below.
  15061. You can display the value of all SETDOS options by entering the SETDOS
  15062. command with no parameters.
  15063. Most of the SETDOS options can be initialized when 4DOS executes the
  15064. 410configuration directives in 4DOS.INI, and can also be set with on
  15065. the Command Line, Windows, Options 1, or Options 2 pages of the
  15066. 648OPTION dialogs. The name of the corresponding directive is listed
  15067. with each option below; if none is listed, that option cannot be set with
  15068. OPTION or from 4DOS.INI. You can also define the SETDOS options in your
  15069. AUTOEXEC.BAT, 4START, or other startup file (see 109Automatic Batch
  15070. Files), in aliases, or at the command line.
  15071. Secondary shells automatically inherit most configuration settings
  15072. currently in effect in the previous shell. If values have been changed by
  15073. SETDOS since 4DOS started, the new values will be passed to the secondary
  15074. shell.
  15075. SETDOS /I settings are not inherited by secondary shells. If you want to
  15076. use SETDOS /I- to disable commands in all shells, place the SETDOS
  15077. command(s) in your 4START file, which is executed when any shell starts.
  15078. Options
  15079. !INDENT 5 5 0 5
  15080. /A: (ANSI) This option determines whether 4DOS will attempt to
  15081. use ANSI escape sequences for the 604CLS and
  15082. 605COLOR commands. 4DOS normally determines this
  15083. itself, but if you are using a non-standard ANSI driver or
  15084. your loading sequence is unusual, you may need to explicitly
  15085. inform 4DOS. /A0 allows 4DOS to determine automatically
  15086. whether an ANSI driver is installed (the default). /A1
  15087. forces 4DOS to assume an ANSI driver is installed. /A2
  15088. forces 4DOS to assume an ANSI driver is not installed. See the 412
  15089. ANSI directive.
  15090. /B: (Bright background) This option determines whether 4DOS
  15091. configures your video adapter for blinking text (/B0,
  15092. the default) or bright background colors (/B1), or leave the video
  15093. bright / blink configuration unchanged (/B2). See 892Colors and
  15094. Color Names for a detailed discussion of this option. Also see the
  15095. 461BrightBG directive.
  15096. /C: (Compound character) This option sets the character used
  15097. for separating 041multiple commands on the same line. The
  15098. default is the caret [^]. You cannot use any of the redirection
  15099. characters [<>|], or the blank, tab, comma, or equal sign as the
  15100. command separator. The command separator is saved by 665SETLOCAL
  15101. and restored by 621ENDLOCAL. This example changes the separator to
  15102. a tilde [~]:
  15103. !INDENT 5 5 5 5
  15104. c:\> setdos /c~
  15105. (You can specify either the character itself, or its ASCII code as a
  15106. decimal number, or a hexadecimal number preceded by 0x.) If you want
  15107. to share batch files or aliases between 4DOS and 0204NT or 021Take
  15108. Command, see the 166%+ variable, which retrieves the current command
  15109. separator, and 054Special Character Compatibility for details on using
  15110. compatible command separators for all the products you use. Also see the
  15111. 418CommandSep directive.
  15112. !INDENT 5 5 0 5
  15113. /D: (Descriptions) This option controls whether file
  15114. processing commands like 606COPY, 609DEL,
  15115. 646MOVE, and 658REN process file descriptions
  15116. along with the files they belong to. /D1 turns
  15117. description processing on, which is the default. /D0
  15118. turns description processing off. Also see the
  15119. 424Descriptions directive.
  15120. !INDENT 5 5 5 5
  15121. You can also use /D to set the name of the hidden file in each
  15122. directory that contains file descriptions. To do so, follow
  15123. /D with the filename in quotes:
  15124. c:\> setdos /d"files.bbs"
  15125. Use this option with caution because changing the name from the
  15126. default will make it difficult to transfer file descriptions to another
  15127. system. This option is provided for bulletin board system
  15128. operators and others who have special needs.
  15129. Also see the 423DescriptionName directive.
  15130. !INDENT 5 5 0 5
  15131. /E: (Escape character) This option sets the character used to
  15132. suppress the normal meaning of the following character. Any
  15133. character following the 086escape character will be
  15134. passed unmodified to the command. The default escape
  15135. character is Ctrl-X (ASCII 24, which appears on screen as an
  15136. up-arrow []). (You can specify either the character itself, or
  15137. its ASCII code as a decimal number, or a hexadecimal number preceded by
  15138. 0x.) You cannot use any of the redirection characters [<>|] or the
  15139. blank, tab, comma, or equal sign as the escape character. The escape
  15140. character is saved by 665SETLOCAL and restored by 621ENDLOCAL.
  15141. Certain characters (b, c, e, f, k, n, q, r, s, and t)
  15142. have special meanings when immediately preceded by the
  15143. escape character.
  15144. !INDENT 5 5 5 5
  15145. If you want to share batch files or aliases between 4DOS and
  15146. 4OS2, 0204NT, or Take Command, see the 165%= variable,
  15147. which retrieves the current escape character, and 054Special
  15148. Character Compatibility for details on using compatible escape
  15149. characters for all the products you use. Also see the 426EscapeChar
  15150. directive.
  15151. !INDENT 5 5 0 5
  15152. /F: (Format for @EVAL) This option lets
  15153. you set default decimal precision for the @EVAL variable function. The
  15154. maximum precision is 20 digits to the left of the decimal point and up
  15155. to 10 digits to the right of the decimal point. Also see the
  15156. 427EvalMax and 428EvalMin directives.
  15157. !INDENT 5 5 5 5
  15158. The general form of this option is /Fx.y, where the x value
  15159. sets the minimum number of digits to the right of the decimal
  15160. point and the y value sets the maximum number of digits. You
  15161. can use =x,y instead of =x.y if the comma is your decimal
  15162. separator. Both values can range from 0 to 10. You can
  15163. specify either or both values: /F2.5, /F2, and /F.5 are
  15164. all valid entries. If x is greater than y, it is ignored; if
  15165. only x is specified, y is set to the same value (e.g. /F2 is
  15166. equivalent to /F2.2). See the 263@EVAL function if you
  15167. want to set the precision for a single computation.
  15168. !INDENT 5 5 0 5
  15169. /G: (Numeric separators) This option sets the decimal and thousands
  15170. separator characters. The format is /Gxy where "x" is the new
  15171. decimal separator and "y" is the
  15172. new thousands separator. Both characters must be included. The only
  15173. valid settings are /G., (period is the decimal separator,
  15174. comma is the thousands separator); /G,. (the reverse); or
  15175. /G0 to remove any custom setting and use the default
  15176. separators associated with your current country code (this is the
  15177. default).
  15178. !INDENT 5 5 5 5
  15179. The decimal separator is used for 263@EVAL, numeric 633IF and
  15180. 634IFF tests, version numbers, and other similar uses. The
  15181. thousands separator is used for numeric output, and is skipped when
  15182. performing calculations in @EVAL. Also see the 421DecimalChar and
  15183. 445ThousandsChar directives.
  15184. !INDENT 5 5 0 5
  15185. /I: (Internal) This option allows you to disable or enable
  15186. internal commands. To disable a command, precede the
  15187. command name with a minus [-]. To re-enable a command,
  15188. precede it with a plus [+]. For example, to disable the
  15189. internal LIST command to force 4DOS to use an external
  15190. command:
  15191. !INDENT 5 5 5 5
  15192. c:\> setdos /i-list
  15193. To re-enable all disabled commands use /I*.
  15194. !INDENT 5 5 0 5
  15195. /L: (Line) This option controls how 4DOS gets its input from
  15196. the command line. /L0 tells 4DOS to use character input
  15197. (the default). /L1 tells it to use line input (like
  15198. COMMAND.COM and CMD.EXE). /L1 will disable command-line
  15199. editing, history recall, filename completion, and the
  15200. directory history window. It should only be used if it is
  15201. needed for compatibility with a specific program. If you
  15202. have a program that requires line input, you can use the
  15203. following line in an alias or batch file to change the line
  15204. input option just for that single program:
  15205. !INDENT 5 5 5 5
  15206. setdos /L1 ^ program %& ^ setdos /L0
  15207. See 751Compatibility for information on programs which require
  15208. this option. Also see the 436LineInput directive.
  15209. !INDENT 5 5 0 5
  15210. /M: (Mode) This option controls the initial line editing mode. To
  15211. start in overstrike mode at the beginning of each command line, use
  15212. /M0 (the default). To start in insert mode, use /M1. If any
  15213. other digit is used, 4DOS will not force either editing mode when the
  15214. prompt is displayed; the editing mode last used will be retained. Also
  15215. see the 425EditMode directive.
  15216. /N: (No clobber) This option controls output
  15217. 051redirection. /N0 means existing files will be
  15218. overwritten by output redirection (with >) and that
  15219. appending (with >>) does not require the file to exist
  15220. already. This is the default. /N1 means existing files
  15221. may not be overwritten by output redirection, and that when
  15222. appending the output file must exist. A /N1 setting can
  15223. be overridden with the [!] character. If you use
  15224. /N1, you may have problems with a few unusual programs
  15225. that shell out to run a command with redirection, and expect
  15226. to be able to overwrite an existing file. Also see the
  15227. 438NoClobber directive and the table of all 055output redirection
  15228. operators.
  15229. /P: (Parameter character) This option sets the character used
  15230. after a percent sign to specify all or all remaining
  15231. command-line arguments in a 102batch file, 101alias, or
  15232. 696user-defined function (e.g., %& or %n&). The default is the
  15233. ampersand [&]. (You can specify either the character itself, or its
  15234. ASCII code as a decimal number, or a hexadecimal number preceded by
  15235. 0x.) The parameter character is saved by 665SETLOCAL and restored
  15236. by 621ENDLOCAL.
  15237. !INDENT 5 5 5 5
  15238. If you want to share batch files or aliases between 4DOS and
  15239. 0204NT or Take Command, see 054Special Character Compatibility
  15240. for details on selecting compatible parameter characters for all the
  15241. products you use. Also see the 439ParameterChar directive.
  15242. !INDENT 5 5 0 5
  15243. /R: (Rows) This option sets the number of screen rows used by
  15244. the video display. Normally 4DOS detects the screen size,
  15245. but if you have a non-standard display you may need to set
  15246. it explicitly. This option does not affect screen scrolling
  15247. (that is controlled by your video driver, the BIOS, or
  15248. ANSI.SYS). It also does not set the screen size; it is used only to
  15249. specify the screen height for LIST, SELECT, paged output options (i.e.,
  15250. TYPE /P), and error checking in screen output commands. Also see the
  15251. 443ScreenRows directive.
  15252. /S: (Shape) This option sets the cursor shape. The format is
  15253. /So:i where o is the cursor size for overstrike mode, i the
  15254. cursor size for insert mode. The size is entered as a percentage of
  15255. the total character height. The default values are 10:100 (a 10%
  15256. underscore cursor for overstrike mode, and a 100% block cursor for insert
  15257. mode). Because of the way video BIOSes and drivers remap the cursor
  15258. shape, you may not get a smooth progression in the cursor size from 0%
  15259. - 100%. To disable the cursor, enter /S0:0.
  15260. !INDENT 5 5 5 5
  15261. If either value is -1, 4DOS will not attempt to
  15262. modify the cursor shape at all. You can use this feature to give
  15263. another program full control of the cursor shape. You can retrieve the
  15264. current cursor shape values with the 178_CI and 179_CO
  15265. internal variables.
  15266. Also see the 420CursorOver and 419CursorIns directives.
  15267. !INDENT 5 5 0 5
  15268. /U: (Upper) This option controls the default case (upper or
  15269. lower) for file and directory names displayed by internal commands
  15270. like COPY and DIR. /U0 displays file names in lower case (the
  15271. default). /U1 displays file names in the traditional upper
  15272. case. Also see the 446UpperCase directive.
  15273. !INDENT 5 5 5 5
  15274. The /U setting is ignored for filenames on LFN drives. Names on such
  15275. drives are always displayed in the case in which they are stored. See
  15276. 945File Names for additional details.
  15277. !INDENT 5 5 0 5
  15278. /V: (Verbose) This option controls the default for command
  15279. echoing in batch files. /V0 disables echoing of batch
  15280. file commands unless 619ECHO is explicitly set ON. /V1, the
  15281. default setting, enables echoing of batch file
  15282. commands unless ECHO is explicitly set OFF. Also see
  15283. 104Echoing in Batch Files.
  15284. !INDENT 5 5 5 5
  15285. /V2 forces echoing of all batch file commands, even if
  15286. ECHO is set OFF or the line begins with an "@". This allows
  15287. you to turn echoing on for a batch file without editing the
  15288. batch file and removing the ECHO OFF command(s) within it. /V2 is
  15289. intended for debugging, and can be set with
  15290. SETDOS, but not with the 648OPTION command or the 414BatchEcho
  15291. directive in 4DOS.INI. For more information see
  15292. 112Debugging Batch Files.
  15293. !INDENT 5 5 0 5
  15294. /W: (Switch character) This option sets the DOS switch character
  15295. (normally a slash [/]). It will not work in Datalight ROM-DOS.
  15296. The DOS switch character setting may be ignored by application programs.
  15297. Note that setting the switch character to anything but a slash [/]
  15298. will probably break all of your existing batch files and aliases!
  15299. /X[+|-]n: (Expansion and special characters) This option enables
  15300. and disables alias and environment variable expansion, and
  15301. controls whether special characters have their usual meaning
  15302. or are treated as text. It is most often used in batch
  15303. files to process text strings which may contain special
  15304. characters.
  15305. !INDENT 5 5 5 5
  15306. The features enabled or disabled by /X are numbered. All
  15307. features are enabled when 4DOS starts, and you can
  15308. re-enable all features at any time by using /X0. To
  15309. disable a particular feature, use /X-n, where n is
  15310. the feature number from the list below. To re-enable the
  15311. feature, use /X+n. To enable or disable multiple
  15312. individual features, list their numbers in sequence after
  15313. the + or - (e.g. /X-345 to disable features 3,
  15314. 4, and 5).
  15315. The features are:
  15316. 1 All alias expansion.
  15317. 2 Nested alias expansion only.
  15318. 3 All variable expansion (includes environment
  15319. variables, batch file parameters, and alias
  15320. parameters).
  15321. 4 Nested variable expansion only.
  15322. 5 Multiple commands, conditional commands, and
  15323. piping (affects the command separator, ||,
  15324. &&, |, and |&).
  15325. 6 Redirection (affects < , >, >&, >&>, etc.).
  15326. 7 Quoting (affects back-quotes [`], double
  15327. quotes ["], and square brackets []).
  15328. 8 Escape character.
  15329. 9 User-defined functions.
  15330. If nested alias expansion is disabled, the first alias of a
  15331. command is expanded but any aliases it invokes are not
  15332. expanded. If nested variable expansion is disabled, each
  15333. variable is expanded once, but variables containing the
  15334. names of other variables are not expanded further.
  15335. For example, to disable all features except alias expansion
  15336. while you are processing a text file containing special
  15337. characters:
  15338. setdos /x-35678
  15339. ... [perform text processing here]
  15340. setdos /x0
  15341. !INDENT 5 5 0 5
  15342. /Y: (Debug batch file) /Y1 enables the built-in
  15343. batch file debugger. The debuggger allows you to "single-step" through
  15344. a batch file line by line, with the file displayed in a popup window as
  15345. it executes. For complete details on using the debugger see
  15346. 112Debugging Batch Files (this topic also covers additional
  15347. debugging techniques which do not require stepping through each line
  15348. individually).
  15349. !INDENT 5 5 5 5
  15350. To start the debugger, insert a SETDOS /Y1 command at the beginning of
  15351. the portion of the batch file you want to debug, and a SETDOS /Y0
  15352. command at the end.
  15353. You cannot use the batch debugger with 116REXX files; it can only be
  15354. used with normal 4DOS batch files.
  15355. You can also invoke SETDOS /Y1 from the prompt, but because the debugger
  15356. is automatically turned off whenever 4DOS returns to
  15357. the prompt, you must enter the SETDOS command and the batch file name on
  15358. the same line, for example:
  15359. c:\> setdos /y1 ^ mybatch.btm
  15360. !INDENT 0
  15361. ;---------------------------------------------------------------------------
  15362. !TOPIC 827 SETERROR
  15363. !TTY
  15364. Purpose: Set the ERRORLEVEL value and the DOS error code.
  15365. Format: SETERROR errorlevel
  15366. errorlevel: New value for ERRORLEVEL.
  15367. !TTY
  15368. Usage
  15369. SETERROR set the value of the ERRORLEVEL (162?) internal variable (i.e.
  15370. the exit code of the last external program) and the last-error code in DOS
  15371. to the specified value.
  15372. ;---------------------------------------------------------------------------
  15373. !TOPIC 665 SETLOCAL
  15374. !TTY
  15375. Purpose: Save a copy of the current disk drive, directory, environment,
  15376. alias list, and special characters.
  15377. Format: SETLOCAL
  15378. !TTY
  15379. See also: 621ENDLOCAL.
  15380. Usage
  15381. SETLOCAL is used in batch files to save the default disk drive and
  15382. directory, the environment, the alias list and the command separator, escape
  15383. character, parameter character, decimal separator, and thousands
  15384. separator. You can then change their values and later restore the original
  15385. values with ENDLOCAL.
  15386. For example, this batch file fragment saves everything, removes all aliases
  15387. so that user aliases will not affect batch file commands, changes the disk
  15388. and directory, changes the command separator, runs a program, and then
  15389. restores the original values:
  15390. setlocal
  15391. unalias *
  15392. cdd d:\test
  15393. setdos /c~
  15394. program ~ echo Done!
  15395. endlocal
  15396. SETLOCAL and ENDLOCAL are nestable up to 8 levels deep within a batch file.
  15397. You cannot use SETLOCAL in an alias or at the command line.
  15398. An ENDLOCAL is performed automatically at the end of a batch file if you
  15399. forget to do so. If you invoke one batch file from another without using
  15400. CALL, the first batch file is terminated, and an automatic ENDLOCAL is
  15401. performed; the second batch file inherits the settings as they were prior to
  15402. any unterminated SETLOCAL.
  15403. Do not load memory-resident programs (TSRs) from a batch file while
  15404. SETLOCAL is in effect, as SETLOCAL will have to temporarily set aside
  15405. some amount of memory to store the current settings. If you do, when
  15406. ENDLOCAL is executed and the memory used by SETLOCAL is released,
  15407. a "hole" will be left in memory below the TSR. This is not usually
  15408. harmful, but wastes memory. However, in most cases, it only applies
  15409. when loading TSRs into conventional memory.
  15410. A combination of SETLOCAL / ENDLOCAL and 680UNSET can be used to slightly
  15411. reduce the memory footprint of most TSRs loaded into other memory regions
  15412. (usually Upper Memory), or at least avoid some possible memory fragmentation
  15413. in that region. (This mainly applies to TSRs which don't free their
  15414. environment segment when becoming resident.) You can temporarily shrink
  15415. the environment down to the required minimum for the TSR to work using
  15416. UNSET * -- most TSRs do not need any environment variables at all, and
  15417. those few which do will usually only look for very specific variables
  15418. during initialization. In addition to this, it is often possible to
  15419. temporarily assign a SUBST drive to make a long load path to the TSR as
  15420. short as possible in order to reduce the size of the environment appendage
  15421. under DOS 3.0 and above (which contains the full path to the loaded
  15422. driver). For example:
  15423. setlocal
  15424. unset *
  15425. subst b: d:\dir1\dir2\dir3\dir4\dir5\dir6\dir7\dir8
  15426. lh b:\tsr.com ...
  15427. subst b: /d
  15428. endlocal
  15429. ;---------------------------------------------------------------------------
  15430. !TOPIC 666 SHIFT
  15431. !TTY
  15432. Purpose: Allows the use of more than 255 batch file parameters in a
  15433. batch file.
  15434. Format: SHIFT [n | /n]
  15435. n: Number of positions to shift.
  15436. !TTY
  15437. Usage
  15438. SHIFT is provided for compatibility with older batch files, where it was
  15439. used to access more than 10 parameters. 4DOS supports 256 parameters (%0
  15440. to %255), so you don't need to use SHIFT for batch files running
  15441. exclusively under JP Software command processors.
  15442. SHIFT moves each of the batch file parameters n positions to the left. The
  15443. default value for n is 1. SHIFT 1 moves the parameter in %1 to position
  15444. %0, the parameter in %2 becomes %1, etc. You can reverse a SHIFT by giving
  15445. a negative value for n (i.e., after SHIFT -1, the former %0 is restored, %0
  15446. becomes %1, %1 becomes %2, etc.).
  15447. SHIFT also affects the special parameters %n& (command-line tail) and %#
  15448. (number of command arguments). For compatibility with CMD.EXE, SHIFT does
  15449. not affect the %* parameter.
  15450. For example, create a batch file called TEST.BAT:
  15451. echo %1 %2 %3 %4
  15452. shift
  15453. echo %1 %2 %3 %4
  15454. shift 2
  15455. echo %1 %2 %3 %4
  15456. shift -1
  15457. echo %1 %2 %3 %4
  15458. Executing TEST.BAT produces the following results:
  15459. c:\> test one two three four five six seven
  15460. one two three four
  15461. two three four five
  15462. four five six seven
  15463. three four five six
  15464. If you add a slash before the value n, the value determines the
  15465. postion at which to begin the shift. For example:
  15466. shift /2
  15467. leaves parameters %0 and %1 unchanged, and moves the value of %3 to postion
  15468. %2, %4 to %3, etc. The value after the slash cannot be negative, and shifts
  15469. performed with the slash cannot be undone later in the batch file.
  15470. ;---------------------------------------------------------------------------
  15471. !TOPIC 668 SWAPPING
  15472. !TTY
  15473. Purpose: Enable or disable 4DOS swapping, or display the swapping state.
  15474. Format: SWAPPING [ON | OFF]
  15475. !TTY
  15476. Usage
  15477. SWAPPING temporarily disables or enables the swapping of the transient
  15478. portion of 4DOS to expanded memory, to XMS extended memory, or to disk (see
  15479. the 391Swapping directive in 4DOS.INI for more information).
  15480. Setting SWAPPING OFF may be useful for speeding up batch files
  15481. (including AUTOEXEC.BAT) when 4DOS is using disk swapping. When you are
  15482. running several small programs from a batch file, disk swapping can
  15483. sometimes cause a noticeable delay. However, if you disable swapping,
  15484. there will be about 245K less memory available for large application
  15485. programs.
  15486. The following batch file fragment disables swapping, runs several programs,
  15487. and then re-enables swapping:
  15488. swapping off
  15489. c:\util\mouse
  15490. c:\video\ansi.com
  15491. c:\bin\cache.com
  15492. swapping on
  15493. If you enter SWAPPING with no arguments, 4DOS displays the current
  15494. swapping type (XMS, EMS, Disk, or None) and state:
  15495. c:\> swapping
  15496. SWAPPING (XMS) is ON
  15497. Note: 4DOS reports SWAPPING (XMS) is ON, it will actually swapped out
  15498. of DOS completely by vDosPlus.
  15499. Setting SWAPPING OFF does not close the disk swap file or release any
  15500. reserved EMS memory.
  15501. You may have trouble if you load memory-resident programs (TSRs) with
  15502. SWAPPING OFF and unload them with SWAPPING ON, or vice versa. Many TSRs
  15503. expect the system to be in the same state when they unload that it was in
  15504. when they loaded, and variation from this norm may cause the TSR to unload
  15505. improperly or hang your system.
  15506. ;---------------------------------------------------------------------------
  15507. !TOPIC 669 SWITCH
  15508. !TTY
  15509. Purpose: Select commands to execute based on a value.
  15510. Format: SWITCH expression
  15511. CASE value1 [.OR. value2] ...
  15512. commands
  15513. CASE value3
  15514. commands
  15515. [DEFAULT
  15516. commands]
  15517. ENDSWITCH
  15518. expression: An environment variable, internal variable,
  15519. variable function, text string, or a
  15520. combination of these elements, that is used
  15521. to select a group of commands.
  15522. value1, value2, etc.: A value to test, or multiple values
  15523. connected with .OR.
  15524. commands: One or more commands to execute if the
  15525. expression matches the value. If you use
  15526. multiple commands, they must be separated
  15527. by command separators or placed on separate
  15528. lines in the batch file.
  15529. !TTY
  15530. See also: 633IF, and 634IFF.
  15531. Usage
  15532. SWITCH can only be used in batch files. It allows you to select a command or
  15533. group of commands to execute based on the possible values of a variable or a
  15534. combination of variables and text.
  15535. The SWITCH command is always followed by an expression created from
  15536. environment variables, internal variables, variable functions, and text
  15537. strings, and then by a sequence of CASE statements matching the possible
  15538. values of that expression. If one of the values
  15539. in a CASE statement matches the expression, the commands following
  15540. that CASE statement are executed, and all subsequent CASE statements and the
  15541. commands which follow them are ignored. If no matches are found, the commands
  15542. following the optional DEFAULT statement are executed. If there are no
  15543. matches and there is no DEFAULT statement, no commands are executed by
  15544. SWITCH.
  15545. After all of the commands following the CASE or DEFAULT statement are
  15546. executed, the batch file continues with the commands that follow ENDSWITCH.
  15547. The SWITCH command must be the last (or only) command on the line. Each
  15548. CASE, DEFAULT, or ENDSWITCH statement must appear on a line by
  15549. itself. Multiple values in CASE must be separated by the .OR. operator;
  15550. .AND. and .XOR. are not legal.
  15551. For example, the following batch file fragment displays one message if the
  15552. user presses A, another if user presses B or C,
  15553. and a third if the user presses any other key:
  15554. inkey Enter a keystroke: %%key
  15555. switch %key
  15556. case A
  15557. echo It's an A
  15558. case B .or. C
  15559. echo It's either B or C
  15560. default
  15561. echo It's not A, B, or C
  15562. endswitch
  15563. In the example above, the value of a single environment variable was used for
  15564. the expression. You will probably find that this is the best
  15565. method to use in most situations. However, you can use other kinds of
  15566. expressions if necessary. The first example below selects a command to
  15567. execute based on the length of a variable, and the second bases the action on
  15568. a quoted text string stored in an environment variable:
  15569. switch %@len[%var1]
  15570. case 0
  15571. echo Missing var1
  15572. case 1
  15573. echo Single character
  15574. ...
  15575. endswitch
  15576. switch "%string1"
  15577. case "This is a test"
  15578. echo Test string
  15579. case "The quick brown fox"
  15580. echo It's the fox
  15581. ...
  15582. endswitch
  15583. The SWITCH command is a multiline structure. You can't put it in a
  15584. 085command group or pack it into a single line. (This is why SWITCH
  15585. cannot be used in aliases.) However, commands within a CASE or DEFAULT block
  15586. can use command groups or the 041command separator in the normal way.
  15587. SWITCH commands can be nested. The permissible nesting level
  15588. depends on the amount of free space in 4DOS's internal stack; if you receive
  15589. a stack overflow error when using SWITCH in complex, nested command
  15590. sequences, see the 574StackSize directive.
  15591. You can exit from all SWITCH / ENDSWITCH processing by using 630GOTO to a
  15592. line past the last ENDSWITCH.
  15593. ;---------------------------------------------------------------------------
  15594. !TOPIC 698 TAIL
  15595. !TTY
  15596. Purpose: Display the end of the specified file(s).
  15597. Format: TAIL [/A:[[+|-]rhsad] /Cn /I"text" /Nn /P /Q /V] [@file] file...
  15598. file: The file or list of files that you want to display.
  15599. @file: A text file containing the names of the files to
  15600. display, one per line (see 057@file lists for details).
  15601. /A: (Attribute select) /P(ause)
  15602. /C (Number of bytes) /Q(uiet)
  15603. /I (match description) /V(erbose)
  15604. /N (Number of lines)
  15605. !TTY
  15606. See also: 697HEAD, 640LIST, and 677TYPE.
  15607. File Selection
  15608. Supports extended 073wildcards, 074ranges, 079multiple file
  15609. names, and 080include lists.
  15610. Usage
  15611. The TAIL command displays the last part of a file. It is normally only
  15612. useful for displaying ASCII text files. Executable files (.COM and .EXE)
  15613. and many data files may be unreadable when displayed with TAIL because they
  15614. include non-alphanumeric characters. You can press Ctrl-S to pause TAIL's
  15615. display and then any key to continue.
  15616. To display the last 15 lines of the files MEMO1 and MEMO2:
  15617. c:\> tail /n15 memo1 memo2
  15618. To display text from the clipboard, use CLIP: as the file name. CLIP:
  15619. will not return any data unless the clipboard contains text. See
  15620. 051redirection for additional information on CLIP:, including details on
  15621. when you can use the clipboard under 4DOS.
  15622. Options
  15623. !INDENT 5 5 0 5
  15624. /A:: (Attribute select) Select only those files that have the
  15625. specified attribute(s) set. The colon [:] after /A is
  15626. required. Preceding an attribute letter with a hyphen [-]
  15627. will select files that do not have that attribute set. You can
  15628. OR attributes by preceding each attribute letter with a plus sign [+].
  15629. !INDENT 5 5 5 5
  15630. The attributes are:
  15631. R Read-only S System
  15632. H Hidden A Archive
  15633. If no attributes are listed at all (e.g., TAIL /A: ...), TAIL will
  15634. select all files including hidden and system files. If attributes are
  15635. combined, all the specified attributes must match for a file to be
  15636. selected. For example, /A:RHS will select only those files
  15637. with all three attributes set.
  15638. !INDENT 5 5 0 5
  15639. /C: Display the specified number of bytes. /C accepts b, k, or m
  15640. modifiers at the end of the number. b is the number of 512-byte blocks,
  15641. k is 1000's of bytes, K is kilobytes, m is millions of bytes, and M is
  15642. megabytes.
  15643. /I"text": Select files by matching text in their descriptions.
  15644. The text can include 073wildcards and extended wildcards. The
  15645. search text must be enclosed in quotation marks, and must follow
  15646. the /I immediately, with no intervening spaces. You can select
  15647. all filenames that have a description with /I"[?]*", or all
  15648. filenames that do not have a description with /I"[]".
  15649. /N: The number of lines to display. The default is 10.
  15650. /P: (Pause) Prompt after displaying each page. Your options at the
  15651. prompt are explained in detail under 045Page and File Prompts.
  15652. /Q: (Quiet) Don't display a header for each file. This is the
  15653. default behavior unless /V is specified.
  15654. /V: (Verbose) Display a header for each file.
  15655. !INDENT 0
  15656. ;---------------------------------------------------------------------------
  15657. !TOPIC 670 TEE
  15658. !TTY
  15659. Purpose: Copy standard input to both standard output and a file.
  15660. Format: TEE [/A] file...
  15661. file: One or more files that will receive the "tee-d" output.
  15662. /A(ppend)
  15663. !TTY
  15664. See also: 686Y, 052piping and 051redirection.
  15665. Usage
  15666. TEE is normally used to "split" the output of a program so that you can see
  15667. it on the display and also save it in a file. It can also be used to
  15668. capture intermediate output before the data is altered by another program
  15669. or command.
  15670. TEE gets its input from standard input (usually the piped output of another
  15671. command or program), and sends out two copies: one goes to standard
  15672. output, the other to the file or files that you specify. TEE is not likely
  15673. to be useful with programs which do not use standard output, because these
  15674. programs cannot send output through a pipe.
  15675. For example, to search the file DOC for any lines containing the string
  15676. "4DOS", make a copy of the matching lines in 4.DAT, sort the lines, and
  15677. write them to the output file 4D.DAT:
  15678. c:\> find "4DOS" doc | tee 4.dat | sort > 4d.dat
  15679. If you are typing at the keyboard to produce the input for TEE, you must
  15680. enter a Ctrl-Z to terminate the input.
  15681. When using TEE with a pipe, the previous command writes its output to a
  15682. temporary file. When that command finishes, TEE begins operation and can
  15683. read the temporary file, display the output, and write it to the file(s)
  15684. named in the TEE command.
  15685. Options
  15686. !INDENT 5 5 0 5
  15687. /A: (Append) Append to the file(s) rather than overwriting them.
  15688. !INDENT 0
  15689. ;---------------------------------------------------------------------------
  15690. !TOPIC 671 TEXT
  15691. !TTY
  15692. Purpose: Display a block of text in a batch file.
  15693. Format: TEXT
  15694. .
  15695. .
  15696. .
  15697. ENDTEXT
  15698. !TTY
  15699. See also: 619ECHO, 660SCREEN, 661SCRPUT, and 684VSCRPUT.
  15700. Usage
  15701. TEXT can only be used in batch files.
  15702. The TEXT command is useful for displaying menus or multi-line messages.
  15703. TEXT will display all subsequent lines in the batch file until terminated
  15704. by ENDTEXT. Both TEXT and ENDTEXT must be entered as the only command on
  15705. the line.
  15706. To redirect the entire block of text, use redirection on the TEXT command
  15707. itself, but not on the actual text lines or the ENDTEXT line. No
  15708. environment variable expansion or other processing is performed on the
  15709. lines between TEXT and ENDTEXT; they are displayed exactly as they are
  15710. stored in the batch file.
  15711. You can change screen colors by inserting 915ANSI escape sequences
  15712. anywhere in the text block. You can also use a 604CLS or 605COLOR
  15713. command to set the screen color before executing the TEXT command.
  15714. The following batch file fragment displays a simple menu:
  15715. @echo off
  15716. cls
  15717. screen 2 0
  15718. text
  15719. Enter one of the following:
  15720. 1 - Spreadsheet
  15721. 2 - Word Processing
  15722. 3 - DOS Utilities
  15723. 4 - Exit
  15724. endtext
  15725. inkey /k"1234" Enter your selection: %%key
  15726. ;---------------------------------------------------------------------------
  15727. !TOPIC 672 TIME
  15728. !TTY
  15729. Purpose: Display or set the current system time.
  15730. Format: TIME [/T] [hh[:mm[:ss]]] [AM | PM]
  15731. hh: The hour (0 - 23).
  15732. mm: The minute (0 - 59).
  15733. ss: The second (0 - 59), set to 0 if omitted.
  15734. /T: (display only)
  15735. !TTY
  15736. See also: 608DATE.
  15737. Usage
  15738. If you don't enter any parameters, TIME will display the current system
  15739. time and prompt you for a new time. Press Enter if you don't wish to
  15740. change the time. You can supply a new time, but it is ignored by vDosPlus
  15741. unless you set the SYNCTIME=OFF directive in its config file.
  15742. time
  15743. Mon Jun 19, 2015 9:30:06
  15744. New time (hh:mm:ss):
  15745. Option
  15746. !INDENT 5 5 0 5
  15747. /T: (Display only) Displays the current time, but does not prompt you
  15748. for a new time.
  15749. !INDENT 0
  15750. ;---------------------------------------------------------------------------
  15751. !TOPIC 673 TIMER
  15752. !TTY
  15753. Purpose: TIMER is a system stopwatch.
  15754. Format: TIMER [ON|OFF] [/1 /2 /3 /Q /S]
  15755. ON: Force the stopwatch to restart.
  15756. OFF: Force the stopwatch to stop.
  15757. /1 (stopwatch #1, default) /Q(uiet)
  15758. /2 (stopwatch #2) /S(plit)
  15759. /3 (stopwatch #3)
  15760. !TTY
  15761. Usage
  15762. The TIMER command turns a system stopwatch on and off. When you first run
  15763. TIMER, the stopwatch starts.
  15764. c:\> timer
  15765. Timer 1 on: 12:21:46
  15766. When you run TIMER again, the stopwatch stops and the elapsed time is
  15767. displayed.
  15768. c:\> timer
  15769. Timer 1 off: 12:21:58 Elapsed time: 0:00:12.06
  15770. There are three stopwatches available (1, 2, and 3) so you can time
  15771. multiple overlapping events. By default, TIMER uses stopwatch #1.
  15772. TIMER is particularly useful for timing events in batch files. For
  15773. example, to time both an entire batch file, and an intermediate section of
  15774. the same file, you could use commands like this:
  15775. rem Turn on timer 1
  15776. timer
  15777. rem Do some work here
  15778. rem Turn timer 2 on to time the next section
  15779. timer /2
  15780. rem Do some more work
  15781. echo Intermediate section completed
  15782. rem Display time taken in intermediate section
  15783. timer /2
  15784. rem Do some more work
  15785. rem Now display the total time
  15786. timer
  15787. The smallest interval TIMER can measure (same as the elapsed time resolution
  15788. or granularity) is 0.01 seconds. The largest possible interval that TIMER
  15789. can measure is 23 hours, 59 minutes, 59.99 seconds.
  15790. Options
  15791. !INDENT 5 5 0 5
  15792. /1: Use timer #1 (the default).
  15793. /2: Use timer #2.
  15794. /3: Use timer #3.
  15795. /Q: (Quiet) Don't display any messages.
  15796. /S: (Split) Display a split time without stopping the timer. To
  15797. display the current elapsed time but leave the timer running:
  15798. !INDENT 5 5 5 5
  15799. c:\> timer /s
  15800. Timer 1 elapsed: 0:06:40.63
  15801. !INDENT 5 5 0 5
  15802. ON: Start the timer regardless of its previous state (on or
  15803. off). Otherwise the TIMER command toggles the timer state
  15804. (unless /S is used).
  15805. OFF: Stops the timer.
  15806. !INDENT 0
  15807. ;---------------------------------------------------------------------------
  15808. !TOPIC 674 TOUCH
  15809. !TTY
  15810. Purpose: Change a file's date and time stamps.
  15811. Format: TOUCH [/A:[[+|-]rhsad]/C /D[acw][mm-dd-yy] /E /F /I"text" /N /Q
  15812. /R[:acw] reffile /S /T[acw][hh:mm]] [@file] file...
  15813. reffile: A file whose date and / or time stamps are to be
  15814. transferred to one or more other files.
  15815. file: One or more files whose date and/or time stamps are
  15816. to be changed.
  15817. @file: A text file containing the names of the files to
  15818. touch, one per line (see 057@file lists
  15819. for details).
  15820. /A: (Attribute select) /N(othing)
  15821. /C(reate file) /Q(uiet)
  15822. /D(ate) /R(epeat)
  15823. /E (No error messages) /S(ubdirectories)
  15824. /F(orce read-only files) /T(ime)
  15825. /I (match descriptions)
  15826. !TTY
  15827. File Selection
  15828. Supports extended 073wildcards, 074ranges, 079multiple file
  15829. names, and 080include lists.
  15830. Use wildcards with caution on LFN volumes; see 081LFN File Searches
  15831. for details.
  15832. Usage
  15833. TOUCH is used to change the date and/or time of a file. You can use it to
  15834. be sure that particular files are included or excluded from an internal
  15835. command, backup program, compiler MAKE utility, or other program that selects
  15836. files based on their time and date stamps, or to set a group of files to the
  15837. same date and time for consistency.
  15838. TOUCH should be used with caution, and in most cases should only be used
  15839. on files you create. Many programs depend on file dates and times to perform
  15840. their work properly. In addition, many software manufacturers use file dates
  15841. and times to signify version numbers. Indiscriminate changes to date and
  15842. time stamps can lead to confusion or incorrect behavior of other software.
  15843. TOUCH normally works with existing files, and will display an error if the
  15844. file you specify does not exist, or has the read-only attribute set. To
  15845. create the file if it does not already exist, use the /C switch. To force
  15846. a date and time change for read-only files, use the /F switch.
  15847. TOUCH displays the date, time, and full name of each file whose timestamp is
  15848. modified. To disable this output, use /Q.
  15849. If you don't specify a date or a time, TOUCH will default to the current date
  15850. and time from your system clock. For example, to set the time stamp of all
  15851. .C files in the current directory to the current date and time:
  15852. d:\source> touch *.c
  15853. 6-12-00 11:13:58 D:\SOURCE\MAIN.C
  15854. 6-12-00 11:13:58 D:\SOURCE\INIT.C
  15855. ...
  15856. If you specify a date but not a time, the time will default to the current
  15857. time from your system clock. Similarly, if you specify a time but not a
  15858. date, the date will be obtained from the system clock.
  15859. If you enter /D or /T with no argument, TOUCH will preserve the existing
  15860. date or time.
  15861. To transfer the date and time from one file to another use /R; see
  15862. below for details.
  15863. Due to operating system limitations, TOUCH can not set the date and
  15864. time for directories, even if you use the /A:d switch.
  15865. On LFN files, TOUCH sets the "modified" or "last write" date
  15866. and time by default. By adding the appropriate character to the /D or /T
  15867. switch, you can set the other date and time stamps that are maintained for
  15868. each file:
  15869. !NOWRAP
  15870. a last access date and time (access time can not be set on
  15871. LFN volumes).
  15872. c creation date and time.
  15873. w last write date and time (default).
  15874. !WRAP
  15875. Options
  15876. !INDENT 5 5 0 5
  15877. /A:: (Attribute select) Select only those files that have the
  15878. specified attribute(s) set. The colon [:] after /A is
  15879. required. Preceding an attribute letter with a hyphen [-]
  15880. will select files that do not have that attribute set. You can
  15881. OR attributes by preceding each attribute letter with a plus sign [+].
  15882. !INDENT 5 5 5 5
  15883. The attributes are:
  15884. R Read-only D subDirectory
  15885. H Hidden A Archive
  15886. S System
  15887. If no attributes are listed at all (e.g., TYPE /A: ...), TOUCH will
  15888. select all files and subdirectories including hidden and system files.
  15889. If attributes are combined, all the specified attributes must match for
  15890. a file to be selected. For example, /A:RHS will select only those
  15891. files with all three attributes set.
  15892. !INDENT 5 5 0 5
  15893. /C: (Create file) Create the file (as a zero-byte file) if it does
  15894. not already exist. You cannot use wildcards with /C, but you can
  15895. create multiple files by listing them individually on the command line.
  15896. /D: (Date) Specify the date that will be set for the
  15897. selected files. If the date is not specified, TOUCH will use
  15898. the current date. For LFN files you can use /Da, /Dc, or
  15899. /Dw, followed by the date, to explicitly specify the last
  15900. access, creation, or last write date stamp. The date must be
  15901. entered using the proper format for your current country
  15902. settings. You can also use the ISO 8601 international date format
  15903. "yyyy-mm-dd", the ISO 8601 week date format "yyyy-Www-d", where
  15904. yyyy = year, ww = week, d = week day, or the ISO 8601 ordinal date
  15905. format "yyyy-ddd", where yyyy = year, ddd = day of the year.
  15906. /E: (No error messages) Suppress all non-fatal error
  15907. messages, such as "File not found." Fatal error messages, such as
  15908. "Drive not ready," will still be displayed. This option is most useful
  15909. in batch files.
  15910. /F: (Force read-only files) Remove the read-only attribute from each
  15911. file before changing the date and time, and restore it
  15912. afterwards. Without /F, attempting to change the date and time on a
  15913. read-only file will usually cause an error.
  15914. /I"text": Select files by matching text in their
  15915. descriptions. The text can include 073wildcards and
  15916. extended wildcards. The search text must be enclosed in
  15917. quotation marks, and must follow the /I immediately, with no
  15918. intervening spaces. You can select all filenames that have a
  15919. description with /I"[?]*", or all filenames that do not have
  15920. a description with /I"[]".
  15921. /N: (Nothing) Do everything but actually change the date and time.
  15922. /Q: (Quiet) Do not display the new date and time and the full name
  15923. for each file.
  15924. /R: (Repeat) The date and time for the specified file(s)
  15925. will be set to the current date and time for the reference file
  15926. whose name immediately follows the /R. For LFN files, you can
  15927. use /R:c or /R:w, followed by the file name, to specify the
  15928. last creation or last write time stamp. However, files on FAT-based
  15929. volumes do not have a last access time, so TOUCH /R:a will
  15930. have no effect on such files.
  15931. If /D or /T is used after /R, the specified date or time
  15932. will override the date and/or time from the reference file.
  15933. For example, to set the date for file X2 to match the date for
  15934. X1, and also set the time for X2 to 11:42 AM, you could use:
  15935. !INDENT 5 5 5 5
  15936. c:\> touch /r x1 /t11:42 x2
  15937. !INDENT 5 5 0 5
  15938. /S: (Subdirectories): TOUCH all matching files in the specified
  15939. directory and its subdirectories. Unlike most 4DOS commands, TOUCH /S
  15940. will search into subdirectories with the hidden or system attributes
  15941. set.
  15942. /T: (Time) Specify the time that will be set for the selected
  15943. files, in hh:mm format. If the time is not specified, TOUCH will use
  15944. the current time. For LFN files you can use /Tc or /Tw,
  15945. followed by the time, to explicitly specify the last access, creation,
  15946. or last write time stamp. However, files on FAT-based volumes do not
  15947. have a last access time, so TOUCH /Ta will have no effect on such
  15948. files.
  15949. !INDENT 0
  15950. ;---------------------------------------------------------------------------
  15951. !TOPIC 774 TRANSIENT
  15952. !TTY
  15953. Purpose: Toggle the shell's transient mode.
  15954. Format: TRANSIENT [ON | OFF]
  15955. !TTY
  15956. Usage
  15957. TRANSIENT can only be used in batch files. It allows you to change the
  15958. shell's transient mode (i.e., whether it was started with a /C), so that you
  15959. can make a transient session permanent (or vice versa).
  15960. ;---------------------------------------------------------------------------
  15961. !TOPIC 675 TREE
  15962. !TTY
  15963. Purpose: Display a graphical directory tree.
  15964. Format: TREE [/A /B /F /H /P /S /T[:acw]] dir...
  15965. dir: The directory to use as the start of the tree. If
  15966. more than one directory is specified, TREE will display a
  15967. directory tree for each.
  15968. /A(SCII) /P(ause)
  15969. /B(are) /S (file size)
  15970. /F(iles) /T(ime and date)
  15971. /H(idden directories)
  15972. !TTY
  15973. Usage
  15974. The TREE command displays a graphical representation of the directory tree
  15975. using standard or extended ASCII characters. For example, to display the
  15976. directory structure on drive C:
  15977. c:\> tree c:\
  15978. You can print the display, save it in a file, or view it with 640LIST by
  15979. using the usual 051redirection and 052piping operators. Be sure to
  15980. review the /A option before attempting to print the TREE output. The
  15981. options discussed below specify the amount of information included in the
  15982. display.
  15983. Options
  15984. !INDENT 5 5 0 5
  15985. /A: (ASCII) Display the tree using standard ASCII characters. You
  15986. can use this option if you want to save the directory tree in a file
  15987. for further processing or print the tree on a printer which does not
  15988. support the graphical symbols that TREE normally uses.
  15989. /B: (Bare) Display the full pathname of each directory,
  15990. without any of the line-drawing characters.
  15991. /F: (Files) Display files as well as directories. If you use this
  15992. option, the name of each file is displayed beneath the name of the
  15993. directory in which it resides.
  15994. /H: (Hidden) Display subdirectories with the hidden or system
  15995. attributes set. If you combine /H and /F, hidden and system files
  15996. will also be displayed.
  15997. /P: (Pause) Wait for a key to be pressed after each screen page before
  15998. continuing the display. Your options at the prompt are explained in
  15999. detail in 045Page and File Prompts.
  16000. /S: (Size) Display the size of each file. This option is only useful
  16001. when combined with /F.
  16002. /T: (Time and date) Display the time and date for each directory. If
  16003. you combine /T and /F, the time and date for each file will also be
  16004. displayed. For LFN files, the time and date of the last
  16005. write will be shown by default. You can select a specific time and date
  16006. stamp by using the following variations of /T:
  16007. !INDENT 5 5 5 5
  16008. /T:a last access date and time (access time is not saved
  16009. on LFN volumes).
  16010. /T:c creation date and time.
  16011. /T:w last write date and time (default).
  16012. !INDENT 0
  16013. For comparison with the external DOS TREE.COM command refer to
  16014. the 65535external DOS help system.
  16015. ;---------------------------------------------------------------------------
  16016. !TOPIC 676 TRUENAME
  16017. !TTY
  16018. Purpose: Find the fully-expanded name for a file.
  16019. Format: TRUENAME file
  16020. file: The file whose name TRUENAME will report.
  16021. !TTY
  16022. See also: 325@TRUENAME variable function.
  16023. Usage
  16024. On LFN drives TRUENAME returns the short name for the file, for example:
  16025. c:\> truename "Program Files"
  16026. C:\PROGRA~1
  16027. ;---------------------------------------------------------------------------
  16028. !TOPIC 677 TYPE
  16029. !TTY
  16030. Purpose: Display the contents of the specified file(s).
  16031. Format: TYPE [/A:[[+|-]rhsad] /I"text" /L /P /V] [@file] file...
  16032. file: The file or list of files that you want to display.
  16033. @file: A text file containing the names of the files to
  16034. display, one per line (see 057@file lists for
  16035. details).
  16036. /A: (Attribute select) /L(ine numbers)
  16037. /I (match description) /P(ause)
  16038. /V(erbose)
  16039. !TTY
  16040. See also: 697HEAD, 640LIST, and 698TAIL.
  16041. File Selection
  16042. Supports extended 073wildcards, 074ranges, 079multiple file
  16043. names, and 080include lists.
  16044. Usage
  16045. The TYPE command displays a file. It is normally only useful for
  16046. displaying ASCII text files. Executable files (.COM and .EXE) and many
  16047. data files may be unreadable when displayed with TYPE because they include
  16048. non-alphanumeric characters.
  16049. To display the files MEMO1 and MEMO2:
  16050. c:\> type /p memo1 memo2
  16051. You can press Ctrl-S to pause TYPE's display and then any key to
  16052. continue.
  16053. To display text from the clipboard, use CLIP: as the file name. CLIP:
  16054. will not return any data unless the clipboard contains text. See
  16055. 051redirection for additional information on CLIP:, including details on
  16056. when you can use the clipboard under 4DOS.
  16057. You will probably find LIST to be more useful for displaying files. However,
  16058. the TYPE /L command used with 051redirection is useful if you want to add
  16059. line numbers to a file, for example:
  16060. c:\> type /l myfile > myfile.num
  16061. Options
  16062. !INDENT 5 5 0 5
  16063. /A:: (Attribute select) Select only those files that have the
  16064. specified attribute(s) set. The colon [:] after /A is
  16065. required. Preceding an attribute letter with a hyphen [-]
  16066. will select files that do not have that attribute set. You can
  16067. OR attributes by preceding each attribute letter with a plus sign [+].
  16068. !INDENT 5 5 5 5
  16069. The attributes are:
  16070. R Read-only S System
  16071. H Hidden A Archive
  16072. If no attributes are listed at all (e.g., TYPE /A: ...), TYPE will
  16073. select all files including hidden and system files. If attributes are
  16074. combined, all the specified attributes must match for a file to be
  16075. selected. For example, /A:RHS will select only those files with all
  16076. three attributes set.
  16077. !INDENT 5 5 0 5
  16078. /I"text": Select files by matching text in their
  16079. descriptions. The text can include 073wildcards and
  16080. extended wildcards. The search text must be enclosed in
  16081. quotation marks, and must follow the /I immediately, with no
  16082. intervening spaces. You can select all filenames that have a
  16083. description with /I"[?]*", or all filenames that do not have
  16084. a description with /I"[]".
  16085. /L: (Line numbers) Display a line number preceding each line of text.
  16086. /P: (Pause) Prompt after displaying each page. Your options at the
  16087. prompt are explained in detail under 045Page and File Prompts.
  16088. /V: (Verbose) Display a file name header for each file.
  16089. !INDENT 0
  16090. ;---------------------------------------------------------------------------
  16091. !TOPIC 678 UNALIAS
  16092. !TTY
  16093. Purpose: Remove aliases from the alias list.
  16094. Format: UNALIAS [/Q /R file] [alias...]
  16095. or
  16096. UNALIAS *
  16097. alias: One or more aliases to remove from memory.
  16098. file: One or more files to read for alias definitions.
  16099. /Q(uiet) /R(ead file)
  16100. !TTY
  16101. See also: 595ALIAS and 622ESET.
  16102. Usage
  16103. 4DOS maintains a list of the aliases that you have defined. The UNALIAS
  16104. command will remove aliases from that list. UNALIAS supports wildcards in
  16105. the alias name, and you can remove one or more aliases by name, or you
  16106. can delete the entire alias list by using the command UNALIAS *.
  16107. For example, to remove the alias DDIR:
  16108. c:\> unalias ddir
  16109. To remove all the aliases:
  16110. c:\> unalias *
  16111. To remove all the aliases that begin with "DD":
  16112. [c:\] unalias dd*
  16113. If you keep aliases in a file that can be loaded with the 595ALIAS /R
  16114. command, you can remove the aliases by using the UNALIAS /R command with the
  16115. same file name:
  16116. c:\> unalias /r alias.lst
  16117. This is much faster than removing each alias individually in a batch file,
  16118. and can be more selective than using UNALIAS *.
  16119. Options
  16120. !INDENT 5 5 0 5
  16121. /Q: (Quiet) Prevents UNALIAS from displaying an error message if one or
  16122. more of the aliases does not exist. This option is most
  16123. useful in batch files, for removing a group of aliases when
  16124. some of the aliases may not have been defined.
  16125. /R: (Read) Read the list of aliases to remove from a file. The file
  16126. format should be the same format as that used by the 595ALIAS /R
  16127. command. You can use multiple files with one UNALIAS /R command by
  16128. placing the names on the command line, separated by spaces:
  16129. !INDENT 5 5 5 5
  16130. c:\> unalias /r alias1.lst alias2.lst
  16131. !INDENT 0
  16132. ;---------------------------------------------------------------------------
  16133. !TOPIC 699 UNFUNCTION
  16134. !TTY
  16135. Purpose: Remove user-defined variable functions.
  16136. Format: UNFUNCTION [/Q /R file] [function...]
  16137. or
  16138. UNFUNCTION *
  16139. function: One or more functions to remove from memory.
  16140. file: One or more files to read for function definitions.
  16141. /Q(uiet) /R(ead file)
  16142. !TTY
  16143. See also: 696FUNCTION.
  16144. Usage
  16145. 4DOS maintains a list of the 241variable functions that you have
  16146. defined. The UNFUNCTION command will remove user-defined definitions
  16147. from that list. UNFUNCTION supports wildcards in the function name,
  16148. and you can remove one or more functions by name, or you can delete
  16149. the entire function list by using the command UNFUNCTION *.
  16150. Options
  16151. !INDENT 5 5 0 5
  16152. /Q: (Quiet) Prevents UNFUNCTION from displaying an error message if
  16153. one or more of the functions does not exist. This option is most
  16154. useful in batch files, for removing a group of variable functions
  16155. when some of them may not have been defined.
  16156. /R: (Read) Read the list of function names to remove from a
  16157. file. The file format should be the same format as that used by
  16158. the 696FUNCTION /R command. You can use multiple files with
  16159. one UNFUNCTION /R command by placing the names on the command
  16160. line, separated by spaces:
  16161. !INDENT 5 5 5 5
  16162. c:\> unfunction /r func1.lst func2.lst
  16163. !INDENT 0
  16164. ;---------------------------------------------------------------------------
  16165. !TOPIC 680 UNSET
  16166. !TTY
  16167. Purpose: Remove variables from the environment.
  16168. Format: UNSET [/M /Q /R file...] name...
  16169. or
  16170. UNSET *
  16171. name: One or more variables to remove from the environment.
  16172. file: One or more files containing variable definitions.
  16173. /M(aster environment) /R(ead from file)
  16174. /Q(uiet)
  16175. !TTY
  16176. See also: 622ESET and 663SET.
  16177. Usage
  16178. UNSET removes one or more variables from the environment. UNSET supports
  16179. wildcards in the variable name, and you can remove one or more variables by
  16180. name. You can delete all environment variables with the command UNSET *.
  16181. For example, to remove the environment variable CMDLINE:
  16182. c:\> unset cmdline
  16183. To remove all of the environment variables:
  16184. c:\> unset *
  16185. To remove all the variables that begin with "P":
  16186. [c:\] unalias P*
  16187. UNSET can be used in a batch file, in conjunction with the 665SETLOCAL and
  16188. 621ENDLOCAL commands, to clear the environment of variables that may
  16189. cause problems for applications run from that batch file.
  16190. For more information on environment variables, see the 663SET command and
  16191. the general discussion of the 131environment.
  16192. Use caution when removing environment variables, and especially when
  16193. using UNSET *. Many programs will not work properly without certain
  16194. environment variables; for example, 4DOS itself depends on 138PATH and
  16195. 134COMSPEC.
  16196. Options
  16197. !INDENT 5 5 0 5
  16198. /M: (Master) Remove the variable from the master environment rather
  16199. than the local environment. This option is only useful in secondary
  16200. shells.
  16201. /Q: (Quiet) Prevents UNSET from displaying an error message if one or
  16202. more of the variables does not exist. This option is most
  16203. useful in batch files, for removing a group of variables
  16204. when some of the variables may not have been defined.
  16205. /R: (Read) Read environment variables to UNSET from a file. This
  16206. is much faster than using multiple UNSET commands in a batch file, and
  16207. can be more selective than UNSET *. The file format should be the same
  16208. format as that used by the 663SET /R command. If there is no filename
  16209. argument and input is redirected, UNSET /R will read from stdin.
  16210. !INDENT 0
  16211. ;---------------------------------------------------------------------------
  16212. !TOPIC 681 VER
  16213. !TTY
  16214. Purpose: Displays the vDosPlus and emulated DOS version.
  16215. Format: VER
  16216. !TTY
  16217. Usage
  16218. The vDosPlus version is its release and build dates in yyyy.mm.dd.
  16219. For example:
  16220. ver
  16221. vDosPlus 2016.10.01 (build 2017.03.15), reported DOS version: 7.10
  16222. ;---------------------------------------------------------------------------
  16223. !TOPIC 682 VERIFY
  16224. !TTY
  16225. Purpose: Enable or disable disk write verification or display the
  16226. verification state.
  16227. Format: VERIFY [ON | OFF]
  16228. !TTY
  16229. Usage
  16230. If used without parameters, VERIFY will display the state of the verify flag:
  16231. verify
  16232. VERIFY is OFF
  16233. This command/flag has no effect in vDosPlus!
  16234. ;---------------------------------------------------------------------------
  16235. !TOPIC 683 VOL
  16236. !TTY
  16237. Purpose: Display disk volume label(s).
  16238. Format: VOL [d:] ...
  16239. d: The drive or drives to search for labels.
  16240. !TTY
  16241. Usage
  16242. Each disk may have a volume label, created when the disk is formatted or
  16243. with the LABEL command. Also, every floppy disk formatted with DOS version
  16244. 4.0 or above, OS/2, or the 25Windows NT line has a volume serial number.
  16245. The VOL command will display the volume label and, if available, the volume
  16246. serial number of a disk volume. If the disk doesn't have a volume label,
  16247. VOL will report that it is "unlabeled." If you don't specify a drive, VOL
  16248. displays information about the current drive:
  16249. c:\> vol
  16250. Volume in drive C: is MYHARDDISK
  16251. If available, the volume serial number will appear after the drive label or
  16252. name.
  16253. To display the disk labels for drives A and B:
  16254. c:\> vol a: b:
  16255. Volume in drive A: is unlabeled
  16256. Volume in drive B: is BACKUP_2
  16257. ;---------------------------------------------------------------------------
  16258. !TOPIC 684 VSCRPUT
  16259. !TTY
  16260. Purpose: Display text vertically in the specified color.
  16261. Format: VSCRPUT row col [BRIght] [BLInk] fg ON [BRIght] bg text
  16262. row: Starting row number.
  16263. col: Starting column number.
  16264. fg: Foreground text color.
  16265. bg: Background text color.
  16266. text: The text to display.
  16267. !TTY
  16268. See also: 661SCRPUT.
  16269. Usage
  16270. VSCRPUT writes text vertically on the screen rather than horizontally. Like
  16271. the SCRPUT command, it uses the colors you specify to write the
  16272. text. VSCRPUT can be used for simple graphs and charts generated by batch
  16273. files. See 892Colors and Color Names for details about colors and notes
  16274. on the use of bright background colors.
  16275. The row and column are zero-based, so on a standard 25 line by 80 column
  16276. display, valid rows are 0 - 24 and valid columns are 0 - 79. VSCRPUT checks
  16277. for a valid row and column, and displays a "Usage" error message if either
  16278. value is out of range.
  16279. You can also specify the row and column as offsets from the current cursor
  16280. position. Begin the value with a plus sign [+] to move down the specified
  16281. number of rows or to the right the specified number of columns before
  16282. displaying text, or with a minus sign [-] to move up or to the left.
  16283. If you specify 999 for the row, VSCRPUT will center the text
  16284. vertically on the display. If you specify 999 for the column,
  16285. VSCRPUT will center the text horizontally.
  16286. VSCRPUT normally does not move the cursor when it displays the text. However,
  16287. if you have set 572OutputBIOS to Yes in 4DOS.INI, VSCRPUT will leave the
  16288. cursor at the end of the displayed text.
  16289. The following batch file fragment displays an X and Y axis and labels them:
  16290. cls bright white on blue
  16291. drawhline 20 10 40 1 bright white on blue
  16292. drawvline 2 10 19 1 bright white on blue
  16293. scrput 21 20 bright red on blue X axis
  16294. vscrput 8 9 bright red on blue Y axis
  16295. VSCRPUT normally writes text directly to the screen. If you have an
  16296. unusual display adapter which does not support direct video output, see the
  16297. 572OutputBIOS directive.
  16298. ;---------------------------------------------------------------------------
  16299. !TOPIC 685 WHICH
  16300. !TTY
  16301. Purpose: Display the command type and what it would execute.
  16302. Format: WHICH command ...
  16303. command: One or more commands or filenames to query.
  16304. !TTY
  16305. Usage
  16306. WHICH displays information about internal and external commands, aliases,
  16307. files, and executable extensions. The information it reports depends on
  16308. the type of command or file you specify. For example:
  16309. [c:\] which cdd buildtree test.btm test.exe donothing
  16310. CDD is an internal command
  16311. buildtree is an alias : cdd /s
  16312. test.btm is a batch file : C:\test.btm
  16313. test.exe is an external : C:\test.exe
  16314. donothing is an unknown command
  16315. If a filename includes white space or special characters, it must be
  16316. enclosed in double quotes.
  16317. If the command is an abbreviated alias, WHICH will display the full name.
  16318. ;---------------------------------------------------------------------------
  16319. !TOPIC 686 Y
  16320. !TTY
  16321. Purpose: Copy standard input to standard output, and then copy the
  16322. specified file(s) to standard output.
  16323. Format: Y file ...
  16324. file: The file or list of files to send to standard output.
  16325. !TTY
  16326. See also: 670TEE, 052piping and 051redirection.
  16327. Usage
  16328. The Y command copies input from standard input (usually the keyboard) to
  16329. standard output (usually the screen). Once the input ends, the named files
  16330. are appended to standard output.
  16331. For example, to get text from standard input, append the files MEMO1 and
  16332. MEMO2 to it, and send the output to MEMOS:
  16333. c:\> y memo1 memo2 > memos
  16334. The Y command is most useful if you want to add redirected data to the
  16335. beginning of a file instead of appending it to the end. For example, this
  16336. command copies the output of DIR, followed by the contents of the file
  16337. DIREND, to the file DIRALL:
  16338. c:\> dir | y dirend > dirall
  16339. If you are typing at the keyboard to produce input text for Y, you must
  16340. enter a Ctrl-Z to terminate the input.
  16341. ;---------------------------------------------------------------------------
  16342. ; Command equates ----------------------------------------------------------
  16343. !TOPIC 688 =601 CHDIR
  16344. !TOPIC 691 =609 ERASE
  16345. !TOPIC 692 =639 LOADHIGH
  16346. !TOPIC 693 =644 MKDIR
  16347. !TOPIC 694 =655 RMDIR
  16348. !TOPIC 695 =658 RENAME
  16349. !TOPIC 700 =669 Case: SWITCH keyword
  16350. !NOINDEX
  16351. !TOPIC 701 =669 Default: SWITCH keyword
  16352. !NOINDEX
  16353. !TOPIC 702 =669 Endswitch: SWITCH keyword
  16354. !NOINDEX
  16355. !TOPIC 705 =703 KSTACK.COM
  16356. !NOINDEX
  16357. !TOPIC 706 =704 BATCOMP.EXE
  16358. !NOINDEX
  16359. !TOPIC 707 =615 Iterate: DO keyword
  16360. !NOINDEX
  16361. !TOPIC 708 =615 Leave: DO keyword
  16362. !NOINDEX
  16363. !TOPIC 709 =615 Enddo: DO keyword
  16364. !NOINDEX
  16365. !TOPIC 710 =634 Else: IFF keyword
  16366. !NOINDEX
  16367. !TOPIC 711 =634 Elseiff: IFF keyword
  16368. !NOINDEX
  16369. !TOPIC 712 =634 Endiff: IFF keyword
  16370. !NOINDEX
  16371. !TOPIC 713 =671 Endtext: TEXT keyword
  16372. !NOINDEX
  16373. ;---------------------------------------------------------------------------
  16374. !INDENT 0
  16375. ;---------------------------------------------------------------------------
  16376. !TOPIC 719 Error Messages
  16377. !NOINDEX
  16378. This section lists error messages generated by 4DOS, and includes a
  16379. recommended course of action where appropriate.
  16380. Error messages relating to files are generally reports
  16381. of 218errors returned by DOS. You may find some of these messages
  16382. (for example, "Access denied") vague enough that they are not always
  16383. helpful. 4DOS includes the file name
  16384. in file error messages, but is often unable to determine a more accurate
  16385. explanation of these errors. The message shown is the best information
  16386. available based on the error codes returned by DOS.
  16387. For some errors you are instructed to "restart the session or reboot the
  16388. system." This means that you should attempt to correct the error by
  16389. closing and restarting the current vDosPlus session.
  16390. The following list includes all error messages, in alphabetical order:
  16391. !INDENT 5 0 5 0
  16392. 4DOS.HLP file is out of date, please update it: Your copy of 4DOS.HLP
  16393. appears to be one from an earlier version of 4DOS. Check the date and
  16394. time on 4DOS.HLP. Also check the 384InstallPath setting (if any) in
  16395. 4DOS.INI, it may point to an old directory.
  16396. 4DOS internal stack overflow: You attempted to nest batch files or
  16397. commands like 615DO, 623EXCEPT, 626FOR, 633IF,
  16398. 634IFF, 628GLOBAL, or 662SELECT too deep, and 4DOS ran
  16399. out of stack space. Restructure your command, alias, or batch file, or use
  16400. the 648OPTION command or the 574StackSize directive in 4DOS.INI to
  16401. increase the internal stack size.
  16402. 4DOS initialization error --: An error occurred during the 4DOS
  16403. startup process. Look up the rest of the message in this list for a more
  16404. specific explanation.
  16405. 4DOS server error --: An error occurred in communication between
  16406. 4DOS's resident and transient portions. A more specific error message
  16407. follows (the additional error message can be looked up in this list).
  16408. 4DOS swapping failed, loading in non-swapping mode: None of the
  16409. swapping options worked, so 4DOS loaded in non-swapping mode, which
  16410. requires about 245K more memory than swapping mode. Check your Swapping
  16411. specification with the 648OPTION command or in 4DOS.INI, and/or free some
  16412. EMS memory or disk space.
  16413. 4DOS unrecoverable error XX: An error occurred in the resident portion
  16414. of 4DOS. These errors will terminate secondary shells and, and may require
  16415. you to restart the vDosPlus session if they occur during a primary shell or
  16416. if 4DOS cannot continue. The error codes are:
  16417. BI Bad function code.
  16418. DI Same as Disk swap file corrupted.
  16419. DR Same as Swap file read error.
  16420. DS Same as Swap file seek error.
  16421. EI Same as EMS mapping error.
  16422. NS No number for new shell. You have started too many 4DOS
  16423. secondary shells without properly exiting some of them,
  16424. perhaps by closing DESQview windows rather than EXITing.
  16425. Clean up any work in process and restart the vDosPlus session.
  16426. PT Illegal process termination.
  16427. TS Terminated inactive shell.
  16428. XI Same as XMS move failed.
  16429. Access denied: You tried to write to or erase a read-only file, rename
  16430. a file or directory to an existing name, create a directory that already
  16431. exists, remove a read-only directory or a directory with files or
  16432. subdirectories still in it, or access a file in use by another program in a
  16433. multitasking system.
  16434. Alias loop: An alias refers back to itself either directly or
  16435. indirectly (i.e., a = b = a), or aliases are nested more than 16 levels
  16436. deep. Correct your alias list.
  16437. Already excluded files: You used more than one exclude range in a
  16438. command. Combine the exclusions into a single range.
  16439. Attempt to exit from root shell: Another program has probably
  16440. destroyed a portion of 4DOS's memory. Restart the vDosPlus session.
  16441. AUTOEXEC parameters too long, discarded: The full pathname and
  16442. parameter list for AUTOEXEC.BAT was over 254 characters. This is
  16443. usually due to data in the 375AutoExecPath and/or
  16444. 374AutoExecParms directive in 4DOS.INI. Reduce the amount of
  16445. data and restart the vDosPlus session.
  16446. Bad environment: The DOS environment has a bad structure, probably
  16447. because a program destroyed 4DOS's master environment space. Restart the
  16448. vDosPlus session.
  16449. Batch file missing: 4DOS can't find the batch (.BAT) file it was
  16450. running. It was either deleted, renamed, moved, or the disk was
  16451. changed. Correct the problem and rerun the file.
  16452. Can't copy file to itself: You cannot COPY or MOVE a file to itself.
  16453. 4DOS attempts to perform full path and filename expansion before copying to
  16454. help ensure that files aren't inadvertently destroyed.
  16455. Can't create: 4DOS can't create the specified file. The disk may be
  16456. full or write protected, or the file already exists and is read-only, or
  16457. the root directory is full.
  16458. Can't delete: 4DOS can't delete the specified file or directory. The
  16459. disk is probably write protected.
  16460. Can't get directory: 4DOS can't read the directory. The disk drive is
  16461. probably not ready.
  16462. Can't make directory entry: 4DOS can't create the filename in the
  16463. directory. This is usually caused by a full root directory. Create a
  16464. subdirectory and move some of the files to it.
  16465. Can't open: 4DOS can't open the specified file. Either the file
  16466. doesn't exist or the disk directory or File Allocation Table is damaged.
  16467. Can't remove current directory: You attempted to remove the current
  16468. directory, which DOS does not allow. Change to the parent directory and
  16469. try again.
  16470. Can't set up disk swap file: The disk swap file you specified cannot be
  16471. opened. The path or drive is invalid, the disk is full, DOS is out of file
  16472. handles, or there is a hardware problem. Use the 648OPTION command or
  16473. check 4DOS.INI to be sure your 391Swapping directive is correct.
  16474. Clipboard is empty or not text format: You tried to retrieve some text
  16475. from the Windows clipboard, but there is no text available. Correct the
  16476. contents of the clipboard and try again.
  16477. Clipboard is in use by another program: 4DOS could not access the Windows
  16478. clipboard because another program was using it. Wait until the clipboard is
  16479. available, or complete any pending action in the other program, then try again.
  16480. Command line too long: A single command exceeded 511 characters, or
  16481. the entire command line exceeded 511 characters during alias and variable
  16482. expansion. Reduce the complexity of the command or use a batch file. Also
  16483. check for an alias which refers back to itself either directly or
  16484. indirectly.
  16485. Command only valid in batch file: You have tried to use a batch file
  16486. command, like DO or GOSUB, from the command line or in an alias. A few
  16487. commands can only be used in batch files (see the individual commands for
  16488. details).
  16489. Command tail too long, truncated: A program attempted to pass a
  16490. command in an improper format or a command longer than 126 characters to a
  16491. 4DOS secondary shell. This is probably a bug in the program from which
  16492. 4DOS was loaded. Contact the author of the program for technical assistance.
  16493. Contents lost before copy: COPY was appending files, and found one of
  16494. the source files is the same as the destination. That source file is skipped,
  16495. and appending continues with the next file.
  16496. Data error: DOS can't read or write properly to the device. This error
  16497. may indicate a hardware problem. Retry the operation; if it fails again,
  16498. correct the hardware problem.
  16499. Data segment too large, truncating alias / history lists: The
  16500. total amount of space required for aliases, history, directory
  16501. history, and the 4DOS stack exceeded the space available. Reduce
  16502. the values of the corresponding directives in 4DOS.INI and then
  16503. Restart the vDosPlus session.
  16504. Device not ready: The specified device can't be accessed.
  16505. Directory stack empty: POPD or DIRS can't find any entries in the
  16506. directory stack.
  16507. Disk swap file corrupted: The 4DOS disk swapping file (4DOSSWAP.nnn or
  16508. xxxxxxxx.4SW) has been moved, deleted, or damaged by another program.
  16509. Restart the vDosPlus session.
  16510. Divide by zero: The command or function you used tried to do a
  16511. division by zero. Rearrange the expression, or pre-validate the input
  16512. numbers, to prevent the zero in the divisor.
  16513. Duplicate redirection: You tried to redirect standard input, standard
  16514. output, or stand error more than once in the same command.
  16515. EMS deallocation failed: 4DOS can't deallocate EMS memory when exiting
  16516. from a secondary shell. The EMS map has been corrupted or the memory area
  16517. used by 4DOS has been destroyed by a program. Clean up any work in process
  16518. and restart the vDosPlus session.
  16519. EMS mapping failed: 4DOS can't map EMS pages when swapping to or from
  16520. EMS. The EMS map has been corrupted or the memory area used by the loader
  16521. has been destroyed by a program. Restart the vDosPlus session.
  16522. Encrypted batch files require the runtime version: Encrypted
  16523. batch files cannot be run under the regular command line version of
  16524. 4DOS, the runtime version is required. Run the file under the
  16525. runtime product, or obtain an unencrypted version from the author.
  16526. Environment already saved: You have already saved the environment with
  16527. a previous 665SETLOCAL command. You cannot nest SETLOCAL / ENDLOCAL
  16528. pairs.
  16529. Error in command-line directive: You used the //iniline option to
  16530. place a 4DOS.INI directive on the secondary shell command line, but the
  16531. directive is in error. Usually, a more specific error message
  16532. follows, and can be looked up in this list.
  16533. Error on line [nnnn] of [filename]: There is an error in
  16534. 3514DOS.INI. The following message explains the error in more
  16535. detail. Correct the line in error and restart the vDosPlus session for your
  16536. change to take effect.
  16537. Error reading: DOS experienced an I/O error when reading from a
  16538. device. This is usually caused by a bad disk, a device not ready, or a
  16539. hardware error.
  16540. Error writing: DOS experienced an I/O error when writing to a device.
  16541. This is usually caused by a full disk, a bad disk, a device not ready, or a
  16542. hardware error.
  16543. Exceeded batch nesting limit: You have attempted to nest batch files
  16544. more than 10 levels deep.
  16545. Fatal error -- reboot the system or restart the session: 4DOS cannot
  16546. continue due to the previous error. Restart the vDosPlus session.
  16547. Fatal error, some directives may not have been processed: An I/O error
  16548. occurred while reading your 4DOS.INI file. There may be a physical problem
  16549. with data on the disk or a sharing error on a multitasking system. Check
  16550. your 4DOS.INI file and try again.
  16551. File exists: The requested output file already exists, and 4DOS won't
  16552. overwrite it.
  16553. File is empty: You attempted to use an empty file in 318@SELECT. Correct
  16554. the file name or contents and try again.
  16555. File not found: 4DOS couldn't find the specified file. Check the
  16556. spelling and path name.
  16557. General failure: This is usually a hardware problem, particularly a
  16558. disk drive failure or a device not properly connected to a serial or
  16559. parallel port. Try to correct the problem, restart and try again. Also
  16560. see Data error above.
  16561. I/O error in [filename], some directives may not have been processed:
  16562. An I/O error occurred while reading 3514DOS.INI. There may be a
  16563. physical problem with data on the disk or a sharing error on a multitasking
  16564. system. Check your 4DOS.INI file and try again.
  16565. IDLE is disabled: The BatteryMAX ($IDLE$) device driver has not been
  16566. installed.
  16567. Include file not found: You used the Include directive in the 4DOS.INI
  16568. file, but the file you specified was not found or could not be opened.
  16569. Include files nested too deep: You used the Include directive in the
  16570. 4DOS.INI file, and attempted to nest include files more than three levels
  16571. deep.
  16572. Infinite COPY or MOVE loop: You tried to 606COPY or
  16573. 646MOVE a directory to one of its own subdirectories and used the /S
  16574. switch, so the command would run forever. Correct the command and try
  16575. again.
  16576. Insufficient disk space: 606COPY or 646MOVE ran out of
  16577. room on the destination drive. Remove some files and retry the operation.
  16578. Insufficient load space: There is not enough room in 4DOS's internal
  16579. memory areas to include all of the options you requested in
  16580. 3514DOS.INI.
  16581. Internal DOS error: DOS encountered an internal bug and failed. Restart
  16582. the vDosPlus session.
  16583. Invalid AUTOEXEC filename: You specified an invalid path or filename
  16584. for the AUTOEXEC file with the /P: startup switch. The default name will be
  16585. used instead. Correct the filename, then restart the vDosPlus session.
  16586. Invalid batch file: The batch file is corrupted or improperly
  16587. 115compressed or encrypted. Retry with a new copy of the file.
  16588. Invalid character value: You gave an invalid value for a character
  16589. directive in 3514DOS.INI.
  16590. Invalid choice value: You gave an invalid value for a "choice"
  16591. directive (one that accepts a choice from a list, like "Yes" or "No") in
  16592. 3514DOS.INI.
  16593. Invalid color: You gave an invalid value for a color directive in
  16594. 3514DOS.INI.
  16595. Invalid count: The character repeat count for 638KEYSTACK is incorrect.
  16596. Invalid date: An invalid date was entered. Check the syntax and
  16597. reenter.
  16598. Invalid directive name: 4DOS can't recognize the name of a directive
  16599. in 3514DOS.INI.
  16600. Invalid drive: A bad or non-existent disk drive was specified.
  16601. Invalid .INI file path or name, file not processed: The path or name
  16602. for the initialization file is invalid. Correct the @d:\path\inifile option
  16603. to name the correct file.
  16604. Invalid key name: You tried to make an invalid 481key
  16605. substitution in 4DOS.INI, or you used an invalid key name in a keystroke
  16606. 595alias or command. Correct the error and retry the operation.
  16607. Invalid numeric value: You gave an invalid value for a
  16608. numeric directive in 3514DOS.INI.
  16609. Invalid parameter: 4DOS didn't recognize a parameter. Check the
  16610. syntax and spelling of the command you entered.
  16611. Invalid path: The specified path does not exist. Check the disk
  16612. specification and/or spelling.
  16613. Invalid path or file name: You used an invalid path or filename in a
  16614. directive in 3514DOS.INI.
  16615. Invalid startup switch, ignored: You passed 4DOS an invalid option.
  16616. Correct the switch.
  16617. Invalid Swapping option or path: The swap type or disk swap path in
  16618. the 4DOS.INI 391Swapping directive is invalid. 4DOS ignores the bad
  16619. swap type or path and attempts to scan the rest of the Swapping
  16620. specification for a valid option. Multiple errors in the Swapping
  16621. directive will cause this message to repeat. Use the 648OPTION command
  16622. or an editor to check the Swapping setting in 4DOS.INI, then restart
  16623. vDosPlus.
  16624. Invalid time: An invalid time was entered. Check the syntax and
  16625. reenter.
  16626. Invalid unit: Generally caused by a disk drive hardware failure.
  16627. Keystroke substitution table full: 4DOS ran out of room to store
  16628. 481keystroke substitutions entered in 4DOS.INI. Reduce the number of
  16629. key substitutions.
  16630. KSTACK.COM not loaded: You attempted to execute a 638KEYSTACK
  16631. command without loading KSTACK.COM. See the KEYSTACK command for more
  16632. information.
  16633. Label not found: A GOTO or GOSUB referred to a non-existent label.
  16634. Check your batch file.
  16635. Memory [allocation | deallocation] error: 4DOS can't allocate or
  16636. deallocate memory while loading, or while reserving or releasing memory for
  16637. internal use. DOS memory allocation has been corrupted, or another
  16638. application has reserved memory incorrectly. Restart the vDosPlus session.
  16639. Memory destroyed: The DOS memory control blocks have been corrupted.
  16640. Restart the vDosPlus session.
  16641. Missing ENDTEXT: A 671TEXT command is missing a matching
  16642. ENDTEXT. Check the batch file.
  16643. Missing GOSUB: 4DOS cannot perform the 659RETURN command in a
  16644. batch file. You tried to do a RETURN without a 629GOSUB, or your
  16645. batch file has been corrupted.
  16646. Missing SETLOCAL: An ENDLOCAL was used without a matching SETLOCAL.
  16647. No aliases defined: You tried to display aliases but no aliases have
  16648. been defined.
  16649. No closing quote: 4DOS couldn't find a second matching back-quote
  16650. [`] or double-quote ["] on the command line.
  16651. No expression: The expression passed to the %@EVAL variable function
  16652. is empty. Correct the expression and retry the operation.
  16653. No file handle available: This is an internal 4DOS disk swapping
  16654. error. Change to another swapping method if possible.
  16655. No room for .INI file name: 4DOS does not have enough space to pass the
  16656. name of 3514DOS.INI to secondary shells; see String area overflow
  16657. for more details. Any [Secondary] section in 4DOS.INI will be ignored in
  16658. secondary shells until the problem is corrected and the system or session
  16659. is restarted.
  16660. No UMBs; loading low: The 639LOADHIGH (or LH) command can't find
  16661. any UMBs for your program. The program is loaded into base memory. LH and
  16662. LOADHIGH only work when sufficient upper memory space is available for
  16663. the program.
  16664. No upper memory available, low memory will be used for [resident portion
  16665. | master environment | global aliases | global history | global directory
  16666. history]: You asked 4DOS
  16667. to load the block of memory named in the message into a UMB via the
  16668. corresponding directive in 4DOS.INI (398UMBLoad,
  16669. 395UMBEnvironment, 393UMBAlias, or 397UMBHistory), but no
  16670. UMB was available. Free up some UMB space in use by another program.
  16671. Not a directory: The name passed to 655RD is not a directory.
  16672. Not an alias: The specified alias is not in the alias list.
  16673. Not in environment: The specified variable is not in the environment.
  16674. Not in swapping mode: You attempted to turn swapping on or off with
  16675. the 668SWAPPING command, but 4DOS is loaded in non-swapping mode.
  16676. Not same device: This error usually appears in RENAME. You cannot
  16677. rename a file to a different disk drive.
  16678. Out of environment/alias space: 4DOS has run out of space for
  16679. environment variables or aliases. Edit the 377Environment directive
  16680. in 4DOS.INI to increase the environment size, or the 373Alias directive
  16681. in 4DOS.INI to increase the alias list size.
  16682. Out of memory: 4DOS or DOS had insufficient memory to execute the last
  16683. command, or the memory control blocks have been destroyed. If this error
  16684. occurs in a 4DOS secondary shell, return to the primary shell before
  16685. running the command. Otherwise, try to free some memory by removing
  16686. memory-resident programs.
  16687. If the base memory (DOS RAM) figures reported by MEMORY are unreasonable,
  16688. the memory control blocks have probably been destroyed and you must restart
  16689. the vDosPlus session. If you receive this error from DIR when
  16690. MEMORY shows sufficient memory for the directory you are displaying, memory
  16691. has probably been "fragmented," and contains a free area larger than 12K but
  16692. not large enough for the entire directory. Use a memory mapping program
  16693. like PMAP, MAPMEM, or the DOS MEM utility to locate the fragmentation, and
  16694. experiment with your TSRs and applications to determine and remove its
  16695. cause.
  16696. Overflow: An arithmetic overflow occurred in the 263@EVAL variable
  16697. function. Check the values being passed to @EVAL. @EVAL can handle 20
  16698. digits to the left of the decimal point and 10 to the right.
  16699. Primary shell uses disk swapping, settings will not be inherited:
  16700. This informational message tells you that primary shell options, aliases, etc.
  16701. will not be passed on to secondary shells. See the 391Swapping directive
  16702. in 4DOS.INI for additional information.
  16703. Printer out of paper error: DOS detected an out-of-paper condition on one
  16704. of the printers. Check your printer and add paper if necessary.
  16705. Read fault error: DOS encountered a disk read error; usually caused by a
  16706. bad or unformatted disk. Also see Data error above.
  16707. Region unavailable, using first available region for [resident portion |
  16708. master environment | global aliases | global history | global directory
  16709. history]: You used a
  16710. 3514DOS.INI directive to load the block of memory named in the
  16711. message into a specific UMB region, but that region was unavailable. Check
  16712. the use of upper memory for device drivers and other programs loaded before
  16713. 4DOS, and/or change the requested region number.
  16714. Seek error: DOS can't seek to the proper location on the disk. This
  16715. is generally caused by a bad disk or drive. Also see Data error above.
  16716. Sharing violation: You tried to access a file in use by another
  16717. program. Wait for the file to become available, or change your method of
  16718. operation so that another program does not have the file open while you are
  16719. trying to use it.
  16720. Specified .INI file not found: The file specified with the @inifile
  16721. option on the 4DOS command line does not exist.
  16722. String area overflow: 4DOS ran out of room to store the text from
  16723. string directives in 3514DOS.INI. Reduce the complexity of 4DOS.INI.
  16724. Swap file [seek | read | write] failed: 4DOS encountered an I/O error
  16725. while accessing the disk swap file (4DOSSWAP.nnn or xxxxxxx.4SW). The disk
  16726. was changed, the file has been destroyed by a program, or 4DOS's memory
  16727. area has been overwritten by another program. Restart the vDosPlus session.
  16728. Syntax error: A command or 241variable function was entered in
  16729. an improper format. Check the syntax and correct the error.
  16730. Syntax error in region number or size: You specified an invalid region
  16731. number or size in the 639LH / LOADHIGH command. Correct the command.
  16732. Too many open files: vDosPlus has run out of file handles.
  16733. Unbalanced parentheses: The number of left and right parentheses did
  16734. not match in an expression passed to the @EVAL variable function. Correct
  16735. the expression and retry the operation.
  16736. Unknown command: A command was entered that 4DOS didn't recognize and
  16737. couldn't find in the current search path. Check the spelling or 138PATH
  16738. specification. You can handle unknown commands with the UNKNOWN_CMD alias
  16739. (see 595ALIAS).
  16740. UNKNOWN_CMD loop: The UNKNOWN_CMD alias (see 595ALIAS) called
  16741. itself more than ten times. The alias probably contains an unknown command
  16742. itself, and is stuck in an infinite loop. Correct the alias.
  16743. Variable loop: A nested environment variable refers to itself, or
  16744. variables are nested more than 16 deep. Correct the error and retry the
  16745. command.
  16746. Write fault error: DOS encountered a disk write error; usually caused by
  16747. a bad or unformatted disk. Also see Data error above.
  16748. Write protect error: The disk cannot be written to. Check the disk
  16749. and remove the write-protect tab or close the write-protect window if
  16750. necessary.
  16751. !INDENT 0
  16752. ;---------------------------------------------------------------------------
  16753. !TOPIC 720 Troubleshooting
  16754. !NOINDEX
  16755. These topics may help you to solve problems you are having with 4DOS:
  16756. 751Compatibility
  16757. 752Troubleshooting Compatibility Problems
  16758. 112Debugging Batch Files
  16759. Note that support is not offered for this 731free release of 4DOS.
  16760. ;---------------------------------------------------------------------------
  16761. !TOPIC 731 Unsupported Free Version
  16762. !NOINDEX
  16763. JP Software does not offer technical support for this free version of 4DOS.
  16764. The best place to look for help where other 4DOS users can respond, is:
  16765. https://groups.google.com/forum/#!forum/comp.os.msdos.4dos,
  16766. The section on 720troubleshooting may
  16767. help you resolve compatibility and batch file issues on your own.
  16768. ;---------------------------------------------------------------------------
  16769. !TOPIC 732 Contacting JP Software
  16770. !NOINDEX
  16771. Website of JP Software: https://jpsoft.com.
  16772. Note that technical support is not provided for this 731free release of
  16773. 4DOS.
  16774. ;---------------------------------------------------------------------------
  16775. !TOPIC 751 Compatibility
  16776. !NOINDEX
  16777. This section provides information on using 4DOS with other
  16778. software products. It is intended for use whenever you have a question
  16779. about using another product with 4DOS, or suspect a compatibility
  16780. problem.
  16781. 761DOS
  16782. 841Other Products
  16783. The following general comments apply to all of the compatibility
  16784. information included in this help system.
  16785. If you are having trouble with any other product you should review the
  16786. information here, and also check the discussion of 752Troubleshooting
  16787. Compatibility Problems for diagnostic techniques that may apply to your
  16788. situation.
  16789. Virtually all of your software will work with 4DOS with no trouble.
  16790. Inclusion of a product here does NOT mean there are compatibility
  16791. problems with it! It only indicates that we have some information that
  16792. may be useful to you when you use the product with 4DOS.
  16793. We have made every effort to ensure that our compatibility information
  16794. is as accurate and up to date as possible. Our information is based on
  16795. our own investigations, reports from 4DOS beta testers, technical
  16796. support calls, discussions with manufacturers of other products, and
  16797. reports from our customers. Unfortunately, varying conditions between
  16798. systems or between software releases can easily invalidate the results
  16799. of previous tests. Therefore we cannot guarantee that every item
  16800. included here is accurate for all systems or will remain accurate over
  16801. time; you may have to do your own testing to determine what works well
  16802. on your system with the software you own.
  16803. ;---------------------------------------------------------------------------
  16804. !TOPIC 752 Troubleshooting Compatibility Problems
  16805. !NOINDEX
  16806. As publishers of a product that replaces part of the operating system, we're
  16807. very familiar with these issues -- not because 4DOS is more likely to cause
  16808. problems, but because it sometimes gets blamed first when a problem
  16809. appears. Our technical support department has developed a set of reliable
  16810. techniques for finding out what's causing an apparent compatibility problem
  16811. with 4DOS and other software.
  16812. We are presenting these techniques here as a series of things to try when
  16813. there seems to be a compatibility problem. Some may not make sense for the
  16814. particular problem you're investigating. Others may not yield useful
  16815. results. But as a group, they'll help you resolve many of the common
  16816. software interactions that do appear, whether with 4DOS or anything
  16817. else. Before you get started, be sure to check 751Compatibility to see
  16818. if we've already solved the problem you're facing.
  16819. Some of our suggestions help you figure out what's going on, but aren't
  16820. intended to help you fix it. For example, when we suggest that you remove
  16821. all your TSRs to look for the problem, we aren't suggesting that as a
  16822. permanent solution, but only as a diagnostic test.
  16823. The first thing to consider is whether the particular combination of software
  16824. that's not working used to work together. If so, think carefully about what
  16825. you have changed and see if reversing the change solves the problem. If it
  16826. does, then you can narrow your search, using the following techniques to find
  16827. out what it is about that specific change that is causing the problem.
  16828. Second, make sure that your problem can be reproduced relatively easily, and
  16829. make sure you know exactly what sequence of commands or other steps
  16830. reproduces it. Most interactions are very easy to reproduce, but if you
  16831. think there's an interaction and it occurs once every 10 days, it's going to
  16832. be difficult to know when you have fixed it. Also, the process of carefully
  16833. documenting how to reproduce a problem often helps you realize what the
  16834. problem is without further effort.
  16835. If you have a problem with a specific application hanging or working
  16836. improperly, and the above techniques don't help, then try reducing your
  16837. system configuration to the simplest possible level. This is the single most
  16838. useful tool we know for finding compatibility problems. To do so, use all of
  16839. the approaches listed below, and any other similar things you may be able to
  16840. think of about your particular system after reading our suggestions. When
  16841. you're modifying 3514DOS.INI in an attempt to resolve problems, you may
  16842. find the 383INIQuery directive useful. If you set INIQuery to Yes for a
  16843. section of 4DOS.INI, then 4DOS will prompt you for each line in that
  16844. section. This allows you to test the effects of changing directives in the
  16845. .INI file without actually modifying the file for each test.
  16846. The troubleshooting approaches are divided into the categories:
  16847. !NOWRAP
  16848. 753Path Length
  16849. 754Environment Size
  16850. 755Testing for Interactions
  16851. 756Memory Allocation Conflicts
  16852. 758Advanced Configuration Options
  16853. !WRAP
  16854. ;---------------------------------------------------------------------------
  16855. !TOPIC 753 Path Length
  16856. !NOINDEX
  16857. The first thing to do is to check the length of your 138PATH
  16858. variable. 4DOS lets you make it longer than the traditional limit
  16859. of 123 characters. Some programs can't handle long PATHs and may
  16860. behave strangely. If your PATH is over the traditional limit,
  16861. reduce its size using the 649PATH, 622ESET, or 663SET command
  16862. and see if the application starts working. If so, use a batch file
  16863. or alias to set up an alternate path for running that one program,
  16864. for example:
  16865. setlocal
  16866. path d:\myprog
  16867. d:\myprog\myprog.exe
  16868. endlocal
  16869. The 665SETLOCAL / 621ENDLOCAL pair saves and restores the environment;
  16870. when you're done, the old PATH will be restored automatically.
  16871. ;---------------------------------------------------------------------------
  16872. !TOPIC 754 Environment Size
  16873. !NOINDEX
  16874. Next, check how much environment space is in use in your system. The 4DOS
  16875. 645MEMORY command reports the total environment space and the amount
  16876. free; a simple subtraction tells you how much is in use. Some programs
  16877. simply don't work right if there's a lot of information in the environment
  16878. (these programs don't usually care how big the total environment space is,
  16879. only how much of it is actually in use). In most cases, these problems show
  16880. up when the amount of space in use gets up to around 1K (1024) bytes or so,
  16881. but they can occur at any point. To test for this, use the following simple
  16882. batch file:
  16883. setlocal
  16884. unset var1 var2 var3 ...
  16885. [command to run the program in question]
  16886. endlocal
  16887. where VAR1, VAR2, etc. are variables you can remove from the environment to
  16888. decrease the space in use before running the program.
  16889. ;---------------------------------------------------------------------------
  16890. !TOPIC 755 Testing for Interactions
  16891. !NOINDEX
  16892. To look for a multi-program interaction, you'll need to remove all TSRs you
  16893. possibly can and still have enough software present to demonstrate the
  16894. problem.
  16895. Once you know what you can take out, don't skimp or guess where the
  16896. interaction might be. Take out everything you possibly can from
  16897. 4START and AUTOEXEC.TXT that loads or accesses another program. Remove all
  16898. the lines you can that load memory-resident programs (and remember that some
  16899. DOS utilities can be memory-resident).
  16900. Of course, you should save copies of your configuration files before you
  16901. delete anything. Better yet, use the REM command to remove lines temporarily
  16902. without deleting them. REM can be used on any line in AUTOEXEC.TXT, in
  16903. 4START, and in CONFIG.TXT. If you want to remove everything in AUTOEXEC.TXT
  16904. you can rename it to another name (say AUOTEXEC.SAV), and rename it back when
  16905. you are done testing.
  16906. If the problem isn't there under Window 32-bit (NTVDM), try fiddling with the
  16907. program's configuration. If you were loading it high, try loading it low. If
  16908. you can change the way it uses memory, try doing so. All of these techniques
  16909. will help you narrow down what it is about the program that's causing a
  16910. problem. Once you have done that, you may have a simple workaround.
  16911. Some problems can be resolved by modifying the order in which you load TSRs.
  16912. If you've found a problem with a particular TSR, if possible try loading it
  16913. earlier or later than you were and see if the problem goes away.
  16914. ;---------------------------------------------------------------------------
  16915. !TOPIC 756 Memory Allocation Conflicts
  16916. !NOINDEX
  16917. A memory allocation conflict is very simple. It occurs when two (or more)
  16918. programs try to use the same memory, or when a program behaves differently
  16919. depending on where it is loaded in memory. Inevitably, at least one of the
  16920. programs will operate incorrectly, report an error, or hang. These conflicts
  16921. can be very hard to diagnose, because it's difficult to determine which
  16922. programs are actually causing the conflict, and the symptoms may appear to be
  16923. totally unrelated to the program responsible for the problem.
  16924. 4DOS uses memory in a more complex way than COMMAND.COM. It can use base,
  16925. XMS, or EMS memory, and store portions of itself and its data in UMBs (see
  16926. 896How 4DOS Uses Memory for additional details). COMMAND.COM does
  16927. not offer any of these capabilities. This added complexity
  16928. makes it more likely that you'll encounter memory allocation conflicts with
  16929. 4DOS. This isn't because 4DOS is less reliable than other programs, it's
  16930. because the memory allocation conflict was there waiting to happen, and 4DOS
  16931. triggered it through its access to additional memory.
  16932. It's easy to check whether 4DOS's use of memory is a problem. If you
  16933. configure 4DOS so that it swaps to disk, and disable all use of UMBs, then
  16934. 4DOS uses only base memory, and (in terms of memory allocation) operates very
  16935. much like COMMAND.COM. You can make this change in two simple steps. First,
  16936. add a line containing the following 391Swapping directive to 4DOS.INI:
  16937. Swapping = c:\
  16938. (change this if you prefer to swap to a different drive. Second, remove any
  16939. lines in 4DOS.INI which allocate UMBs (398UMBLoad, 395UMBEnvironment,
  16940. 393UMBAlias, 396UMBFunction, and 397UMBHistory), or place a
  16941. semicolon at the start of such lines to temporarily turn them into comments.
  16942. If these steps solve the problem, you've found a memory allocation
  16943. conflict. The next thing to do is remove all the TSRs you can
  16944. to see if you can determine where the conflict is.
  16945. ;---------------------------------------------------------------------------
  16946. !TOPIC 758 Advanced Configuration Options
  16947. !NOINDEX
  16948. If none of the other techniques have proven useful, some of the
  16949. advanced directives in 4DOS.INI may help solve very rare configuration
  16950. problems. However, unless you are an experienced DOS user and understand the
  16951. side effects of each directive, they should be used only as diagnostic tools
  16952. and not as a workaround or fix. Any of the following can be tried for the
  16953. conditions indicated:
  16954. !INDENT 5 5 5 5
  16955. 568Inherit = No or 556Reduce = No: If you have
  16956. unexplained problems in starting secondary shells.
  16957. 436LineInput = Yes (or 664SETDOS /L1): If you have
  16958. memory-resident programs which do not recognize that you
  16959. are at the prompt (see also 844Other Command Line Editors.)
  16960. 575SwapReopen = Yes: If an application generates
  16961. reproducible errors related to the 4DOS swap file (for example "Swap
  16962. file seek failed" or similar errors).
  16963. ; 555 MaxLoadAddress
  16964. ; 557ReserveTPA Control shell memory allocation
  16965. !INDENT 0
  16966. ;---------------------------------------------------------------------------
  16967. !TOPIC 761 DOS
  16968. !NOINDEX
  16969. This section covers compatibility questions that may arise when running
  16970. 4DOS with vDosPlus, including external DOS programs. Most information
  16971. here covers unusual situations and will not be needed by most users.
  16972. For information on other DOS-related topics, see:
  16973. 763Executing DOS Commands from Applications
  16974. 135COPYCMD Variable
  16975. 136DIRCMD Variable
  16976. 16DOS HELP Command
  16977. 770DOS MOVE Command
  16978. 116REXX Support
  16979. 771DOS SELECT Command
  16980. ;---------------------------------------------------------------------------
  16981. !TOPIC 763 Executing DOS Commands from Applications
  16982. !NOINDEX
  16983. In general you should have no trouble running DOS commands or
  16984. "shelling to DOS" from within your applications. If you do,
  16985. first check your 134COMSPEC setting, and check that enough memory is
  16986. available for 4DOS to execute as a secondary shell. This should
  16987. resolve most problems with "shell to DOS" operations.
  16988. If those techniques do not resolve the problem, it may be due to
  16989. one of the issues covered below: either the application was
  16990. developed with a compiler that does not handle the format of
  16991. 4DOS.COM properly, or it is using interrupt 2E and you have
  16992. disabled interrupt 2E support.
  16993. Compilers and the Format of 4DOS.COM
  16994. If you have an application which can run DOS commands from
  16995. inside the application and that particular feature does not
  16996. work, try to determine if the application was developed with
  16997. Borland C or Lattice C. Some older versions of these
  16998. compilers cannot properly execute 4DOS.COM to start a
  16999. secondary shell, because 4DOS.COM (despite its name) is
  17000. formatted as an EXE file, and the libraries shipped with
  17001. these compilers do not use the proper method to determine
  17002. what type of file they are.
  17003. Re-Enabling Interrupt 2E Support
  17004. COMMAND.COM contains an undocumented feature which allows
  17005. programs to execute DOS commands by passing the command
  17006. through software interrupt number 2E (hex). Not many
  17007. programs use this feature, but full, 798documented support
  17008. for it is available within 4DOS for those circumstances where
  17009. it's needed.
  17010. Interrupt 2E support is normally enabled within 4DOS, but can
  17011. be disabled to save memory (INT 2E support requires about 100
  17012. bytes of resident memory).
  17013. If you have a program which is supposed to execute DOS
  17014. commands and it does not work under 4DOS, check your 4DOS.INI
  17015. file. If you see a line like this:
  17016. 566FullINT2E = No
  17017. then you have disabled INT 2E support. If the line is there,
  17018. try removing this line or replacing it with one reading:
  17019. FullINT2E = Yes
  17020. to re-enable support for interrupt 2E, then restart the vDosPlus session
  17021. and test whether your program works properly.
  17022. ;---------------------------------------------------------------------------
  17023. !TOPIC 770 DOS MOVE Command
  17024. !NOINDEX
  17025. DR DOS 6.0 and above as well as MS-DOS 6.0 or PC DOS 6.1 and above
  17026. all include an external MOVE command which is generally compatible
  17027. with the 4DOS 646MOVE command.
  17028. The syntax and features of the DOS MOVE command are slightly
  17029. different than those offered by 4DOS's MOVE, so batch files
  17030. written for one command may not work exactly the same way with
  17031. the other, especially if more advanced or complex features are
  17032. used. If you write batch files which use both commands, check
  17033. the 4DOS and 65535external DOS documentation for your particular usage.
  17034. ;---------------------------------------------------------------------------
  17035. !TOPIC 771 DOS SELECT Command
  17036. !NOINDEX
  17037. In MS-DOS / PC DOS 4.01 and below, a SELECT command was included. This
  17038. external command is totally unrelated to the 4DOS internal SELECT
  17039. command. If you need to use both, you can set up aliases to
  17040. adjust how the command names are handled. For example, the
  17041. following two aliases set up SELECT to access the DOS 4.0
  17042. external SELECT command (assumed to be stored in C:\DOS\SELECT.EXE),
  17043. and SEL to access the internal 4DOS SELECT command:
  17044. alias select c:\dos\select.exe
  17045. alias sel *select
  17046. ;---------------------------------------------------------------------------
  17047. !TOPIC 841 Compatibility (Other Products)
  17048. !NOINDEX
  17049. This section includes compatibility information on a range of software
  17050. product types and individual products. Because some products are listed
  17051. by type rather than, or (rarely) in addition to, specific listings by
  17052. product name, you should check the lists below carefully to see where
  17053. any particular product may be covered.
  17054. Virtually all of your software will work with 4DOS with no trouble; Most
  17055. of the information here covers unusual situations and will not be needed
  17056. by most users. Inclusion of a product in this section does NOT mean
  17057. there are compatibility problems with it! It only indicates that we
  17058. have some information that may be useful to you when you use the product
  17059. with 4DOS.
  17060. Product Types:
  17061. 8444DOS and Other Command Line Editors
  17062. !INDENT 5 5 5 5
  17063. The information below is listed alphabetically by product, with
  17064. manufacturers' names included. Items marked with two asterisks
  17065. [**] after the product name contain information supplied by users,
  17066. and have not been tested by JP Software.
  17067. Many popular software products are not covered here. If a program
  17068. does not appear here, it simply means that as far as we know no
  17069. additional information is necessary or useful when using that
  17070. program with 4DOS.
  17071. !INDENT 0
  17072. 8611DIR+ (Bourbaki) [**]
  17073. 862Bookshelf CD-ROM (Microsoft) [**]
  17074. 863DESQview (Quarterdeck, now Symantec)
  17075. 865Epsilon (Lugaru Software) [**]
  17076. 867FoxPro (Microsoft) [**]
  17077. 875TSRCOM Utilities (TurboPower Software)
  17078. 876UltraVision (Personics)
  17079. ;---------------------------------------------------------------------------
  17080. !TOPIC 844 4DOS and Other Command Line Editors
  17081. !NOINDEX
  17082. Programs such as Anarkey (Moderne Software), PCED (Cove Software), or
  17083. ReDOS (Multisoft) will work properly with 4DOS.
  17084. However these programs require the use of 664SETDOS /L1 to operate,
  17085. which will disable 4DOS's command recall and command line
  17086. editing. In most cases you will be able to switch back and forth
  17087. between 4DOS editing and the other editor by toggling the SETDOS
  17088. /L state.
  17089. When another editor is used 4DOS's command history will be maintained,
  17090. and can be viewed with the 4DOS 632HISTORY command, but will not be
  17091. available for recall until a SETDOS /L0 is executed. 4DOS
  17092. aliases, executable extensions, and other features will be active
  17093. regardless of the SETDOS /L state. 101Aliases will be processed
  17094. after any processing done by the other editing program. You must
  17095. use care with other programs that provide an aliasing capability
  17096. to avoid confusion if a command is expanded by both the other
  17097. program and 4DOS!
  17098. ;---------------------------------------------------------------------------
  17099. !TOPIC 861 1DIR+ (Bourbaki)
  17100. !NOINDEX
  17101. 1DIR+ will work properly under 4DOS in its partially resident or
  17102. EMS modes when set up as described below. It will work in its
  17103. fully resident mode but cannot reliably exit back to 4DOS once
  17104. started.
  17105. If your copy of 1DIR+ is set up for fully resident mode, you can
  17106. load it into memory under 4DOS to switch it to partially resident
  17107. or EMS mode. To do so, from the directory where you normally run
  17108. 1DIR+, type the commands:
  17109. setdos /l1
  17110. 1dirplus
  17111. When 1DIR+ starts go to the "Wonder" / "Setup" menu and switch
  17112. the mode to partially resident or EMS. Hit Esc to exit, and take
  17113. the "Exit/Save" option (not "Save/Reset"). Back at the main
  17114. menu, exit with "Wonder" / "Exit". At this point the system will
  17115. probably hang. Restart the vDosPlus session. You should then be
  17116. able to run 1DIR+ as described below.
  17117. The above steps only need to be done once, when you install or
  17118. re-install 1DIR+.
  17119. Once 1DIR+ is set to EMS or partially-resident mode, you can
  17120. start it from 4DOS using the following alias:
  17121. alias 1dir `setdos /L1 ^ 1dirplus`
  17122. The SETDOS /L1 is necessary to allow 1DIR+ to send command lines
  17123. to 4DOS.
  17124. You must do a SETDOS /L0 when you are done with 1DIR+ in order to
  17125. get normal 4DOS command-line editing back. You can NOT do this
  17126. within the alias above, as 1DIR+ returns to 4DOS in order to
  17127. accomplish its work, and you don't want to switch back to /L0
  17128. mode until 1DIRPLUS has been removed from memory. If, after
  17129. exiting from 1DIR+, you find that 4DOS's command line editing and
  17130. history are unavailable, it is because you forgot to do the
  17131. SETDOS /L0. If you go in and out of 1DIR+ regularly aliases like
  17132. the following can be used to make the process quick:
  17133. alias 1d `setdos /L1 ^ 1dirplus`
  17134. alias 1e setdos /L0
  17135. If you run batch files from the 1DIRPLUS "compose" feature, you
  17136. may find that INPUT commands in the batch file don't work
  17137. properly unless they are preceded by SETDOS /L0. You must also
  17138. do a SETDOS /L1 before the end of the batch file, or 1DIRPLUS
  17139. won't pop up properly when the batch file is finished. For
  17140. example:
  17141. setdos /l0
  17142. input Enter your name: %%name
  17143. setdos /l1
  17144. ;---------------------------------------------------------------------------
  17145. !TOPIC 862 Bookshelf CD-ROM (Microsoft)
  17146. !NOINDEX
  17147. Microsoft Bookshelf uses the environment variable CDPATH, which
  17148. is also used (for a totally different purpose) by 4DOS. If you
  17149. are using MS Bookshelf and want to set a 049CDPATH variable for
  17150. 4DOS, set 144_CDPATH instead. 4DOS will search for _CDPATH first;
  17151. when it is found, 4DOS will use it, and ignore CDPATH.
  17152. ;---------------------------------------------------------------------------
  17153. !TOPIC 863 DESQview (Quarterdeck, now Symantec)
  17154. !NOINDEX
  17155. 4DOS works well as both the primary shell loaded before DESQview,
  17156. and as the secondary shell loaded inside any DESQview window.
  17157. To use 4DOS as a secondary shell with DESQview, you must add it
  17158. to your DESQview "Open Window" menu. To do this, select the Add
  17159. a Program option, then press the "O" key (for Other Program).
  17160. Press Enter and you will get an Add a Program window. You'll
  17161. need to modify settings on the standard first screen, and on the
  17162. second "advanced options" screen. Set the Program Name to
  17163. C:\4DOS\4DOS.COM (adjust the drive and path for your own
  17164. computer). Set the Parameters to whatever 4DOS startup options
  17165. you want, but do not use /C or /P. For other DESQview
  17166. parameters, the defaults are workable with the following changes:
  17167. To run 4DOS in a full-screen window:
  17168. Writes Text Directly to Screen: Y (screen 1)
  17169. Virtualize Text / Graphics: N (screen 1)
  17170. Close on Exit to DOS: Y (screen 2)
  17171. Uses its Own Colors: Y (screen 2)
  17172. To run 4DOS in a window smaller than the full screen:
  17173. Writes Text Directly to Screen: N (screen 1)
  17174. Virtualize Text / Graphics: Y/T (screen 1)
  17175. Close on Exit to DOS: Y (screen 2)
  17176. Uses its Own Colors: Y (screen 2)
  17177. 4DOS is written to be "DESQview-aware", and will not "bleed
  17178. through" to other windows when running full-screen commands such
  17179. as HELP, LIST, or SELECT.
  17180. You should normally exit a DESQview 4DOS window with the EXIT
  17181. command, rather than with the Close option on DESQview's main
  17182. menu. If you do use the Close option while at the 4DOS prompt,
  17183. 4DOS will be notified of your action and will clean up its
  17184. resources (for example, the shell number and disk swap file in
  17185. use in that window). However this notification has a side-effect: it
  17186. disables the Quit option on the DESQview main menu
  17187. (this is a feature of DESQview). To disable the notification and
  17188. reenable the Quit option, you can use a DVCleanup = No directive
  17189. in 4DOS.INI. If you do so, be sure to exit 4DOS windows with the
  17190. EXIT command to avoid leaving stray swap files on your disk or
  17191. inadvertently using up 4DOS shell numbers.
  17192. Some users report that DESQview uses all upper memory space when
  17193. it loads, leaving no upper memory available to 4DOS. If you have
  17194. 398UMBLoad and / or 395UMBEnvironment set to Yes in 4DOS.INI, this
  17195. will result in a couple of harmless error messages when 4DOS is
  17196. started under DESQview. To eliminate these messages, place the
  17197. following lines at the end of 4DOS.INI:
  17198. [Secondary]
  17199. UMBLoad = No
  17200. UMBEnvironment = No
  17201. DESQview includes the ability to assign "logical drives" to
  17202. subdirectory paths to make access to commonly used directories
  17203. easier, or to support older applications that can't handle
  17204. subdirectories. This is similar to the DOS SUBST command. 4DOS
  17205. commands like DIR and COPY may not work as you expect on DESQview
  17206. logical drives, because DESQview does not support certain
  17207. standard DOS calls which 4DOS uses to determine whether a name
  17208. you enter is the name of a file or a subdirectory. If you are
  17209. using specific filenames without wildcards, 4DOS commands will
  17210. generally work properly on DESQview logical drives. However
  17211. problems may occur with "implied wildcards" (for example, when
  17212. 4DOS interprets DIR A* as DIR A*.*), filename completion, and
  17213. other wildcard file access. We know of no circumstances where
  17214. these problems would cause a loss of data. However for the sake
  17215. of safety, when using DESQview logical drives we suggest you use
  17216. the /N switches on commands like COPY and MOVE to verify the
  17217. command's operation before files are actually modified.
  17218. Under 4DOS, the DESQview DOS Services option will not work in its
  17219. default configuration. To make DOS Services work under 4DOS, you
  17220. must first create a batch file, DOSSERV.BAT, in your DESQview
  17221. directory to run DOS Services under COMMAND.COM. (We are
  17222. assuming that DESQview is in directory C:\DV and COMMAND.COM is
  17223. in directory C:\; you will need to modify the settings below if
  17224. your system is configured differently.) The batch file is:
  17225. set comspec=c:\command.com
  17226. c:\dv\dosserv
  17227. c:\command
  17228. exit
  17229. Then, make the following changes on the DESQview change a program
  17230. screen for DOS Services (items marked ** are on the second page
  17231. of the screen):
  17232. * Memory Allocation = 128K or greater
  17233. * Program Name = C:\DV\DOSSERV.BAT (modify from
  17234. previous value of C:\DV\DOSSERV).
  17235. ** Close on Exit to DOS = N
  17236. ** System Memory = 10K or greater
  17237. ** Allow Close Window = N
  17238. Once these steps are taken, you should be able to open the DOS
  17239. Services window normally. However you will not be able to close
  17240. it with a close window command. Instead, go to the window where
  17241. DOS Services allows you to compose a DOS command, and type EXIT
  17242. to close the window.
  17243. !TOPIC 865 Epsilon (Lugaru Software)
  17244. !NOINDEX
  17245. Epsilon can run 4DOS as a concurrent process, and pass commands
  17246. to 4DOS for execution. In this mode it traps 4DOS's input
  17247. requests and feeds the keystrokes to 4DOS. However it does not
  17248. feed backspaces etc. -- only actual characters. This means that
  17249. editing of input isn't seen by 4DOS. To fix the problem, either
  17250. run 4DOS as a shell, and not as a concurrent process, or use a
  17251. SETDOS /L1 for the copy of 4DOS that is run under Epsilon.
  17252. To use the more flexible SETDOS /L1 approach you must use
  17253. 4START.BAT (or .BTM) to set up the SETDOS /L1 before running
  17254. Epsilon. Epsilon sets the environment variable EPSRUNS=Y
  17255. whenever it starts a secondary shell; you can use this variable
  17256. to set up 4START to work with Epsilon. Place the following line
  17257. in 4START to issue the SETDOS /L1 command in a secondary shell
  17258. started by Epsilon, but ignore it otherwise:
  17259. if "%epsruns"=="Y" setdos /l1
  17260. ;---------------------------------------------------------------------------
  17261. !TOPIC 867 FoxPro (Microsoft)
  17262. !NOINDEX
  17263. FoxPro works well with 4DOS, but may have trouble if 4DOS or the
  17264. master environment is loaded high (in a UMB). If you experience
  17265. compatibility problems between FoxPro and 4DOS, try removing any
  17266. 395UMBEnvironment = Yes line in 4DOS.INI; if that doesn't help, try
  17267. removing any 398UMBLoad = Yes line as well.
  17268. ;---------------------------------------------------------------------------
  17269. !TOPIC 875 TSRCOM Utilities (TurboPower Software)
  17270. !NOINDEX
  17271. The TSRCOM utilities will work properly with 4DOS as long as you
  17272. use TSRCOM version 2.6 or later. The current release is version
  17273. 3.5 or later, and is available on the 4DOS Utility Disk and on
  17274. many bulletin boards and on-line systems.
  17275. If you use TSRCOM's MARK and RELEASE to manage your TSRs, 4DOS
  17276. swapping (as set with the SWAPPING command) must be in the same
  17277. state when RELEASE is run as it was when MARK (or FMARK) was run.
  17278. This is a characteristic of the design of MARK and RELEASE (or
  17279. any other such products), and not a bug. If you do not observe
  17280. this rule (for example, if you run MARK with SWAPPING OFF in
  17281. AUTOEXEC and later run RELEASE from the prompt with SWAPPING ON),
  17282. you may receive unusual error messages or hang your system. The
  17283. same restriction applies to MARKNET and RELNET.
  17284. ;---------------------------------------------------------------------------
  17285. !TOPIC 876 UltraVision (Personics)
  17286. !NOINDEX
  17287. The DE program distributed with UltraVision is written
  17288. specifically for COMMAND.COM, and cannot be used to set directory
  17289. colors with 4DOS. Use 4DOS's built-in directory colorization
  17290. instead.
  17291. ;---------------------------------------------------------------------------
  17292. !TOPIC 891 Miscellaneous Reference Information
  17293. !NOINDEX
  17294. For additional reference information see:
  17295. 892Colors and Color Names
  17296. 893Keys and Key Names
  17297. 894Popup Windows
  17298. 895Executable Files and File Searches
  17299. 896How 4DOS Uses Memory
  17300. 915ANSI Commands
  17301. 798Technical Information for Programmers
  17302. ;---------------------------------------------------------------------------
  17303. !TOPIC 892 Colors and Color Names
  17304. !NOINDEX
  17305. You can use color names in several of the directives in the 3514DOS.INI
  17306. file and in many commands. The general form of a color name is:
  17307. [BRIght] [BLInk] fg ON [BRIght] bg [BORder bc]
  17308. where fg is the foreground or text color, bg is the background
  17309. color, and bc is the border color.
  17310. The available colors are:
  17311. Black Blue Green Red
  17312. Magenta Cyan Yellow White
  17313. Color names and the words BRIght, BLInk, and BORder may be shortened to the
  17314. first 3 letters.
  17315. You can also specify colors by number instead of by name. The numbers are
  17316. most useful in potentially long .INI file directives like ColorDir, where
  17317. using color names may take too much space. The following numbers are
  17318. recognized:
  17319. 0 - Black 8 - Gray (bright black)
  17320. 1 - Blue 9 - Bright blue
  17321. 2 - Green 10 - Bright green
  17322. 3 - Cyan 11 - Bright cyan
  17323. 4 - Red 12 - Bright red
  17324. 5 - Magenta 13 - Bright magenta
  17325. 6 - Yellow 14 - Bright yellow
  17326. 7 - White 15 - Bright white
  17327. Use one number to substitute for the [BRIght] fg portion of the color name,
  17328. and a second to substitute for the [BRIght] bg portion. For example,
  17329. instead of bright cyan on blue you could use 11 on 1 to save space in a
  17330. ColorDir specification.
  17331. There are several subtleties that complicate the use of colors and color
  17332. names. In order to understand them, you will need to read through the
  17333. restrictions described below. These restrictions are due to the design of
  17334. your PC video hardware, BIOS, and video drivers, and are not inherent in
  17335. 4DOS. Some of the restrictions are complex, so feel free to skip over
  17336. those that do not apply to color combinations you use.
  17337. Color Errors
  17338. A standard color specification allows sixteen foreground and eight
  17339. background colors (sixteen if bright backgrounds are enabled, see below).
  17340. However, most video adapters and monitors do not provide true renditions of
  17341. certain colors. For example, most users see normal "yellow" as brown, and
  17342. bright yellow as yellow; many also see normal red as red, and "bright red"
  17343. as pink. Color errors are often much worse when running in windowed mode
  17344. (see above), because the graphical environment that created the window may
  17345. not map the text-mode colors the way you expect. These problems are
  17346. inherent in the monitor, video adapter, and driver software. They cannot
  17347. be corrected using 4DOS color specifications.
  17348. Border Colors
  17349. Border colors do not work in vDosPlus, and will be ignored.
  17350. Blinking Text and Bright Background Colors
  17351. The interactions between blinking characters, bright backgrounds, and your
  17352. display mode can be complex. You will need to understand them if you use
  17353. either attribute in your color specifications.
  17354. ;---------------------------------------------------------------------------
  17355. !TOPIC 893 Keys and Key Names
  17356. !NOINDEX
  17357. Key names are used to define keystroke 595aliases, in several
  17358. 3514DOS.INI directives, and with the 638KEYSTACK command. The
  17359. format of a key name is the same in all three uses:
  17360. [Prefix-]Keyname
  17361. The key prefix can be left out, or it can be any one of the following:
  17362. Alt followed by A - Z, 0 - 9, F1 - F12, or Bksp
  17363. Ctrl followed by A - Z, F1 - F12, Tab, Bksp, Enter, Left, Right,
  17364. Home, End, PgUp, PgDn, Ins, or Del
  17365. Shift followed by F1 - F12 or Tab.
  17366. The possible key names are:
  17367. A - Z Enter PgDn
  17368. 0 - 9 Up Home
  17369. F1 - F12 Down End
  17370. Esc Left Ins
  17371. Bksp Right Del
  17372. Tab PgUp
  17373. All key names must be spelled as shown. Alphabetic keys can be specified
  17374. in upper or lower case. You cannot specify a punctuation key.
  17375. The prefix and key name must be separated by a dash [-]. For example:
  17376. Alt-F10 This is okay
  17377. Alt F10 The space will cause an error
  17378. If you prefer, you can use a numeric value instead of a key name. Use the
  17379. ASCII code for an ASCII, extended ASCII, or control character. Use the
  17380. scan code preceded by an at sign [@] for extended key codes. For example,
  17381. use 13 for Enter, or @59 for F1. In general, you will find it easier
  17382. to use the names described above rather than key numbers. See
  17383. 911ASCII and Key Codes for an explanation and list of ASCII and key codes.
  17384. Some keys are intercepted by your operating system or BIOS and are not
  17385. passed on to 4DOS. For example, Ctrl-S pauses screen output
  17386. temporarily, and on some systems Ctrl-P toggles Print Echo mode (where
  17387. text displayed on the screen is automatically echoed to the printer). Keys
  17388. which are intercepted by DOS or the BIOS generally cannot be assigned to
  17389. aliases or with 481key mapping directives, because 4DOS never
  17390. receives these keystrokes and therefore cannot act on them.
  17391. ;---------------------------------------------------------------------------
  17392. !TOPIC 894 Popup Windows
  17393. !NOINDEX
  17394. Several features of 4DOS display popup windows. A popup window may be used
  17395. to display filenames, recently-executed commands, recently-used directories,
  17396. the results of an extended directory search, or a list created by the SELECT
  17397. command or the @SELECT internal function.
  17398. Popup windows always display a list of choices and a cursor bar. You can
  17399. move the cursor bar inside the window until you find the choice that you wish
  17400. to make, then press the Enter key to select that item.
  17401. Navigation inside any popup window follows the conventions described below.
  17402. Additional information on each specific type of popup window is
  17403. provided where that window is discussed.
  17404. You can control the color, position and size of most popup windows from
  17405. the Windows page of the 648OPTION dialogs. You can also control
  17406. these features with directives in the .INI file, including 440PopupWinLeft,
  17407. PopupWinTop, PopupWinWidth, and PopupWinHeight, and
  17408. 464PopupWinColors. The 048extended directory search window has its
  17409. own specific .INI 417directives and corresponding separate choices in the
  17410. OPTION dialogs. You can also change the keys used in most popup windows with
  17411. 481key mapping directives in the .INI file.
  17412. Once a window is open, you can use the mouse or these keyboard navigation
  17413. keys to find the selection you wish to make:
  17414. Up Arrow Move the selection bar up one line.
  17415. Down Arrow Move the selection bar down one line.
  17416. Left Arrow Scroll the display left 4 columns.
  17417. Right Arrow Scroll the display right 4 columns.
  17418. PgUp Scroll the display up one page.
  17419. PgDn Scroll the display down one page.
  17420. Ctrl-PgUp Go to the beginning of the list.
  17421. (or Home)
  17422. Ctrl-PgDn Go to the end of the list.
  17423. (or End)
  17424. Esc Close the window without making a selection.
  17425. Enter Select the current item and close the window.
  17426. In addition to scrolling through a popup window, you can search the list
  17427. using character matching. If you press a character, the cursor bar will move
  17428. to the next entry that begins with that character. If you type multiple
  17429. characters, the cursor will move to the entry that begins with the search
  17430. string entered to that point (you can enter a search string up to 32
  17431. characters long). If no entry matches the character or string that you have
  17432. typed, 4DOS beeps and does not move the cursor bar.
  17433. ;---------------------------------------------------------------------------
  17434. !TOPIC 895 Executable Files and File Searches
  17435. !NOINDEX
  17436. Once 4DOS knows that it is supposed to run an external command, it tries to
  17437. find an executable file (one with a .COM or .EXE extension) whose name
  17438. matches the command name. It runs the executable file if it finds one.
  17439. If 4DOS cannot find an executable program to run, it next looks for a batch
  17440. file (a file with one or more commands in it) whose name matches the command
  17441. name. 4DOS looks first for a .BTM file, and then for a .BAT file. See
  17442. 103.BAT and .BTM Files for more information on these different types of
  17443. batch files. If 4DOS finds such a file, it then reads each line in the file
  17444. as a new command.
  17445. If the search for a batch file fails, 4DOS checks to see if the command name
  17446. matches the name of a file with an extension that is associated with a
  17447. specific application (for example, if you have associated .DOC with your
  17448. editor or word processor, and you type the name of a .DOC file). See
  17449. 082Executable Extensions to learn how to associate file extensions with
  17450. a particular program. If a match is found, 4DOS runs the program you
  17451. specified when the association was defined.
  17452. 4DOS first searches for an executable program, a batch file, and a file with
  17453. an executable extension in the current directory. If the command name
  17454. doesn't match a .COM, .EXE, .BTM, or .BAT file or an executable extension in
  17455. the current directory, 4DOS repeats its search in every directory in your
  17456. search path. (The standard list of extensions for which to search can
  17457. be modified by setting 477PathExt to Yes in 4DOS.INI, then setting
  17458. the 143PATHEXT variable.)
  17459. The search path is a list of directories that 4DOS (and some applications)
  17460. search for executable files. For example, if you wanted 4DOS to search the
  17461. root directory of the C: drive, the \DOS subdirectory on the C: drive, and
  17462. the \UTIL directory on the D: drive for executable files, your search path
  17463. would look like this:
  17464. PATH=C:\;C:\DOS;C:\UTIL
  17465. Notice that the directory names in the search path are separated by
  17466. semicolons.
  17467. You can create or view the search path with the 649PATH command. You can
  17468. use the 622ESET command to edit the path. Many programs also use the
  17469. search path to find their own files. The search path is stored in the
  17470. environment with the name 138PATH.
  17471. Remember, 4DOS always looks for an executable file or a file with an
  17472. executable extension in the current subdirectory, then in each directory in
  17473. the search path. (You can change the search order so the current directory
  17474. is not searched first; see the 649PATH command for details.)
  17475. If you include an extension as part of the command name, 4DOS only searches
  17476. for a file with that extension. Similarly, if you include a path as part of
  17477. the command name, 4DOS will look only in the directory you
  17478. specified, and ignore the usual search of the current directory and the
  17479. PATH.
  17480. If your command name includes a path, the elements must be separated
  17481. with backslashes (e.g. c:\wp7\wp). If you are accustomed to Unix syntax
  17482. where forward slashes are used in command paths, and want 4DOS to
  17483. recognize this approach, you can set 476UnixPaths to Yes in
  17484. 4DOS.INI.
  17485. The following table sums up the possible search options (the term "standard
  17486. search" refers to the search of the current directory and each directory in
  17487. the search path):
  17488. Command 4DOS Search Sequence
  17489. !INDENT 21 5 5 5
  17490. WP Standard search for any executable file whose base name
  17491. is WP.
  17492. WP.EXE Standard search for WP.EXE; will not find files with
  17493. other extensions.
  17494. C:\WP7\WP Looks in the C:\WP7 directory for any executable file
  17495. whose base name is WP. Does not check the standard search directories.
  17496. C:\WP7\WP.EXE Looks only for the file C:\WP7\WP.EXE.
  17497. LAB.DOC Standard search for LAB.DOC, if .DOC is defined as an
  17498. executable extension. Runs the associated application if the file is
  17499. found.
  17500. C:\LI\LAB.DOC Looks only for the file C:\LI\LAB.DOC, and only if .DOC
  17501. is defined as an executable extension. Runs the associated application
  17502. if the file is found.
  17503. !INDENT 0
  17504. If 4DOS cannot find an executable file, batch program, or a file with an
  17505. executable extension in the current directory or any directory in the search
  17506. path, it looks for an alias called UNKNOWN_CMD (see the 595ALIAS command
  17507. for details). If you have defined an alias with that name, it is executed
  17508. (this allows you to control error handling for unknown commands). Otherwise,
  17509. 4DOS displays an "Unknown command" error message and waits for your next
  17510. instruction.
  17511. ;---------------------------------------------------------------------------
  17512. !TOPIC 896 How 4DOS Uses Memory
  17513. !NOINDEX
  17514. The memory in your computer is organized in bytes. Normally, the amount of
  17515. memory in a computer is discussed in terms of kilobytes (KBytes or 1,024
  17516. bytes) and megabytes (MBytes or 1,048,576 bytes or 1,024 KBytes). The amount
  17517. of memory available in your computer is determined by the number of memory
  17518. chips or memory modules you have installed.
  17519. In an ideal world, there would be little more to say about memory. But
  17520. because of the history of PCs, the needs of large application programs,
  17521. and the capabilities of advanced CPUs, there are many different kinds of
  17522. memory. The original 8088 CPUs of the PC and PC/XT can address 1 MByte
  17523. of memory. Of that, a maximum of 640KBytes is allocated as base,
  17524. conventional, DOS, or low DOS memory (all these terms mean the
  17525. same thing). The other 384 KBytes, known as upper memory, are set
  17526. aside for the computer's built-in ROM BIOS, video adapter cards, hard
  17527. disk controllers, and other expansion hardware.
  17528. When base memory became too limiting, expanded memory (or EMS
  17529. memory) was developed to give programs more data space. Expanded
  17530. memory adds a maximum of 32 MBytes which programs can access, 64KBytes
  17531. at a time, through a window in upper memory. In 8088 / 8086 (PC and
  17532. XT), and 80286 (AT) based computers, expanded memory typically requires
  17533. an add-on board and support software. In 386, 486, and Pentium
  17534. computers, expanded memory is typically provided without additional
  17535. hardware, using the capabilities of the 386 / 486 / Pentium chips.
  17536. The 80286 CPU used in the AT, and modern 386, 486, and Pentium CPUs, can
  17537. use much more than the 8088's original 1 MByte of memory. An 80286 can
  17538. use a total of 16 MBytes, and the 386, 486, and Pentium can use up to
  17539. 4,096 MBytes (4 GBytes) of physical memory. This extended memory
  17540. is not normally available to DOS-based programs, however, without
  17541. special programming techniques and the help of DOS extenders or memory
  17542. managers.
  17543. The memory terms used in the 4DOS help include:
  17544. !INDENT 5 5 5 5
  17545. Base memory: The 640 Kbytes or less that has traditionally been
  17546. available for DOS and DOS-based applications.
  17547. EMS or LIM EMS Memory: Memory which conforms to the Expanded
  17548. Memory Specification, developed by Lotus, Intel, and Microsoft,
  17549. that lets programs and utilities share expanded memory.
  17550. Extended Memory: Memory beyond 1 MB in 80286, 386, 486 and
  17551. Pentium computers. This memory may be accessed directly, in which
  17552. case it is referred to as Extended Memory, or through XMS software,
  17553. in which case it is referred to as XMS Memory.
  17554. XMS Memory: Extended memory managed by software which conforms
  17555. to the Extended Memory Specification (XMS). XMS lets programs
  17556. share extended memory without conflict. This specification divides
  17557. extended memory into extended memory blocks (EMBs). XMS software
  17558. also usually manages the HMA and the UMBs.
  17559. HMA: The first 64K bytes of extended memory, located just
  17560. above 1 MB. Certain specialized programs such as DESQview, some
  17561. network drivers, as well as portions of MS-DOS / PC DOS 5.0 or later
  17562. and of DR DOS 5.0 or later can be loaded into the HMA instead of
  17563. taking up valuable space in base memory.
  17564. UMBs: 386, 486, and Pentium computers can electronically "move"
  17565. pieces of extended memory into unused space in the upper memory
  17566. area between 640KB and 1 MB. Each block of this memory is called
  17567. an Upper Memory Block (UMB). With MS-DOS / PC DOS 5.0 or later,
  17568. DR DOS 5.0 or later, or third-party memory managers like 386MAX
  17569. and QEMM, memory-resident programs can be loaded into these UMBs
  17570. instead of taking up valuable space in base memory. Some 8086,
  17571. 8088, and 80286 systems can also use UMBs with appropriate
  17572. additional hardware and software.
  17573. !INDENT 0
  17574. 4DOS does its best to detect and properly access all types of memory that
  17575. your computer can have. 4DOS always uses standard, documented methods to use
  17576. the memory that you have installed.
  17577. 4DOS uses memory in three ways:
  17578. !INDENT 7 5 5 5
  17579. * By default, 4DOS uses base memory for its resident portion, the
  17580. master environment, and the alias and history lists. Base memory is
  17581. also used to hold the transient portion of 4DOS while your system is
  17582. at the command prompt or executing a 4DOS command or batch file, and
  17583. to create any necessary temporary data areas (for example, to hold the
  17584. filenames to be listed in a directory display, or data being copied
  17585. from one file to another).
  17586. * 4DOS can use EMS memory or an XMS Extended Memory Block (EMB) to
  17587. swap its transient portion, according to the 391Swapping directive
  17588. in your 4DOS.INI file.
  17589. * 4DOS can use Upper Memory Blocks (UMBs) for its resident portion,
  17590. master environment, and global alias and history lists. See
  17591. 897Upper Memory Blocks for more information.
  17592. !INDENT 0
  17593. If you want to know whether 4DOS sees your system's memory accurately, check
  17594. the output of the 645MEMORY command. It should correspond to your
  17595. computer's memory configuration.
  17596. The MEMORY command's output depends to some extent on your memory
  17597. manager. Some memory managers turn your extended memory into either XMS or
  17598. EMS memory as required, so that the same memory is shown both ways in the
  17599. MEMORY report. If 1 MB of extended memory managed by such a memory manager
  17600. is available, MEMORY will report 1 MB of free XMS memory and 1 MB of free
  17601. EMS memory, even though it is all the same memory.
  17602. Memory-related problems with 4DOS are usually due to programs which overwrite
  17603. the extended memory block (EMB) that 4DOS uses for swapping its transient
  17604. portion. When you exit from such a program, your system will hang, because
  17605. 4DOS tried to swap itself back into base memory but its code and data in XMS
  17606. have been destroyed by the program. The same problem can occur with EMS
  17607. swapping but is less common because EMS memory is generally better defended
  17608. against wayward programs. You can diagnose this kind of problem easily by
  17609. changing to disk swapping with the 4DOS.INI 391Swapping directive
  17610. and restart the vDosPlus session. If the problem goes away with disk
  17611. swapping, then the program in question is probably destroying 4DOS's swap
  17612. area in XMS or EMS memory.
  17613. 4DOS EMS swapping sometimes has difficulty with EMS drivers which do not
  17614. fully meet the EMS 3.2 specification (4DOS supports, but does not require,
  17615. EMS 4.0 drivers). If you have trouble accessing EMS for swapping, check
  17616. 751Compatibility to see if there are any known problems with your EMS
  17617. board or the associated driver software.
  17618. ;---------------------------------------------------------------------------
  17619. !TOPIC 897 Upper Memory Blocks (UMBs)
  17620. !NOINDEX
  17621. 4DOS uses UMBs for several purposes:
  17622. !INDENT 7 5 5 5
  17623. * to move the 4DOS resident portion out of base memory, if you
  17624. specify 398UMBLoad = Yes in your 4DOS.INI file.
  17625. * to move the master environment out of base memory, if you specify
  17626. 395UMBEnvironment = Yes in your 4DOS.INI file.
  17627. * to move the global alias and history lists out of base memory, if
  17628. you specify 393UMBAlias = Yes, 396UMBFunction = Yes, or
  17629. 397UMBHistory = Yes in your 4DOS.INI file.
  17630. * to load memory-resident programs (TSRs) "high" using
  17631. the 639LOADHIGH / LH command.
  17632. !INDENT 0
  17633. To load 4DOS, the master environment, or global alias and history lists into
  17634. a UMB, you must be using a memory manager or XMS driver which
  17635. provides both the ability to remap memory into the area between
  17636. 640K and 1MB (to create the UMBs) and XMS or DOS 5.0 UMB support (to manage
  17637. the UMBs). These are generally the same requirements which must be met to
  17638. load TSRs "high."
  17639. Upper Memory Regions
  17640. Upper memory blocks are divided into one or more contiguous regions
  17641. by your memory manager (see your memory manager documentation for additional
  17642. details). All the 4DOS options and commands which allow access to UMBs also
  17643. allow you to specify a particular UMB region. For example, you can load the
  17644. resident portion of 4DOS into upper memory region 1 with a 398UMBLoad = 1
  17645. directive in 4DOS.INI. If you do not specify a particular region (for
  17646. example, if you use UMBLoad = Yes rather than UMBLoad = 1), 4DOS will use the
  17647. first available region.
  17648. ;---------------------------------------------------------------------------
  17649. !TOPIC 911 ASCII and Key Codes
  17650. !NOINDEX
  17651. For ASCII and key code reference tables, see:
  17652. 912ASCII Tables
  17653. 913Key Code and Scan Code Tables
  17654. The remainder of this section gives a detailed explanation of character
  17655. sets, ASCII, and key codes. If you are troubleshooting a keyboard or
  17656. character display problem be sure to read all of the explanation below
  17657. before referring to the tables.
  17658. The translation of a key you type on the keyboard to a displayed character
  17659. on the screen depends on several related aspects of character handling. A
  17660. complete discussion of these topics is well beyond the scope of this
  17661. document. However, a basic picture of the steps in the keystroke and
  17662. character translation process will help you understand how characters are
  17663. processed in your system, and why they occasionally may not come out the way
  17664. you expect.
  17665. Internally, computers use numbers to represent the keys you press and the
  17666. characters displayed on the screen. To display the text that you type, your
  17667. computer and operating system require five pieces of information:
  17668. !INDENT 7 5 5 5
  17669. * The numeric key code for the physical key you pressed.
  17670. * The specific character that key code represents based on your current
  17671. keyboard layout or country setting.
  17672. * The character set currently in use on your system (see below).
  17673. * The international code page in use for that character set.
  17674. * The display font used to display the character.
  17675. !INDENT 0
  17676. The numeric key code is determined by your physical hardware including the
  17677. language that your keyboard is produced for. The character set is usually
  17678. determined by the operating system. These items typically are not under
  17679. your control. However, most systems do allow you to control
  17680. the keyboard country setting, the code page, and the display font.
  17681. For an explanation of how key codes work, see the
  17682. 914Key Codes and Scan Codes Explanation. For a list of key codes and
  17683. scan codes for keys on the standard U.S. keyboard see the
  17684. 913Key Code and Scan Code Tables.
  17685. If the key codes produced by your keyboard, the code page, and the font you
  17686. choose are not fully compatible with each other, the characters displayed on
  17687. the screen will not match what you type. The differences are likely to
  17688. appear in line-drawing characters, "international" (non-English)
  17689. characters, and special symbols, not in commonly-used U.S. English
  17690. alphabetic, numeric, or punctuation characters.
  17691. Most systems use a "single-byte" character set for keyboard and screen
  17692. display. These sets define 256 characters or symbols, with a numeric
  17693. representation for each. ("Double-byte" character sets, with up to 65,536
  17694. characters each, are used for languages with more than 256 symbols, and for
  17695. some multi-lingual systems.) Most PC single-byte character sets are based on
  17696. a code called ASCII, the American Standard Code for Information
  17697. Interchange. For a complete list of ASCII codes see the 912ASCII Table.
  17698. The original ASCII code was defined over 30 years ago for use in mainframe
  17699. and minicomputer systems, and has 128 character values. These include the
  17700. upper and lower case letters, numerals, and punctuation marks used in
  17701. U.S. English, plus non-printing control codes (which can be entered on most
  17702. keyboards by pressing the Ctrl key plus another character, or by pressing
  17703. certain special keys like Tab, Enter, Backspace, and Esc). However,
  17704. ASCII is not a complete character set for the IBM PC, because it defines
  17705. only 128 of the 256 symbols used on PC systems.
  17706. IBM, in its original PC, created a complete 256-character set (called the
  17707. Original Equipment Manufacturer or "OEM" character set) by defining an
  17708. additional 128 extended ASCII codes for math symbols, "international"
  17709. characters, the characters used to draw boxes and lines, and some
  17710. miscellaneous symbols.
  17711. Some operating systems support other character sets; in particular, Windows
  17712. uses the ANSI character set internally to store and display text, even
  17713. though other parts of the system (e.g. the file system which stores file
  17714. names on disk) use IBM's OEM character set. The ANSI character set is
  17715. identical to the OEM character set for U.S. English printed characters, but
  17716. may vary for "international" characters not used in U.S. English. In most
  17717. cases, Windows automatically translates characters from one set to another
  17718. as needed, but problems can sometimes result in errors in displayed text
  17719. (e.g., differences between the appearance of accented characters in
  17720. filenames in Windows and DOS applications).
  17721. See your operating system documentation for more information about character
  17722. sets, code pages, and country and language support. Refer to your operating
  17723. system and/or font documentation for details on the full character set
  17724. available in any particular font.
  17725. The tables in this section are based on U.S. English conventions. Your
  17726. system may differ if it is configured for a different country or
  17727. language. See your operating system documentation for more information
  17728. about country and language support.
  17729. ;---------------------------------------------------------------------------
  17730. !TOPIC 912 ASCII Tables
  17731. !NOINDEX
  17732. For more details on ASCII, character sets, and key codes, see the general
  17733. information topic on 911ASCII and Key Codes.
  17734. Control Characters
  17735. Dec Hex Chr Nam Ctrl ³ Dec Hex Chr Nam Ctrl
  17736. --- --- --- --- ---- ³ --- --- --- --- ----
  17737. 000 00 NUL ^@ ³ 016 10  DLE ^P
  17738. 001 01  SOH ^A ³ 017 11  DC1 ^Q
  17739. 002 02  STX ^B ³ 018 12  DC2 ^R
  17740. 003 03  ETX ^C ³ 019 13  DC3 ^S
  17741. 004 04  EOT ^D ³ 020 14  DC4 ^T
  17742. 005 05  ENQ ^E ³ 021 15  NAK ^U
  17743. 006 06  ACK ^F ³ 022 16  SYN ^V
  17744. 007 07 07 BEL ^G ³ 023 17  ETB ^W
  17745. 008 08 08 BS ^H ³ 024 18  CAN ^X
  17746. 009 09 09 HT ^I ³ 025 19  EM ^Y
  17747. 010 0A 10 LF ^J ³ 026 1A  SUB ^Z
  17748. 011 0B 11 VT ^K ³ 027 1B  ESC ^[
  17749. 012 0C 12 FF ^L ³ 028 1C  FS ^\
  17750. 013 0D 13 CR ^M ³ 029 1D  GS ^]
  17751. 014 0E  SO ^N ³ 030 1E  RS ^^
  17752. 015 0F  SI ^O ³ 031 1F  US ^_
  17753. Punctuation, Digits, Upper Case
  17754. Dec Hex Chr ³ Dec Hex Chr ³ Dec Hex Chr ³ Dec Hex Chr
  17755. --- --- --- ³ --- --- --- ³ --- --- --- ³ --- --- ---
  17756. 032 20 ³ 048 30 0 ³ 064 40 @ ³ 080 50 P
  17757. 033 21 ! ³ 049 31 1 ³ 065 41 A ³ 081 51 Q
  17758. 034 22 " ³ 050 32 2 ³ 066 42 B ³ 082 52 R
  17759. 035 23 # ³ 051 33 3 ³ 067 43 C ³ 083 53 S
  17760. 036 24 $ ³ 052 34 4 ³ 068 44 D ³ 084 54 T
  17761. 037 25 % ³ 053 35 5 ³ 069 45 E ³ 085 55 U
  17762. 038 26 & ³ 054 36 6 ³ 070 46 F ³ 086 56 V
  17763. 039 27 ' ³ 055 37 7 ³ 071 47 G ³ 087 57 W
  17764. 040 28 ( ³ 056 38 8 ³ 072 48 H ³ 088 58 X
  17765. 041 29 ) ³ 057 39 9 ³ 073 49 I ³ 089 59 Y
  17766. 042 2A * ³ 058 3A : ³ 074 4A J ³ 090 5A Z
  17767. 043 2B + ³ 059 3B ; ³ 075 4B K ³ 091 5B [
  17768. 044 2C , ³ 060 3C < ³ 076 4C L ³ 092 5C \
  17769. 045 2D - ³ 061 3D = ³ 077 4D M ³ 093 5D ]
  17770. 046 2E . ³ 062 3E > ³ 078 4E N ³ 094 5E ^
  17771. 047 2F / ³ 063 3F ? ³ 079 4F O ³ 095 5F _
  17772. Lower Case, Miscellaneous
  17773. Dec Hex Chr ³ Dec Hex Chr
  17774. --- --- --- ³ --- --- ---
  17775. 096 60 ` ³ 112 70 p
  17776. 097 61 a ³ 113 71 q
  17777. 098 62 b ³ 114 72 r
  17778. 099 63 c ³ 115 73 s
  17779. 100 64 d ³ 116 74 t
  17780. 101 65 e ³ 117 75 u
  17781. 102 66 f ³ 118 76 v
  17782. 103 67 g ³ 119 77 w
  17783. 104 68 h ³ 120 78 x
  17784. 105 69 i ³ 121 79 y
  17785. 106 6A j ³ 122 7A z
  17786. 107 6B k ³ 123 7B {
  17787. 108 6C l ³ 124 7C |
  17788. 109 6D m ³ 125 7D }
  17789. 110 6E n ³ 126 7E ~
  17790. 111 6F o ³ 127 7F 
  17791. International; Graphics Characters 1
  17792. Dec Hex Chr ³ Dec Hex Chr ³ Dec Hex Chr ³ Dec Hex Chr
  17793. --- --- --- ³ --- --- --- ³ --- --- --- ³ --- --- ---
  17794. 128 80 € ³ 144 90 � ³ 160 A0   ³ 176 B0 °
  17795. 129 81 � ³ 145 91 ‘ ³ 161 A1 ¡ ³ 177 B1 ±
  17796. 130 82 ‚ ³ 146 92 ’ ³ 162 A2 ¢ ³ 178 B2 ²
  17797. 131 83 ƒ ³ 147 93 “ ³ 163 A3 £ ³ 179 B3 ³
  17798. 132 84 „ ³ 148 94 ” ³ 164 A4 ¤ ³ 180 B4 ´
  17799. 133 85 … ³ 149 95 • ³ 165 A5 ¥ ³ 181 B5 µ
  17800. 134 86 † ³ 150 96 – ³ 166 A6 ¦ ³ 182 B6 ¶
  17801. 135 87 ‡ ³ 151 97 — ³ 167 A7 § ³ 183 B7 ·
  17802. 136 88 ˆ ³ 152 98 ˜ ³ 168 A8 ¨ ³ 184 B8 ¸
  17803. 137 89 ‰ ³ 153 99 ™ ³ 169 A9 © ³ 185 B9 ¹
  17804. 138 8A Š ³ 154 9A š ³ 170 AA ª ³ 186 BA º
  17805. 139 8B ‹ ³ 155 9B › ³ 171 AB « ³ 187 BB »
  17806. 140 8C Œ ³ 156 9C œ ³ 172 AC ¬ ³ 188 BC ¼
  17807. 141 8D � ³ 157 9D � ³ 173 AD ­ ³ 189 BD ½
  17808. 142 8E Ž ³ 158 9E ž ³ 174 AE ® ³ 190 BE ¾
  17809. 143 8F � ³ 159 9F Ÿ ³ 175 AF ¯ ³ 191 BF ¿
  17810. Graphics Characters 2; Symbols
  17811. Dec Hex Chr ³ Dec Hex Chr ³ Dec Hex Chr ³ Dec Hex Chr
  17812. --- --- --- ³ --- --- --- ³ --- --- --- ³ --- --- ---
  17813. 192 C0 À ³ 208 D0 Ð ³ 224 E0 à ³ 240 F0 ð
  17814. 193 C1 Á ³ 209 D1 Ñ ³ 225 E1 á ³ 241 F1 ñ
  17815. 194 C2 Â ³ 210 D2 Ò ³ 226 E2 â ³ 242 F2 ò
  17816. 195 C3 Ã ³ 211 D3 Ó ³ 227 E3 ã ³ 243 F3 ó
  17817. 196 C4 Ä ³ 212 D4 Ô ³ 228 E4 ä ³ 244 F4 ô
  17818. 197 C5 Å ³ 213 D5 Õ ³ 229 E5 å ³ 245 F5 õ
  17819. 198 C6 Æ ³ 214 D6 Ö ³ 230 E6 æ ³ 246 F6 ö
  17820. 199 C7 Ç ³ 215 D7 × ³ 231 E7 ç ³ 247 F7 ÷
  17821. 200 C8 È ³ 216 D8 Ø ³ 232 E8 è ³ 248 F8 ø
  17822. 201 C9 É ³ 217 D9 Ù ³ 233 E9 é ³ 249 F9 ù
  17823. 202 CA Ê ³ 218 DA Ú ³ 234 EA ê ³ 250 FA ú
  17824. 203 CB Ë ³ 219 DB Û ³ 235 EB ë ³ 251 FB û
  17825. 204 CC Ì ³ 220 DC Ü ³ 236 EC ì ³ 252 FC ü
  17826. 205 CD Í ³ 221 DD Ý ³ 237 ED í ³ 253 FD ý
  17827. 206 CE Î ³ 222 DE Þ ³ 238 EE î ³ 254 FE þ
  17828. 207 CF Ï ³ 223 DF ß ³ 239 EF ï ³ 255 FF ÿ
  17829. ;NOTE: Don't remove the "invisible" ASCII 255 in the line above!
  17830. You can enter the extended ASCII characters (those with values between 128
  17831. and 255) on the keyboard by holding down the Alt key, entering the
  17832. decimal numeric value of the key on the numeric keypad, and then releasing
  17833. the Alt key.
  17834. ;---------------------------------------------------------------------------
  17835. !TOPIC 913 Key Code and Scan Code Tables
  17836. !NOINDEX
  17837. (For more details on key codes, scan codes, and ASCII see the general
  17838. information on 911ASCII and Key Codes, and the 914Key Codes and Scan
  17839. Codes Explanation.)
  17840. The following table lists all of the keys on the "enhanced" U.S. keyboard.
  17841. Many non-U.S. keyboards are similar, but will not be exactly the same.
  17842. The keys are arranged roughly in scan code order, which is generally left
  17843. to right, moving from the top of the keyboard to the bottom.
  17844. Column 1 shows the key's keycap symbol or name. Columns 2 and 3 show the
  17845. scan code, and the ASCII code if the key is unshifted. Columns 4 and 5
  17846. contain the codes for the shifted key. Columns 6 and 7 show the codes for
  17847. Ctrl plus the key. The last column contains the scan code for Alt plus the
  17848. key (Alt keystrokes have no ASCII code and always generate an ASCII code of
  17849. 0, which is not shown).
  17850. Key names prefaced by np are on the numeric keypad. Those prefaced by cp
  17851. are on the cursor keypad between the main typing keys and the number
  17852. keypad. The numeric keypad values are valid if Num Lock is turned off. If
  17853. you need to specify a number key from the numeric keypad when Num Lock is
  17854. on, use the scan code shown for the keypad and the ASCII code shown for the
  17855. corresponding typewriter key. For example, the keypad "7" has a scan code
  17856. of 71 (the np Home scan code) and an ASCII code of 54 (the ASCII code for
  17857. "7").
  17858. The chart is blank for key combinations that are not reported at all by the
  17859. BIOS, like Ctrl-1 and Alt-PgUp. Some entries are shown in parentheses
  17860. to indicate that they are not supported on all systems under
  17861. all circumstances.
  17862. Top Keyboard Row
  17863. Shift Shift Ctrl Ctrl Alt
  17864. Key Scan ASCII Scan ASCII Scan ASCII Scan
  17865. Esc 1 27 1 27 1 27 1
  17866. 1 ! 2 49 2 33 120
  17867. 2 @ 3 50 3 64 3 0 121
  17868. 3 # 4 51 4 35 122
  17869. 4 $ 5 52 5 36 123
  17870. 5 % 6 53 6 37 124
  17871. 6 ^ 7 54 7 94 7 30 125
  17872. 7 & 8 55 8 38 126
  17873. 8 * 9 56 9 42 127
  17874. 9 ( 10 57 10 40 128
  17875. 0 ) 11 48 11 41 129
  17876. - _ 12 45 12 95 12 31 130
  17877. = + 13 61 13 43 131
  17878. Backspace 14 8 14 8 14 127 14
  17879. Second Keyboard Row
  17880. Shift Shift Ctrl Ctrl Alt
  17881. Key Scan ASCII Scan ASCII Scan ASCII Scan
  17882. Tab 15 9 15 0 148 0 165
  17883. Q 16 113 16 81 16 17 16
  17884. W 17 119 17 87 17 23 17
  17885. E 18 101 18 69 18 5 18
  17886. R 19 114 19 82 19 18 19
  17887. T 20 116 20 84 20 20 20
  17888. Y 21 121 21 89 21 25 21
  17889. U 22 117 22 85 22 21 22
  17890. I 23 105 23 73 23 9 23
  17891. O 24 111 24 79 24 15 24
  17892. P 25 112 25 80 25 16 25
  17893. [ { 26 91 26 123 26 27 26
  17894. ] } 27 93 27 125 27 29 27
  17895. Enter 28 13 28 13 28 10 28
  17896. Third Keyboard Row
  17897. Shift Shift Ctrl Ctrl Alt
  17898. Key Scan ASCII Scan ASCII Scan ASCII Scan
  17899. A 30 97 30 65 30 1 30
  17900. S 31 115 31 83 31 19 31
  17901. D 32 100 32 68 32 4 32
  17902. F 33 102 33 70 33 6 33
  17903. G 34 103 34 71 34 7 34
  17904. H 35 104 35 72 35 8 35
  17905. J 36 106 36 74 36 10 36
  17906. K 37 107 37 75 37 11 37
  17907. L 38 108 38 76 38 12 38
  17908. ; : 39 59 39 58 39
  17909. ' " 40 39 40 34 40
  17910. ` ~ 41 96 41 126 41
  17911. \ | 43 92 43 124 43 28 43
  17912. Fourth Keyboard Row
  17913. Shift Shift Ctrl Ctrl Alt
  17914. Key Scan ASCII Scan ASCII Scan ASCII Scan
  17915. Z 44 122 44 90 44 26 44
  17916. X 45 120 45 88 45 24 45
  17917. C 46 99 46 67 46 3 46
  17918. V 47 118 47 86 47 22 47
  17919. B 48 98 48 66 48 2 48
  17920. N 49 110 49 78 49 14 49
  17921. M 50 109 50 77 50 13 50
  17922. , < 51 44 51 60 51
  17923. . > 52 46 52 62 52
  17924. / ? 53 47 53 63 53
  17925. Space 57 32 57 32 57 32 57
  17926. Function Keys
  17927. Shift Shift Ctrl Ctrl Alt
  17928. Key Scan ASCII Scan ASCII Scan ASCII Scan
  17929. F1 59 0 84 0 94 0 104
  17930. F2 60 0 85 0 95 0 105
  17931. F3 61 0 86 0 96 0 106
  17932. F4 62 0 87 0 97 0 107
  17933. F5 63 0 88 0 98 0 108
  17934. F6 64 0 89 0 99 0 109
  17935. F7 65 0 90 0 100 0 110
  17936. F8 66 0 91 0 101 0 111
  17937. F9 67 0 92 0 102 0 112
  17938. F10 68 0 93 0 103 0 113
  17939. F11 (133) (0) (135) (0) (137) (0) (139)
  17940. F12 (134) (0) (136) (0) (138) (0) (140)
  17941. ;NOTE: F11 and F12 are not physically available on all keyboards,
  17942. ; including old PC keyboards and some laptop / palmtop keyboards.
  17943. Numeric Keypad
  17944. Shift Shift Ctrl Ctrl Alt
  17945. Key Scan ASCII Scan ASCII Scan ASCII Scan
  17946. np * 55 42 55 42 150 0 55
  17947. np Home 71 0 71 55 119 0
  17948. np Up 72 0 72 56 (141) (0)
  17949. np PgUp 73 0 73 57 132 0
  17950. np Minus 74 45 74 45 142 0 74
  17951. np Left 75 0 75 52 115 0
  17952. np 5 76 0 76 53 143 0
  17953. np Right 77 0 77 54 116 0
  17954. np Plus 78 43 78 43 144 0 78
  17955. np End 79 0 79 49 117 0
  17956. np Down 80 0 80 50 (145) (0)
  17957. np PgDn 81 0 81 51 118 0
  17958. np Ins 82 0 82 48 (146) (0)
  17959. np Del 83 0 83 46 (147) (0)
  17960. np / 224 47 224 47 149 0 164
  17961. np Enter 224 13 224 13 224 10 166
  17962. ;NOTE: Entries in parentheses according to IBM documentation.
  17963. Cursor Keypad
  17964. Shift Shift Ctrl Ctrl Alt Alt
  17965. Key Scan ASCII Scan ASCII Scan ASCII Scan ASCII
  17966. cp Home (71) (224) (71) (224) (119) (224) (151) (224)
  17967. cp Up (72) (224) (72) (224) (141) (224) (152) (224)
  17968. cp PgUp (73) (224) (73) (224) (132) (224) (153) (224)
  17969. cp Left (75) (224) (75) (224) (115) (224) (155) (224)
  17970. cp Right (77) (224) (77) (224) (116) (224) (157) (224)
  17971. cp End (79) (224) (79) (224) (117) (224) (159) (224)
  17972. cp Down (80) (224) (80) (224) (145) (224) (160) (224)
  17973. cp PgDn (81) (224) (81) (224) (118) (224) (161) (224)
  17974. cp Ins (82) (224) (82) (224) (146) (224) (162) (224)
  17975. cp Del (83) (224) (83) (224) (147) (224) (163) (224)
  17976. ;---------------------------------------------------------------------------
  17977. !TOPIC 914 Key Codes and Scan Codes Explanation
  17978. !NOINDEX
  17979. (This section explains how key codes and scan codes work. For a reference
  17980. chart, see 913Key Code and Scan Code Tables.)
  17981. When you press a single key or a key combination, software built into your
  17982. computer (the BIOS or Basic Input / Output System, or the operating
  17983. system)
  17984. translates your keystroke into two numbers: a scan code, representing the
  17985. actual key that was pressed, and an ASCII code, representing the ASCII
  17986. value for that key. The BIOS returns these numbers the next time a program
  17987. requests keyboard input. This section explains how key codes work; for
  17988. information on using them with 4DOS see 4DOS.INI 481key mapping
  17989. directives, 595keystroke aliases, 635INKEY, and 638KEYSTACK.
  17990. Most 4DOS commands that use the numeric key codes listed here also use key
  17991. names, which are usually more convenient to use than the numeric codes.
  17992. See 893Keys and Key Names for more information on key names.
  17993. As PCs have evolved, the structure of keyboard codes has evolved somewhat
  17994. haphazardly with them, resulting in a bewildering array of possible key
  17995. codes. We'll give you a basic explanation of how key codes work. For a
  17996. more in-depth discussion, refer to a BIOS or PC hardware reference manual.
  17997. The nuances of how your keyboard behaves depends on the keyboard
  17998. manufacturer, the computer manufacturer who provides the built-in BIOS, and
  17999. your operating system. As a result, we can't guarantee the accuracy of the
  18000. key code information for every system, but the discussion and reference table
  18001. should be accurate for most systems. Our discussion is based on the
  18002. "enhanced" keyboard commonly used on 286, 386, 486, and Pentium computers,
  18003. but virtually all of it is applicable to the 84-key keyboards on older
  18004. systems. The primary difference is that older keyboards lack a separate
  18005. cursor pad and only have 10 function keys.
  18006. All keys have a scan code, but not all have an ASCII code. For example,
  18007. function keys and cursor keys are not part of the ASCII character set and
  18008. have no ASCII value, but they do have a scan code. Some keys have more
  18009. than one ASCII code. The A, for example, has ASCII code 97 (lower case
  18010. "a") if you press it by itself. If you press it along with Shift, the
  18011. ASCII code changes to 65 (upper case "A"). If you press Ctrl and A
  18012. the ASCII code changes to 1. In all these cases, the scan code (30) is
  18013. unchanged because you are pressing the same physical key.
  18014. Things are different if you press Alt-A. Alt keystrokes have no
  18015. ASCII code, so the BIOS returns an ASCII code of 0, along with the A
  18016. key's scan code of 30. This allows a program to detect all the possible
  18017. variations of A, based on the combination of ASCII code and scan code.
  18018. Some keys generate more than one scan code depending on whether Shift,
  18019. Ctrl, or Alt is pressed. This allows a program to differentiate
  18020. between two different keystrokes on the same key, neither of which has a
  18021. corresponding ASCII value. For example, F1 has no ASCII value so it
  18022. returns an ASCII code of 0, and the F1 scan code of 59. Shift-F1
  18023. also returns an ASCII code 0; if it also returned a scan code of 59, a
  18024. program couldn't distinguish it from F1. The BIOS or operating
  18025. system translates scan codes for keys like Shift-F1 (and Ctrl-F1
  18026. and Alt-F1) so that each variation returns a different scan code
  18027. along with an ASCII code of 0.
  18028. On the enhanced keyboard there's one more variation: non-ASCII keys on the
  18029. cursor keypad (such as up-arrow) return the same scan code as the
  18030. corresponding key on the numeric keypad, for compatibility reasons. If
  18031. they also returned an ASCII code of 0, a program couldn't tell which key
  18032. was pressed. Therefore, these cursor pad keys return an ASCII code of 224
  18033. rather than 0. This means that older programs, which only look for an ASCII 0 to
  18034. indicate a non-ASCII keystroke like up-arrow, may not detect these cursor
  18035. pad keys properly.
  18036. The number of different codes returned by any given key varies from one
  18037. (for the spacebar) to four, depending on the key, the design of your
  18038. keyboard, and the BIOS or operating system. Some keys, like Alt,
  18039. Ctrl, and Shift by themselves or in combination with each other,
  18040. plus Print Screen, SysReq, Scroll Lock, Pause, Break,
  18041. Num Lock, and Caps Lock keys, do not have any code representations
  18042. at all. The same is true of keystrokes with more than one modifying key,
  18043. like Ctrl-Shift-A. The BIOS or operating system may perform special
  18044. actions automatically when you press these keys (for example, it switches
  18045. into Caps Lock mode when you press Caps Lock), but it does not report
  18046. the keystrokes to whatever program is running. Programs which detect such
  18047. keystrokes access the keyboard hardware directly, a subject which is beyond
  18048. the scope of this help system.
  18049. ;---------------------------------------------------------------------------
  18050. !TOPIC 915 ANSI Commands
  18051. !NOINDEX
  18052. This section is a quick-reference to commonly-used ANSI X3.64
  18053. commands.
  18054. An ANSI.SYS command string consists of three parts:
  18055. !NOWRAP
  18056. ESC[ The ASCII character ESC, followed by a left bracket.
  18057. These two characters must be present in all ANSI
  18058. strings.
  18059. parameters Optional parameters for the command. If there are
  18060. multiple parameters they are separated by semicolons.
  18061. cmd A single-letter command. The case of the letter is
  18062. meaningful.
  18063. !WRAP
  18064. For example, to position the cursor to row 7, column 12 the ANSI command
  18065. is:
  18066. ESC[7;12H
  18067. To transmit ANSI commands to the screen with 4DOS, you should use the
  18068. 619ECHO command. The ESC character can be generated by inserting it
  18069. into the string directly (if you are putting the string in a batch
  18070. file and your editor will insert such a character), or by using 4DOS's
  18071. internal 086escape character followed by a lower-case "e". For example,
  18072. the sequence shown above could be transmitted from a batch file with either
  18073. of these commands (the first uses an ESC character directly; the second
  18074. uses %=e):
  18075. echo 
  18076. echo %=e[7;12H
  18077. You can also include ANSI commands in your prompt, using $e to transmit the
  18078. ESC character. You can NOT use PROMPT to transmit ANSI commands to the
  18079. screen from a batch file (see 652PROMPT).
  18080. Commands
  18081. !NOWRAP
  18082. Command Description
  18083. ------------------ --------------------------------------------------
  18084. ESC[rowsA Cursor up (CUU)
  18085. ESC[rowsB Cursor down (CUD)
  18086. ESC[colsC Cursor right (CUF)
  18087. ESC[colsD Cursor left (CUB)
  18088. ESC[row;colH Set cursor position (top left: row 1, col 1) (CUP)
  18089. ESC[2J Clear screen (ED)
  18090. ESC[K Clear from cursor to end of line (EL)
  18091. ESC[row;colf Set cursor position, same as "H" command (HVP)
  18092. ESC[=modeh Set display mode; see mode table below (SM)
  18093. ESC[=model Set display mode; see mode table below (RM)
  18094. ESC[attr;attr;..m Set display attributes; see table of attribute
  18095. values below (SGR)
  18096. ESC[key;string;..p Substitute "string" for the specified key; see
  18097. key substitutions section below. (KR)
  18098. ESC[s Save cursor position (may not be nested) (SCP)
  18099. ESC[u Restore cursor position after a save (RCP)
  18100. !WRAP
  18101. Display Attributes
  18102. !NOWRAP
  18103. Attribute Description
  18104. --------- ---------------------------------------------------
  18105. 0 All attributes off (normal white on black)
  18106. 1 High intensity (bold)
  18107. 2 Normal intensity
  18108. 4 Underline (usually effective only on monochrome displays)
  18109. 5 Blinking
  18110. 7 Reverse Video
  18111. 8 Invisible
  18112. 30-37 Set the foreground color (according to ISO 6429):
  18113. 30=Black 31=Red 32=Green 33=Yellow
  18114. 34=Blue 35=Magenta 36=Cyan 37=White
  18115. 40-47 Set the background color (according to ISO 6429):
  18116. 40=Black 41=Red 42=Green 43=Yellow
  18117. 44=Blue 45=Magenta 46=Cyan 47=White
  18118. !WRAP
  18119. Settings are cumulative, so (for example) to set bright red foreground set
  18120. all attributes off, then set red, then bold: echo _[0;31;1m.
  18121. Display Modes
  18122. !NOWRAP
  18123. Mode Description
  18124. ---- ---------------------------------------------------
  18125. 0 Text 40x25 monochrome
  18126. 1 Text 40x25 color
  18127. 2 Text 80x25 monochrome
  18128. 3 Text 80x25 color
  18129. 4 Graphics 320x200 4-color
  18130. 5 Graphics 320x200 4-color
  18131. 6 Graphics 640x200 2-color
  18132. 7 (cursor wrap kludge)
  18133. !WRAP
  18134. Mode 7 is an unfortunate kludge; Setting mode 7 with an "h" command tells
  18135. ANSI to wrap text to the next line when it passes the end of a line;
  18136. setting mode 7 with an "l" (lower-case L) command tells ANSI not to wrap
  18137. text. For all other modes the "h" and "l" commands are equivalent.
  18138. Key Substitutions
  18139. The key substitutions ("p") command causes ANSI to substitute the text in
  18140. "string" when the specified key is pressed. The key code can be a single
  18141. character in quotes, a numeric ASCII value, or an extended code for a non
  18142. ASCII key (e.g. function or cursor keys) in the form 0;n, where n is the
  18143. scan code for the key.
  18144. The string to be substituted can be a single character or character string
  18145. in quotes, a numeric ASCII value, or an extended key code.
  18146. For a list of numeric ASCII values, see 912ASCII Tables. For a list of
  18147. extended key codes see 913Key Code and Scan Code Tables.
  18148. To clear a key substitution, "substitute" the original key for itself.
  18149. ;---------------------------------------------------------------------------
  18150. !TOPIC 941 File Systems and File Name Conventions
  18151. !NOINDEX
  18152. !TTY
  18153. You may have dozens, hundreds, or thousands of files stored on your
  18154. computer's disks. Your operating system is responsible for managing all of
  18155. these files. In order to do so, it uses a unique name to locate each file
  18156. in much the same way that the post office assigns a unique address to every
  18157. residence.
  18158. The unique name of any file is composed of a drive letter, a directory
  18159. path, and a filename. Each of these parts of the file's name is case
  18160. insensitive; you can mix upper and lower case letters in any way you wish.
  18161. The topics below are roughly divided according to the different parts of a
  18162. file name, and cover the file system structure and naming conventions:
  18163. !NOWRAP
  18164. 942Drives and Volumes
  18165. 944Directories and Subdirectories
  18166. 945File Names
  18167. 946File Attributes and Time Stamps
  18168. !WRAP
  18169. ;---------------------------------------------------------------------------
  18170. !TOPIC 942 Drives and Volumes
  18171. !NOINDEX
  18172. !TTY
  18173. A drive letter designates which drive contains the file. In a file's full
  18174. name, the drive letter is followed by a colon.
  18175. Normally, drive C: is the first (or only) hard disk drive. Windows can
  18176. divide a large hard disk into multiple logical drives or volumes that are
  18177. usually called C:, D:, E:, etc. Network systems (LANs) give
  18178. additional drive letters to sections of the network file server drives.
  18179. Additional information about disk files and directories is available under
  18180. 944Directories and Subdirectories, 945File Names, and
  18181. 946File Attributes and Time Stamps.
  18182. ;---------------------------------------------------------------------------
  18183. !TOPIC 944 Directories and Subdirectories
  18184. !NOINDEX
  18185. !TTY
  18186. A file system is a method of organizing all of the files on an entire disk
  18187. or hard disk volume. Directories are used to divide the files on a disk
  18188. into logical groups that are easy to work with. Their purpose is similar to
  18189. the use of file drawers to contain groups of hanging folders, hanging
  18190. folders to contain smaller manila folders, and so on. Directories are also
  18191. sometimes referred to as folders.
  18192. Every drive has a root or base directory, and many have one or more
  18193. subdirectories. Subdirectories can also have subdirectories, extending in a
  18194. branching tree structure from the root directory. The collection of all
  18195. directories on a drive is often called the directory tree, and a portion of
  18196. the tree is sometimes called a subtree. The terms directory and
  18197. subdirectory are typically used interchangeably to mean a single
  18198. subdirectory within this tree structure.
  18199. Subdirectory names follow the same rules as file names (see 945File Names).
  18200. The drive and subdirectory portions of a file's name are collectively called
  18201. the file's path. For example, the file name C:\DIR1\DIR2\MYFILE.DAT says to
  18202. look for the file MYFILE.DAT in the subdirectory DIR2 which is part of the
  18203. subdirectory DIR1 which is on drive C. The path for MYFILE.DAT is
  18204. C:\DIR1\DIR2. The backslashes between subdirectory names are required. On
  18205. NTFS, and LFN volumes the path and file name must each be 255 characters or
  18206. less in length, and in addition the total length of the path and file name
  18207. together cannot exceed 260 characters.
  18208. The operating system remembers a current or default directory for
  18209. every drive in your system. Whenever a program tries to create or access a
  18210. file without specifying the file's path, the operating system uses the current
  18211. drive (if no other drive is specified) and the current directory (if no other
  18212. directory path is specified).
  18213. The root directory is named using the drive letter and a single backslash.
  18214. For example, D:\ refers to the root directory of drive D:. Using a drive letter
  18215. with no directory name at all refers to the current directory on the specified
  18216. drive. For example, E:README.DOC refers to the file README.DOC in the current
  18217. directory on drive E:, whereas E:\README.DOC refers to the file README.DOC in
  18218. the root directory on drive E:.
  18219. There are also two special subdirectory names that are useful in many
  18220. situations: a single period by itself [.] means "the current default
  18221. directory." Two periods together [..] means "the directory which contains
  18222. the current default directory" (often referred to as the parent directory).
  18223. These special names can be used wherever a full directory name can be used.
  18224. 4DOS allows you to use additional periods to specify directories further "up"
  18225. the tree (see 072Extended Parent Directory Names).
  18226. Additional information about disk files and file systems is available under
  18227. 942Drives and Volumes, 945File Names, and
  18228. 946File Attributes and Time Stamps.
  18229. ;---------------------------------------------------------------------------
  18230. !TOPIC 945 File Names
  18231. !NOINDEX
  18232. !TTY
  18233. A 8.3 filename consists of a base name of 1 to 8 characters plus an
  18234. optional extension composed of a period plus 1 to 3 more characters.
  18235. Traditional FAT filenames with an 8-character name and a 3-character
  18236. extension are sometimes referred to as short filenames (SFNs) to distinguish
  18237. them from long filenames (LFNs).
  18238. You can use alphabetic and numeric characters plus the punctuation marks ! #
  18239. $ % & ' ( ) - @ ^ _ ` { } and ~ in both the base name and the extension
  18240. of a FAT filename. Because the exclamation point [!], percent sign [%],
  18241. caret [^], at sign [@], parentheses [()], and back-quote [`] also
  18242. have other meanings to 4DOS, it is best to avoid using them in filenames.
  18243. The LFN file systems allow file names with a maximum of 255 characters,
  18244. including spaces and other characters that are not allowed in a FAT system
  18245. file name, but excluding some punctuation characters which are allowed in
  18246. FAT file names. See your operating system documentation for details on the
  18247. characters allowed. If you use file names which contain semicolons [;],
  18248. see 073Wildcards for details on avoiding problems with interpretation
  18249. of those file names under 4DOS.
  18250. LFN file names are stored and displayed exactly as you entered them, and are
  18251. not automatically shifted to upper or lower case. For example, you could
  18252. create a file called MYFILE, myfile, or MyFile, and each name would be stored
  18253. in the directory just as you entered it. However, case is ignored when
  18254. looking for filenames, so you cannot have two files whose names differ only
  18255. in case (i.e., the three names given above would all refer to the same file).
  18256. This behavior is sometimes described as "case-retentive but not case
  18257. sensitive" because the case information is retained, but does not affect
  18258. access to the files.
  18259. Files stored on LFN volumes often have "FAT-compatible" names: names which
  18260. contain only those characters legal on a FAT volume, and which meet the 8
  18261. character name / 3 character extension limits. Programs which cannot handle
  18262. long names (for example, DOS programs accessing a VFAT drive under Windows
  18263. 95/98/ME) generally can access files by using FAT-compatible names.
  18264. If a file name includes spaces or other characters that would not be allowed
  18265. in a FAT name, you must place double quotes around the name. For example,
  18266. suppose you have a file named LET3 on a FAT volume, and you want to copy it
  18267. to the LETTERS directory on drive F:, a FAT32 partition, and give it the name
  18268. "Letter To Sara". To do so, use either of these commands:
  18269. c:\wp> copy let3 f:\LETTERS\"Letter To Sara"
  18270. c:\wp> copy let3 "f:\LETTERS\Letter To Sara"
  18271. LFN file systems do not explicitly define an "extension" for file names which
  18272. are not FAT-compatible. However, by convention, all characters after the last
  18273. period in the file name are treated as the extension. For example, the file
  18274. name "Letter to Sara" has no extension, whereas the name "Letter.to.Sara" has
  18275. the extension Sara.
  18276. Additional information about disk files and file systems is available under
  18277. 942Drives and Volumes, 944Directories and Subdirectories, and
  18278. 946File Attributes and Time Stamps.
  18279. ;---------------------------------------------------------------------------
  18280. !TOPIC 946 File Attributes and Time Stamps
  18281. !NOINDEX
  18282. !TTY
  18283. Each file also has attributes, and one or more time stamps. Attributes
  18284. define characteristics of the file which may be useful to the operating
  18285. system, to you, or to an application program. Time stamps can record when
  18286. the file was created, last modified, or last accessed. Most 4DOS file
  18287. processing commands allow you to select files for processing based on their
  18288. attributes and/or time stamp(s).
  18289. Each file on your system has four standard attributes. Every time a program
  18290. modifies a file, the operating system sets the Archive attribute, which
  18291. signals that the file has been modified since it was last backed up. This
  18292. attribute can be used by 4DOS to determine which files to 606COPY, and by
  18293. backup programs to determine which files to back up. When the Read-only
  18294. attribute is set, the file can't be changed or erased accidentally; this can
  18295. be used to help protect important files from damage. The Hidden and
  18296. System attributes prevent the file from appearing in normal directory
  18297. listings. (Two additional attributes, Directory and Volume label, are
  18298. also available. These attributes are controlled by the operating system,
  18299. and are not modified directly by 4DOS.)
  18300. Attributes can be set and viewed with the 596ATTRIB command. The
  18301. 612DIR command also has options to select filenames to view based on
  18302. their attributes, to view the attributes themselves, and to view information
  18303. about normally "invisible" hidden and system files.
  18304. When a file is created, and every time it is modified, the operating system
  18305. records the system time and date in a time stamp in the file's directory
  18306. entry. Several 4DOS commands and variable functions, and many backup and
  18307. utility programs, use this time stamp to determine the relative ages of files.
  18308. Files on LFN volumes have three sets of time and date stamps. The operating
  18309. system records when each file was created, when it was last written or
  18310. modified, and when it was last accessed. The "last write" time stamp
  18311. matches the single time stamp used on traditional FAT volumes.
  18312. Several 4DOS commands and variable functions let you specify which set of
  18313. time and date stamps you want to view or work with on LFN volumes. These
  18314. commands and functions use the letter "c" to refer to the creation time
  18315. stamp, "w" for the last write time stamp, and "a" for the last access time
  18316. stamp. Note that LFN volumes under Windows 95/98/ME store a date but
  18317. no time in the "last access" time stamp; on these drives the time of last
  18318. access will always be 00:00.
  18319. Additional information about disk files and file systems is available under
  18320. 942Drives and Volumes, 944Directories and Subdirectories, and 945File Names.
  18321. ;---------------------------------------------------------------------------
  18322. !TOPIC 971 Glossary
  18323. !NOINDEX
  18324. The glossary contains over 235 terms, and is divided into sections by the
  18325. first letter of each term. Select the section you want to review:
  18326. 9724 973A 974B 975C 976D 977E 978F 979G 980H 981I 982K 983L 984M 985N 986O 987P 988R 989S 990T 991U 992V 993W 994X
  18327. ;---------------------------------------------------------------------------
  18328. !TOPIC 972 Glossary - 4
  18329. !NOINDEX
  18330. 9724 973A 974B 975C 976D 977E 978F 979G 980H 981I 982K 983L 984M 985N 986O 987P 988R 989S 990T 991U 992V 993W 994X
  18331. 4EXIT: A batch file which is executed whenever 4DOS exits.
  18332. 4START: A batch file which is executed whenever 4DOS starts.
  18333. ;---------------------------------------------------------------------------
  18334. !TOPIC 973 Glossary - A
  18335. !NOINDEX
  18336. 9724 973A 974B 975C 976D 977E 978F 979G 980H 981I 982K 983L 984M 985N 986O 987P 988R 989S 990T 991U 992V 993W 994X
  18337. Alias Parameter: A numbered variable (e.g. %2) included in an alias
  18338. definition, allowing a different value to be used in the alias each time
  18339. it is executed.
  18340. Alias: A shorthand name for a command or series of commands.
  18341. Alternate File Name: See LFN File System, and also SFN.
  18342. AND: A logical combination of two true or false conditions. If both
  18343. conditions are true, the result is true; if either condition is false,
  18344. the result is false.
  18345. ANSI: Usually a reference to 915ANSI X3.64 control sequences,
  18346. standardized sequences of text characters which control colors on the screen,
  18347. manipulate the cursor, and redefine keys. 4DOS includes support for
  18348. ANSI screen and cursor control sequences. The abbreviation ANSI is for
  18349. American National Standards Institute, an organization which sets
  18350. standards for computer-related systems, including "ANSI" screen control
  18351. sequences.
  18352. ANSI.SYS or ANSI Driver: A device driver supplied with DOS which
  18353. supports ANSI control sequences to provide enhanced screen display and
  18354. keyboard macros, or one of the many similar programs available from
  18355. other vendors.
  18356. APM: Advanced Power Management, a standardized system used by
  18357. manufacturers of battery-powered computers to control system power
  18358. management, including shutdown of unused components or of the entire
  18359. system based on usage patterns. APM can also report whether the
  18360. system is on AC or battery power, the battery status, and the
  18361. remaining battery life.
  18362. Append: Concatenation of one file or string onto the end of another.
  18363. Application: A program run from the command prompt or a batch file. Used
  18364. broadly to mean any program other than the command processor; and
  18365. more narrowly to mean a program with a specific purpose such as a
  18366. spreadsheet or word processing program, as opposed to a utility.
  18367. Archive: A file attribute indicating that the file has been modified
  18368. since the last backup (most backup programs clear this attribute). Also
  18369. sometimes refers to a single file (such as a .ZIP file) which contains a
  18370. number of other files in compressed form.
  18371. Argument: See Parameter.
  18372. ASCII File: A file containing ASCII text, as opposed to a binary file
  18373. which may contain numbers, or other information that cannot be sensibly
  18374. interpreted as text.
  18375. ASCII: The American Standard Code for Information Interchange, which
  18376. defines numeric values for 128 different characters comprising the
  18377. English alphabet, numbers, punctuation, and some control characters.
  18378. Attribute: A characteristic of a file, which can be set or cleared. The
  18379. standard attributes are Read-Only, Hidden, System, and Archive; other
  18380. attributes include Directory and Volume Label.
  18381. AUTOEXEC.BAT: A batch file which is executed automatically each time
  18382. DOS starts. In vDosPlus this is the autoexec.txt file in the start-in
  18383. directory of vDosPlus.
  18384. Automatic Batch Files: See AUTOEXEC.BAT, 4START, and 4EXIT.
  18385. Automatic Directory Change: A 4DOS feature which allows you to change
  18386. directories by typing the directory name and a backslash [\] at the
  18387. prompt.
  18388. ;---------------------------------------------------------------------------
  18389. !TOPIC 974 Glossary - B
  18390. !NOINDEX
  18391. 9724 973A 974B 975C 976D 977E 978F 979G 980H 981I 982K 983L 984M 985N 986O 987P 988R 989S 990T 991U 992V 993W 994X
  18392. Base Memory: The portion of memory available for use by DOS, the DOS
  18393. command processor, and DOS application programs. This area generally consists
  18394. of the first 640K or 655,360 bytes of memory.
  18395. Base Name: The file name without a drive, path, or extension. For
  18396. example, in the file name C:\DIR1\LETTER.DAT the base name is LETTER.
  18397. BAT File: See Batch File.
  18398. Batch File: A text file containing a sequence of commands for the
  18399. command processor to execute. Batch files are used to save command
  18400. sequences so that they can be re-executed at any time, transferred to
  18401. another system, etc. The extension of a batch file may be .BAT or .BTM.
  18402. Batch File Parameter: A numbered variable (e.g. %2) used within a
  18403. batch file, allowing a different value to be used at that spot in the
  18404. file each time it is executed.
  18405. Binary File: A file containing information which does not represent
  18406. or cannot sensibly be interpreted as text. See also ASCII File.
  18407. BIOS or Basic Input Output System: The software (or "firmware")
  18408. stored on chips inside PC systems. The BIOS provides basic low-level
  18409. control of devices required to operate the system, such as the keyboard,
  18410. floppy disk, and screen; it also handles system self-tests at startup,
  18411. and initiates loading of the operating system.
  18412. Block Device: A physical device for input or output which can
  18413. transmit or receive large blocks of data while the computer is engaged
  18414. in other activities. See also Character Device.
  18415. Boot Directory: The current directory at the time the system is
  18416. booted, in vDosPlus C:\.
  18417. Boot Drive: The disk drive that the system is booted from, in vDosPlus
  18418. this is always designated C:.
  18419. Boot: The process of starting the computer and loading the operating
  18420. system into memory. See also Reboot, Cold Reboot, and Warm
  18421. Reboot.
  18422. Border: A narrow strip surrounding the standard text display area of
  18423. the screen. The color of the border area can be controlled by special
  18424. video commands under some operating systems.
  18425. Break: A signal sent to a program to tell it to halt what it is
  18426. doing. The Ctrl-C key or Ctrl-Break key is used to send this
  18427. signal. Some external commands abort when they receive a break signal;
  18428. others return to a previous screen or menu, or abort the current
  18429. operation.
  18430. BTM File: A special type of 4DOS batch file which is loaded into
  18431. memory to speed up execution.
  18432. Buffer: An area of memory set aside for storage. For example, disk
  18433. buffers are used to save information as it is transferred between your
  18434. program and the disk, and the keyboard buffer holds keystrokes until a
  18435. program can use them.
  18436. ;---------------------------------------------------------------------------
  18437. !TOPIC 975 Glossary - C
  18438. !NOINDEX
  18439. 9724 973A 974B 975C 976D 977E 978F 979G 980H 981I 982K 983L 984M 985N 986O 987P 988R 989S 990T 991U 992V 993W 994X
  18440. Character Device: A physical device for input or output which must
  18441. communicate with your computer one character at a time. Examples
  18442. include the console, communications ports, and printers. See also
  18443. Block Device.
  18444. Character Mode: A display mode in which output is displayed in a
  18445. fixed font, typically with 80 columns in a line and 25 lines on the
  18446. screen (some systems allow you to increase the number of rows and
  18447. columns to other fixed sizes), and which cannot display graphics or
  18448. pictures. See also Graphics Mode.
  18449. CMD File: See Batch File.
  18450. CMDLINE: An environment variable used to extend the command line
  18451. passed to another program beyond its normal length limits.
  18452. Code Page: A setting which tells DOS which character set to
  18453. use and how to retrieve and display date, time, and other information in
  18454. the format appropriate to a particular country. See also Country
  18455. Settings.
  18456. Cold Reboot: The process of restarting the computer in a way that
  18457. physically resets most hardware devices, typically by pressing a reset
  18458. button, or by turning the power off and back on. See also Warm
  18459. Reboot.
  18460. Command Completion: A 4DOS feature which allows you to recall a
  18461. previous command by typing the first few letters of the command, then an
  18462. up-arrow or down-arrow.
  18463. Command Echoing: A feature which displays commands as they are
  18464. executed. Echoing can be turned on and off.
  18465. Command Grouping: A 4DOS feature which allows you to group several
  18466. commands with parentheses, and have them treated as a single command for
  18467. most purposes.
  18468. Command History Window: A pop-up window used by 4DOS to display the
  18469. command history, allowing you to choose a previous command to modify
  18470. and/or execute.
  18471. Command History: A 4DOS feature which retains commands you have
  18472. executed, so that they can be modified and re-executed later.
  18473. Command Processor: A program which interprets commands and executes
  18474. other programs. Sometimes also called a Command Interpreter.
  18475. Command Recall: See Command History.
  18476. Command Separator: A character used to separate multiple commands on
  18477. the same command line.
  18478. Command Tail: The portion of a command consisting of all the
  18479. arguments, i.e., everything but the command name itself.
  18480. Compound Command: See Multiple Commands.
  18481. Compression: An operating system feature which compresses data as it
  18482. is stored in a disk file, and decompresses it as it is read back,
  18483. resulting in more efficient use of disk space (at a slight cost in
  18484. processor time to perform the compression and decompression). More
  18485. generally, an approach to data storage which reduces repeated or
  18486. redundant information to a smaller number of bytes in the compressed
  18487. version than in the original, in order to minimize the space required to
  18488. store the information.
  18489. COMSPEC: An 134environment variable which defines where to find the
  18490. character-mode command processor to start a secondary shell.
  18491. Conditional Commands: A 4DOS feature allowing commands to be executed
  18492. or skipped depending on the results of a previous command. See also
  18493. Exit Code.
  18494. CONFIG.SYS: A file used by DOS to specify which programs should be
  18495. loaded when DOS starts (it has no function in vDosPlus).
  18496. Console: The PC keyboard and display.
  18497. Console Mode: See Character Mode.
  18498. Control Character: A character which is part of the ASCII code, but
  18499. does not have a normal text representation, and which can usually be
  18500. generated by pressing the Ctrl key along with another key.
  18501. Coprocessor: See Numeric Coprocessor.
  18502. Country Settings: The internal settings which tell the operating
  18503. system how to interpret keyboard characters which vary from country to
  18504. country, which character set to use, and how to retrieve and display
  18505. date, time, and other information in the format appropriate to a
  18506. particular country. See also Code Page.
  18507. CPU: The Central Processing Unit which performs all logic and most
  18508. calculations in a computer. In PC-compatible systems, the CPU is on a
  18509. single microprocessor chip.
  18510. CR or Carriage Return: The ASCII character "carriage return"
  18511. (decimal value 13), generated by pressing the Enter key on the
  18512. keyboard, and stored in most ASCII files at the end of each line.
  18513. Critical Error: An error, usually related to a physical or hardware
  18514. problem with input, output, or network access, which prevents a program
  18515. from continuing.
  18516. Current Directory: The directory in which all file operations will
  18517. take place unless otherwise specified. The current directory is
  18518. typically displayed as part of the command prompt. Also called the
  18519. Current Working Directory.
  18520. Current Drive: The disk drive on which all file operations will take
  18521. place unless otherwise specified. The current drive is typically
  18522. displayed as part of the command prompt.
  18523. Cursor: A movable marker on the screen to show where text will be
  18524. entered when you type at the keyboard, or which object on the screen
  18525. will be affected when a mouse button is clicked. In character mode only
  18526. the text cursor is available; graphical systems typically show both a
  18527. mouse cursor and, when text can be entered, a separate text cursor.
  18528. ;---------------------------------------------------------------------------
  18529. !TOPIC 976 Glossary - D
  18530. !NOINDEX
  18531. 9724 973A 974B 975C 976D 977E 978F 979G 980H 981I 982K 983L 984M 985N 986O 987P 988R 989S 990T 991U 992V 993W 994X
  18532. Date Range: A 4DOS feature which allows you to select files based on
  18533. the date and time they were last modified.
  18534. Date Stamp: Information stored in a file's directory entry to show
  18535. the dates on which the file was created, last modified, and last
  18536. accessed. Creation and last access dates are not available in the FAT
  18537. file system. See also Time Stamp.
  18538. Default Directory: See Current Directory.
  18539. Default Drive: See Current Drive.
  18540. Delete Tracking: An operating system or utility software feature
  18541. which is designed to allow you to "undelete" or recover files which have
  18542. recently been deleted. Delete tracking typically works by temporarily
  18543. retaining the deleted files and / or information about the deleted files
  18544. in a special area of the disk.
  18545. Description: A string of characters assigned to describe a file with
  18546. the 4DOS DESCRIBE command, typically stored in the DESCRIPT.ION file in
  18547. each subdirectory.
  18548. Destination: In file processing commands (e.g. COPY or MOVE), the
  18549. name or directory files should have after any copying or modification
  18550. has taken place, generally the last specification on the command line.
  18551. See also Source.
  18552. Detached Process: A program which is "detached" from the normal means
  18553. of user input and output, and cannot use the keyboard, mouse, or video
  18554. display.
  18555. Device Driver: A program which allows the operating system to
  18556. communicate with a device, and which is loaded into memory when the
  18557. system boots. Device drivers are also used to manage memory or for
  18558. other similar internal functions.
  18559. Device: A physical device for input or output such as the console, a
  18560. communications port, or a printer. Sometimes "device" is used to refer
  18561. to character devices, and excludes block devices.
  18562. Directive: An individual item in the 4DOS.INI file, used to control
  18563. the configuration of 4DOS.
  18564. Directory: A portion of any disk, identified by a name and a
  18565. relationship to other directories in a "tree" structure, with the tree
  18566. starting at the root directory. A directory separates files on the disk
  18567. into logical groups, but does not represent a physical division of the
  18568. data on the disk.
  18569. Directory History: A 4DOS feature which allows you to recall
  18570. recently-used directory names in a popup window, and choose one to
  18571. switch to.
  18572. Directory History Window: See Directory History.
  18573. Directory Stack: A 4DOS feature, implemented through the PUSHD and
  18574. POPD commands, which allows you to save the current directory and return
  18575. to it later. See also Stack.
  18576. Directory Tree: The branching structure of directories on a hard
  18577. disk, starting at the root directory. The root of the tree is usually
  18578. considered as the "top" of the structure, so the actual structure can be
  18579. visualized as an upside-down tree with the root at the top and branches
  18580. going "down." A portion or branch of the directory tree is sometimes
  18581. called a "subtree."
  18582. DOS Memory: See Base Memory.
  18583. DOS Session: See Session.
  18584. DPMI or DOS Protected Mode Interface: A specification which allows
  18585. DOS programs to access memory beyond 1 MB in order to manage larger
  18586. programs or larger amounts of information than will fit in base memory.
  18587. Drive Letter: A letter used to designate a specific local disk
  18588. volume, or part or all of a network server drive. In most cases drive
  18589. letters range from A - Z, but some network operating systems allow the
  18590. use of certain punctuation characters as drive letters in order to
  18591. support more than 26 volumes.
  18592. ;---------------------------------------------------------------------------
  18593. !TOPIC 977 Glossary - E
  18594. !NOINDEX
  18595. 9724 973A 974B 975C 976D 977E 978F 979G 980H 981I 982K 983L 984M 985N 986O 987P 988R 989S 990T 991U 992V 993W 994X
  18596. Echo: See Command Echoing.
  18597. EMS Memory: Memory which conforms to the Lotus / Intel / Microsoft
  18598. Expanded Memory Specification (LIM EMS), which allows programs to access
  18599. large amounts of memory outside of base memory or extended memory.
  18600. EMS Swapping: A type of swapping in which the transient portion of
  18601. 4DOS is stored in EMS memory while an application is running.
  18602. Environment: An area of memory which contains multiple entries in the
  18603. form "NAME=value". See also Master Environment and Passed Environment.
  18604. Environment Variable: The name of a single entry in the environment.
  18605. Error Level: A numeric value between 0 and 255 returned from an
  18606. external command to indicate its result (e.g., success, failure,
  18607. response to a question). See also Exit Code.
  18608. Escape Character: In some contexts, the 4DOS escape character, which
  18609. is used to suppress the normal meaning of or give special meaning to the
  18610. following character. In other cases, the specific ASCII character ESC.
  18611. The meaning must be determined from the context.
  18612. Escape Sequence: A sequence of text characters which has a special
  18613. meaning and is not treated as normal text. For example, the character
  18614. sequence <ESC>[K (where <ESC> is the ASCII "escape" character, decimal
  18615. value 27) will clear the screen from the cursor to the end of the current
  18616. line, rather than simply displaying the string "ESC[K" on the screen.
  18617. Similarly, in 4DOS, the escape sequence <Ctrl-X>f on the command line
  18618. (where <Ctrl-X> is the ASCII Ctrl-X character, decimal value 24) is
  18619. translated to a form feed, and is not treated as the literal characters
  18620. "<Ctrl-X>f".
  18621. Executable Extensions: A 4DOS feature which allows you to specify the
  18622. application to be executed when a file with a particular extension is
  18623. named at the command prompt.
  18624. Executable File: A file, usually with the extension .COM or .EXE,
  18625. which can be loaded into memory and run as a program.
  18626. Exit Code: The result code returned by an external command or an
  18627. internal command. 4DOS internal commands return an exit code of 0 if
  18628. successful, or non-zero if unsuccessful. See also Errorlevel.
  18629. Expansion: The process 4DOS goes through when it scans a command line
  18630. and substitutes the appropriate actual values for aliases, alias
  18631. parameters, batch file parameters, and environment variables. See also
  18632. Parsing.
  18633. Extended ASCII Character: A character which is not part of the
  18634. standard set of 128 ASCII characters, but is used on the PC as part of
  18635. an extended set of 256 characters. These characters include
  18636. international language symbols, and box and line drawing characters.
  18637. Extended Directory Search: A 4DOS feature which maintains a directory
  18638. search "database" or list, typically including all directories in your
  18639. system, and allows you to change quickly to any directory in the list.
  18640. Extended Key Code: The code for a key on the PC keyboard which has no
  18641. representation in the standard ASCII character set, such as a function
  18642. key, cursor key, or Alt plus another key. The extended key code for a
  18643. key is often the same as the scan code for that key.
  18644. Extended Memory: Any memory on a computer system with a 286, 386,
  18645. 486, or Pentium processor which is above the first 1 MB (one megabyte,
  18646. or 1024*1024 bytes) of memory. See also XMS.
  18647. Extended Parent Directory Names: A 4DOS feature which allows you to
  18648. use additional periods in a directory name to represent directories
  18649. which are successively higher in the directory tree.
  18650. Extended Wildcard: A 4DOS feature which extends the traditional
  18651. wildcard syntax and allows you to use multiple wildcard characters, and
  18652. character ranges (e.g. [a-f] for the letters A through F). See also
  18653. Wildcard.
  18654. Extension: The final portion of a file name, preceded by a period.
  18655. For example, in the file name C:\DIR1\LETTER.DAT the extension is .DAT.
  18656. In a long filename which contains multiple periods, the extension is
  18657. usually considered to be the portion of the name after the final period.
  18658. External Command: A program which resides in an executable file, as
  18659. opposed to an internal command which is part of 4DOS.
  18660. ;---------------------------------------------------------------------------
  18661. !TOPIC 978 Glossary - F
  18662. !NOINDEX
  18663. 9724 973A 974B 975C 976D 977E 978F 979G 980H 981I 982K 983L 984M 985N 986O 987P 988R 989S 990T 991U 992V 993W 994X
  18664. FAT File System: The traditional file system used by DOS to store
  18665. files on diskettes and hard disks. Uses a File Allocation Table
  18666. to keep track of allocated and unallocated space on the disk.
  18667. FAT32 File System: An extension of the FAT file system. FAT32 supports
  18668. long filenames, and supports much larger hard disks than the FAT system. See
  18669. also VFAT File System.
  18670. FAT-Compatible File Name: See SFN.
  18671. FF or Form Feed: The ASCII character "form feed" (decimal value
  18672. 12), which typically causes a printer to skip to a new page. The FF
  18673. character is not normally entered from the keyboard, but in many cases
  18674. it can be generated, if necessary, by holding the Alt key, pressing
  18675. 0-1-2, and releasing the Alt key.
  18676. File Attribute: See Attribute.
  18677. File Description: See Description.
  18678. File Exclusion Range: A 4DOS feature which allows you to exclude
  18679. files from processing by internal commands based on their names.
  18680. Filename Completion: A 4DOS feature which allows you to type part of
  18681. a filename on the command line, and have 4DOS fill in
  18682. the rest for you.
  18683. Free Memory: Usually, the amount of total memory which is unoccupied
  18684. and available for applications.
  18685. ;---------------------------------------------------------------------------
  18686. !TOPIC 979 Glossary - G
  18687. !NOINDEX
  18688. 9724 973A 974B 975C 976D 977E 978F 979G 980H 981I 982K 983L 984M 985N 986O 987P 988R 989S 990T 991U 992V 993W 994X
  18689. Global Aliases: A 4DOS option which allows you to store aliases in a
  18690. global area accessible to all copies of 4DOS, so that any change made by
  18691. one copy is immediately available to all other copies. See also Local
  18692. Aliases.
  18693. Global Directory History: A 4DOS option which allows you to store the
  18694. directory history in a global area accessible to all copies of 4DOS, so
  18695. that any change made by one copy is immediately available to all other
  18696. copies. See also Local Directory History.
  18697. Global History: A 4DOS option which allows you to store the command
  18698. history in a global area accessible to all copies of 4DOS, so that any
  18699. change made by one copy is immediately available to all other copies.
  18700. See also Local History.
  18701. Graphics Mode: A display mode in which output is displayed in any one
  18702. of a range of fonts, typically in resizable windows with a variable
  18703. number of text rows and columns, and which supports the display of
  18704. graphics and pictures along with text. See also Character Mode.
  18705. ;---------------------------------------------------------------------------
  18706. !TOPIC 980 Glossary - H
  18707. !NOINDEX
  18708. 9724 973A 974B 975C 976D 977E 978F 979G 980H 981I 982K 983L 984M 985N 986O 987P 988R 989S 990T 991U 992V 993W 994X
  18709. Hidden: A file attribute indicating that the file should not be
  18710. displayed with a normal DIR command, and should not be made available to
  18711. programs unless they specifically request access to hidden files.
  18712. History Window: See Command History Window and Directory History.
  18713. History: See Command History.
  18714. HMA or High Memory Area: The area of PC memory located in the first
  18715. 64K bytes above the 1 megabyte that DOS can address directly. The HMA
  18716. can be made addressable from DOS programs using special hardware
  18717. facilities, or an XMS driver.
  18718. ;---------------------------------------------------------------------------
  18719. !TOPIC 981 Glossary - I
  18720. !NOINDEX
  18721. 9724 973A 974B 975C 976D 977E 978F 979G 980H 981I 982K 983L 984M 985N 986O 987P 988R 989S 990T 991U 992V 993W 994X
  18722. Include List: A concise method of specifying several files or groups
  18723. of files in the same directory, for use with all 4DOS commands which
  18724. take file names as arguments.
  18725. Inheritance: A feature which allows one copy of 4DOS to "inherit" the
  18726. .INI file data, aliases, command history, and directory history from a
  18727. previous copy. More generally, a system which allows one program to
  18728. pass information or settings on to another, often to a second copy of
  18729. the same program.
  18730. .INI File: The 4DOS initialization file containing directives which
  18731. set the initial configuration of 4DOS.
  18732. Insert Mode: When editing text, a mode in which newly typed
  18733. characters are inserted into the line at the cursor position, rather
  18734. than overwriting existing characters on the line. See also Overstrike
  18735. Mode.
  18736. Internal Command: A command which is part of 4DOS,
  18737. as opposed to an external command.
  18738. Internal Variables: Environment variables created by 4DOS to provide
  18739. information about your system. Internal variables are evaluated each
  18740. time they are used, and are not actually stored in the environment.
  18741. ;---------------------------------------------------------------------------
  18742. !TOPIC 982 Glossary - K
  18743. !NOINDEX
  18744. 9724 973A 974B 975C 976D 977E 978F 979G 980H 981I 982K 983L 984M 985N 986O 987P 988R 989S 990T 991U 992V 993W 994X
  18745. Key Code: The code passed to a program when a key is pressed on the
  18746. keyboard. Depending on the key that is pressed, and the software
  18747. handling the keyboard, the code can be an ASCII code, a scan code, or an
  18748. extended key code.
  18749. Key Mapping: A 4DOS feature which allows you to assign new keystrokes
  18750. for command line functions such as manipulating the command history or
  18751. completing file names.
  18752. Keyboard Buffer: A buffer which holds keystrokes you have typed that
  18753. have not yet been used by the currently executing program.
  18754. Keystroke Alias: An alias assigned to a key, so that it can be
  18755. invoked or recalled with a single keystroke.
  18756. ;---------------------------------------------------------------------------
  18757. !TOPIC 983 Glossary - L
  18758. !NOINDEX
  18759. 9724 973A 974B 975C 976D 977E 978F 979G 980H 981I 982K 983L 984M 985N 986O 987P 988R 989S 990T 991U 992V 993W 994X
  18760. Label: A marker in a batch file, with the format :name, allowing
  18761. GOTO and GOSUB commands to "jump" to that point in the file. See also
  18762. Volume Label.
  18763. LF or Line Feed: The ASCII character "line feed" (decimal value
  18764. 10), stored in most ASCII files at the end of each line, after the CR
  18765. character. The LF character is not normally entered from the keyboard,
  18766. but in many cases it can be generated, if necessary, by pressing
  18767. Ctrl-Enter.
  18768. LFN or Long File Name: A file name which does not conform to the
  18769. traditional DOS 8.3 filename restrictions, either because it is longer than
  18770. the traditional 8.3 name, or because it contains periods, spaces, or other
  18771. characters not allowed in a traditional DOS 8.3 filename.
  18772. LFN File System: A file system which extends the DOS 8.3 filename
  18773. system to support long filenames and possibly larger hard drives. An
  18774. LFN file system stores both a long and short name for a file, not just a
  18775. long name. The short name is sometimes called the "alternate" name.
  18776. See also LFN, SFN, VFAT File System, and FAT32 File System.
  18777. Local Aliases: A 4DOS option which allows you to store aliases in a
  18778. local area only accessible to the current copy of 4DOS, so that a change
  18779. made in the current copy of 4DOS does not affect other copies, and vice
  18780. versa. See also Global Aliases.
  18781. Local Directory History: A 4DOS option which allows you to store the
  18782. directory history in a local area only accessible to the current copy of
  18783. 4DOS, so that a change made in the current copy of 4DOS does not affect
  18784. other copies, and vice versa. See also Global Directory History.
  18785. Local History: A 4DOS option which allows you to store the command
  18786. history in a local area only accessible to the current copy of 4DOS, so
  18787. that a change made in the current copy of 4DOS does not affect other
  18788. copies, and vice versa. See also Global History.
  18789. Logging: A 4DOS feature, implemented via the LOG command, which
  18790. allows you to save a record of the commands you execute.
  18791. ;---------------------------------------------------------------------------
  18792. !TOPIC 984 Glossary - M
  18793. !NOINDEX
  18794. 9724 973A 974B 975C 976D 977E 978F 979G 980H 981I 982K 983L 984M 985N 986O 987P 988R 989S 990T 991U 992V 993W 994X
  18795. Master Environment: The master copy of the environment maintained by
  18796. 4DOS.
  18797. Memory-Resident Mode: A method of installing 4DOS in which swapping
  18798. is disabled, and all of 4DOS remains permanently resident in memory.
  18799. Memory-Resident Program: See TSR.
  18800. Modulo: The remainder after an integer division. For example 11
  18801. modulo 3 is 2, because when 11 is divided by 3 the remainder is 2.
  18802. Multiple Commands: A 4DOS feature which allows multiple commands to
  18803. be placed on a line, separated by a caret [^], or another user-defined
  18804. character.
  18805. Multitasking: A capability of some software (and the related
  18806. hardware) which allows two or more programs to run apparently
  18807. simultaneously on the same computer.
  18808. ;---------------------------------------------------------------------------
  18809. !TOPIC 985 Glossary - N
  18810. !NOINDEX
  18811. 9724 973A 974B 975C 976D 977E 978F 979G 980H 981I 982K 983L 984M 985N 986O 987P 988R 989S 990T 991U 992V 993W 994X
  18812. Network: A system which allows several computers to be connected
  18813. together to share files, printers, modems, or other resources, and to
  18814. pass electronic mail or other information between the systems on the
  18815. network.
  18816. Network File System: Software which runs over a network to allow
  18817. access to files on the server. A network file system may support the
  18818. same options as the file system used on local drives, or it may be more
  18819. or less restrictive than the local file system about file names, disk
  18820. volume capacity, and other similar features.
  18821. Non-Swapping Mode: See Memory Resident Mode.
  18822. NTFS or New Technology File System: A file system distributed with
  18823. the 25Windows NT line which allows longer file names, supports larger
  18824. drives and provides better performance than the traditional FAT file system.
  18825. Numeric Coprocessor: A chip which works in conjunction with an Intel
  18826. 8086, 80286, 80386, 80486, or Pentium CPU to perform decimal arithmetic
  18827. ("floating point") calculations. Some 80486s and the Pentium CPU have
  18828. the numeric coprocessor built into the CPU chip; in all other cases it
  18829. is on a physically separate chip, and is optional (when the coprocessor
  18830. is not avilable, the CPU performs decimal arithmetic through other, much
  18831. slower methods).
  18832. ;---------------------------------------------------------------------------
  18833. !TOPIC 986 Glossary - O
  18834. !NOINDEX
  18835. 9724 973A 974B 975C 976D 977E 978F 979G 980H 981I 982K 983L 984M 985N 986O 987P 988R 989S 990T 991U 992V 993W 994X
  18836. Operating System: A collection of software which loads when the
  18837. computer is started, provides services to other software, and ensures
  18838. that programs don't interfere with each other while they are running.
  18839. Option: See Switch.
  18840. OR: A logical combination of two true or false conditions. If both
  18841. conditions are false the result is false; if either condition is true
  18842. the result is true.
  18843. Overstrike Mode: When editing text, a mode in which newly typed
  18844. characters overwrite existing characters on the line, rather than being
  18845. inserted into the line at the cursor position. See also Insert Mode.
  18846. ;---------------------------------------------------------------------------
  18847. !TOPIC 987 Glossary - P
  18848. !NOINDEX
  18849. 9724 973A 974B 975C 976D 977E 978F 979G 980H 981I 982K 983L 984M 985N 986O 987P 988R 989S 990T 991U 992V 993W 994X
  18850. Parameter: A piece of additional information placed after a command
  18851. or function name. For example, in the command DIR XYZ, XYZ is a
  18852. parameter. Also used to refer to an alias parameter or batch file
  18853. parameter.
  18854. Parent Directory: The directory in which a particular subdirectory
  18855. resides, often seen as the directory "above" a subdirectory.
  18856. Parsing: The process 4DOS performs to analyze the command line,
  18857. perform alias and environment variable expansion, and find the
  18858. appropriate internal command or external command to execute. More
  18859. generally, the process of breaking down a string or message into its
  18860. individual components in order to process them properly.
  18861. Passed Environment: A copy of the master environment created before
  18862. running an application, so that any changes made by the application will
  18863. not affect the master environment.
  18864. Path: A specification of all the directories a file resides in. For
  18865. example, the path for C:\WPFILES\MYDIR\MEMO.TXT is C:\WPFILES\MYDIR\.
  18866. Also used to refer to the environment variable PATH, which contains a
  18867. series of path specifications used when searching for external commands
  18868. and batch files.
  18869. Pipe: A method for collecting the standard output of one program and
  18870. passing it on as the standard input of the next program to be executed,
  18871. signified by a vertical bar "|" on the command line. See also
  18872. Redirection.
  18873. Previous Working Directory: The working directory used most recently,
  18874. just prior to the current working directory. For example, if C:\DATA is
  18875. the current working directory and you switch to D:\UTIL, C:\DATA then
  18876. becomes the previous working directory.
  18877. Primary Shell: The copy of the character-mode command processor which
  18878. is loaded by the operating system when the system boots or a session
  18879. opens.
  18880. ;---------------------------------------------------------------------------
  18881. !TOPIC 988 Glossary - R
  18882. !NOINDEX
  18883. 9724 973A 974B 975C 976D 977E 978F 979G 980H 981I 982K 983L 984M 985N 986O 987P 988R 989S 990T 991U 992V 993W 994X
  18884. RAM or Random Access Memory: The physical memory used to store data
  18885. while a computer is operating. The information in most types of RAM is
  18886. lost when power is turned off.
  18887. RAM Disk: A pseudo "disk drive", created by software, which appears
  18888. like a normal physical disk drive to programs. Sometimes also called a
  18889. Virtual Disk.
  18890. Range: See Date Range, Size Range, Time Range, and File
  18891. Exclusion Range.
  18892. Read-Only: A file attribute indicating that the file can be read, but
  18893. not written or deleted by the operating system or 4DOS
  18894. unless special commands are used.
  18895. Reboot: The process of restarting the computer with software, with
  18896. the keyboard (e.g. by pressing Ctrl-Alt-Del), by pressing a reset
  18897. button, or by turning the power off and back on. See also Cold Reboot
  18898. and Warm Reboot.
  18899. Redirection: A method for collecting output from a program in a file,
  18900. and/or of providing the input for a program from a file. See also
  18901. Pipe.
  18902. Registry: A hierarchically organized data file maintained by Windows
  18903. to hold system parameters, hardware and software settings, and
  18904. other similar information used by the operating system or by other
  18905. software packages.
  18906. Resident Portion: The small portion of 4DOS stored permanently in
  18907. memory when swapping mode is in use, as opposed to the larger transient
  18908. portion.
  18909. REXX: A file and text processing language developed by IBM, and
  18910. available on many PC and other platforms.
  18911. ROM or Read Only Memory: A physical memory device used to store
  18912. information which cannot be readily modified, such as the BIOS built
  18913. into each PC system. The information in ROM is typically retained when
  18914. power is turned off.
  18915. Root Directory: The first directory on any disk, from which all other
  18916. directories are "descended." The root directory is referenced with a
  18917. single backslash [\].
  18918. ;---------------------------------------------------------------------------
  18919. !TOPIC 989 Glossary - S
  18920. !NOINDEX
  18921. 9724 973A 974B 975C 976D 977E 978F 979G 980H 981I 982K 983L 984M 985N 986O 987P 988R 989S 990T 991U 992V 993W 994X
  18922. Scan Code: The physical code for a key on the PC keyboard. For the
  18923. original U.S. English keyboard layout the scan code represents the
  18924. physical position of the key, starting with 1 for the key in the upper
  18925. left corner (Esc), and increasing from left to right and top to bottom.
  18926. This order will vary for more recent keyboards or those designed for
  18927. other countries or languages.
  18928. Search Path: See 138PATH.
  18929. Secondary Shell: A copy of the command processor which is started by
  18930. another program, rather than by the operating system.
  18931. Session: A general term for the individual windows or tasks started
  18932. by a multitasking system.
  18933. SFN or Short File Name: A file name which follows the rules of the
  18934. traditional FAT file system: a name of 1 - 8 characters and an
  18935. extension of 0 - 3 characters, each consisting of only alphabetic and
  18936. numeric characters plus the punctuation marks ! # $ % & ' ( ) - @ ^ _
  18937. ` { } and ~. See also LFN.
  18938. Shell: See Command Processor. Also used to refer to a program
  18939. which gives access to operating system functions and commands through a
  18940. menu- or mouse-driven system, or which replaces the primary user
  18941. interface of the operating system.
  18942. Size Range: A 4DOS feature which allows you to select files based on
  18943. their size.
  18944. Source: In file processing commands (e.g. COPY or MOVE), the
  18945. original files before any copying or modification has taken place, i.e.,
  18946. those specified earlier on the command line. See also Destination.
  18947. Stack: An area of memory used by any program to store temporary data
  18948. while the program is running; more generally, any such storage area
  18949. where the last item stored is normally the first one removed.
  18950. Standard Error, Standard Input, and Standard Output: The file(s) or
  18951. character device(s) where a program respectively displays error
  18952. messages, obtains its normal input, and displays its normal output.
  18953. Standard error, standard input, and standard output normally refer to the
  18954. console, unless redirection is used.
  18955. stderr, stdin, and stdout: Common abbreviations for standard error,
  18956. standard input, and standard output respectively.
  18957. Subdirectory: Any directory other than the root directory. Unlike the
  18958. root directory, subdirectories have names, attributes, and time stamps;
  18959. subdirectories are stored on disk in much the same way files are.
  18960. Subtree: See Directory Tree.
  18961. Swap File: A disk file created by an operating system or a program to
  18962. store unused information on disk, and thereby free up memory for other
  18963. purposes. Under 4DOS, a disk file created by 4DOS to store its
  18964. transient portion when disk swapping is in use.
  18965. Swapping: A 4DOS feature which removes the larger transient portion
  18966. of 4DOS from base memory while an application is running, leaving the
  18967. maximum possible amount of memory for the application.
  18968. Switch: A parameter for an internal command or application which
  18969. specifies a particular behavior or setting. For example, the command
  18970. "DIR /P" might be referred to as "having the /P switch set."
  18971. System: A file attribute indicating that the file belongs to the
  18972. operating system, and should not be accessed by other programs.
  18973. ;---------------------------------------------------------------------------
  18974. !TOPIC 990 Glossary - T
  18975. !NOINDEX
  18976. 9724 973A 974B 975C 976D 977E 978F 979G 980H 981I 982K 983L 984M 985N 986O 987P 988R 989S 990T 991U 992V 993W 994X
  18977. Target: See Destination.
  18978. Time Range: A 4DOS feature which allows you to select files based on
  18979. the time they were last modified.
  18980. Time Stamp: Information stored in a file's directory entry to show
  18981. the times at which the file was created, last modified, and last
  18982. accessed. Creation and last access times are not available in the FAT
  18983. file system, and creation time is not available in the VFAT file system. See
  18984. also Date Stamp.
  18985. Transient Portion: The larger portion of 4DOS stored in memory
  18986. temporarily when swapping is in use, as opposed to the smaller resident
  18987. portion.
  18988. Tree: See Directory Tree.
  18989. TSR: A DOS Terminate and Stay Resident program, i.e., a program
  18990. which "terminates" but remains resident in memory, to provide features
  18991. such as network support, a pop-up notepad or telephone dialer, a disk
  18992. cache, or mouse support.
  18993. ;---------------------------------------------------------------------------
  18994. !TOPIC 991 Glossary - U
  18995. !NOINDEX
  18996. 9724 973A 974B 975C 976D 977E 978F 979G 980H 981I 982K 983L 984M 985N 986O 987P 988R 989S 990T 991U 992V 993W 994X
  18997. UDF or User-Defined Function: A variable function defined with the
  18998. 696FUNCTION command.
  18999. UMB or Upper Memory Block: An XMS Upper Memory Block, whose address
  19000. is above the end of base memory (normally, above 640K), but within the 1
  19001. megabyte of memory that DOS can address directly.
  19002. UNC or Universal Naming Convention: A common method for accessing
  19003. files on a network drive without using a "mapped" drive letter. Names
  19004. specified this way are called UNC names, and typically appear as
  19005. \\server\volume\path\filename, where server is the name of the
  19006. network server where the files reside, volume is the name of a disk
  19007. volume on that server, and the path\filename portion is a directory
  19008. name and file name.
  19009. ;---------------------------------------------------------------------------
  19010. !TOPIC 992 Glossary - V
  19011. !NOINDEX
  19012. 9724 973A 974B 975C 976D 977E 978F 979G 980H 981I 982K 983L 984M 985N 986O 987P 988R 989S 990T 991U 992V 993W 994X
  19013. V86: A virtual 8086 mode in the 386 and later CPUs that allows execution
  19014. of real mode (16-bit) programs in protected (32-bit) mode.
  19015. Variable Expansion: The process of scanning a command line and
  19016. replacing each environment variable name, alias parameter, or batch file
  19017. parameter with its value.
  19018. Variable Functions: Functions provided by 4DOS to manipulate strings,
  19019. dates, and filenames; perform arithmetic; read and write files; and
  19020. perform other similar functions. Variable functions are similar to
  19021. static environment variables or internal variables, but have parameters
  19022. and can perform actions rather than just returning static information.
  19023. Variable: See Alias Parameter, Batch File Parameter, and
  19024. Environment Variable.
  19025. VCPI or Virtual Control Program Interface: A specification for managing
  19026. memory beyond the first megabyte on PCs with 386 or later processors. VCPI
  19027. support for DOS programs is provided by some DOS memory managers. See also
  19028. DPMI.
  19029. VDS or Virtual DMA (Direct Memory Access) Services: A programming
  19030. interface that lets bus mastering devices cooperatively manage DMA when the
  19031. CPU runs in protected mode. VDS are provided by some memory managers and
  19032. Windows versions. See also V86.
  19033. VESA or Video Electronics Standards Association: An international body
  19034. that has issued some standards relating to the video peripherals in personal
  19035. computers, such as the VESA BIOS Extensions, VESA Display Power Management
  19036. Signalling, etc.
  19037. VFAT File System: An extension of the FAT file system, which supports long
  19038. filenames. Also see LFN and FAT32 File System.
  19039. Virtual Disk: See RAM Disk.
  19040. Volume Label: A special, hidden file placed on any disk, whose name
  19041. constitutes a "label" for the entire disk.
  19042. Volume: See Disk Drive.
  19043. ;---------------------------------------------------------------------------
  19044. !TOPIC 993 Glossary - W
  19045. !NOINDEX
  19046. 9724 973A 974B 975C 976D 977E 978F 979G 980H 981I 982K 983L 984M 985N 986O 987P 988R 989S 990T 991U 992V 993W 994X
  19047. Warm Reboot: The process of restarting the computer with software, or
  19048. with the keyboard (e.g. by pressing Ctrl-Alt-Del), typically without
  19049. physically resetting any hardware devices. See also Cold Reboot.
  19050. White Space Character: A character used to separate arguments on the
  19051. command line. The white space characters recognized by 4DOS are the
  19052. space, tab, and comma.
  19053. Wildcard: A character ("*" or "?") used in a filename to specify the
  19054. possibility that any single character ("?") or sequence of characters
  19055. ("*") can occur at that point in the actual name. See also Extended
  19056. Wildcard.
  19057. Windows NT: Microsoft's line of non-DOS-based operating systems.
  19058. Windows NT File System: See NTFS.
  19059. ;---------------------------------------------------------------------------
  19060. !TOPIC 994 Glossary - X
  19061. !NOINDEX
  19062. 9724 973A 974B 975C 976D 977E 978F 979G 980H 981I 982K 983L 984M 985N 986O 987P 988R 989S 990T 991U 992V 993W 994X
  19063. XMS Memory: A software method for accessing extended memory under DOS.
  19064. XMS memory is not additional memory, but is a software specification only.
  19065. XMS Swapping: A type of swapping where the transient portion of 4DOS
  19066. is stored in XMS memory while an application is running.
  19067. XOR (exclusive OR): A logical combination of two true or false
  19068. conditions. If both conditions are false or both conditions are true
  19069. the result is false; if either condition is true and the other is false
  19070. the result is true.
  19071. ;---------------------------------------------------------------------------
  19072. !TOPIC 703 KSTACK
  19073. !NOINDEX
  19074. !TTY
  19075. Purpose: The memory-resident utility which provides 053Keystack functionality.
  19076. Format: [LH] [d:\path\]KSTACK [/I] [/U]
  19077. /I (force Install) /U(ninstall)
  19078. !TTY
  19079. Usage
  19080. Load the KSTACK TSR if you wish to use the 638KEYSTACK command. You
  19081. will probably want to do this in 109AUTOEXEC.BAT. If KSTACK is not in a
  19082. directory in your search 649path, you must specify the path to the
  19083. KSTACK.COM file. If you have upper memory available, you can save about one
  19084. and a third kilobytes of conventional memory by loading KSTACK high with the
  19085. 639LH command.
  19086. Options
  19087. !INDENT 5 5 0 5
  19088. /I: (force Install) Normally KSTACK checks to see whether it is
  19089. already installed, and refuses to install itself if a previous instance
  19090. is present in memory. /I overrides this check, allowing you to
  19091. install a second instance.
  19092. /U: (Uninstall) Removes a previously installed copy of KSTACK from
  19093. memory. Note that KSTACK cannot be uninstalled, if another utility that
  19094. "hooks" interrupts 16h or 2Fh has been loaded after it, or if its
  19095. keystroke buffer is not empty.
  19096. !INDENT 0
  19097. ;---------------------------------------------------------------------------
  19098. !TOPIC 704 BATCOMP
  19099. !NOINDEX
  19100. !TTY
  19101. Purpose: Compress batch files. See 115Batch File Compression for
  19102. additional details.
  19103. Format: [d:\path\]BATCOMP [/Ekkkk /K /O /Q] InputFile [OutputFile]
  19104. InputFile: A readable batch file to compress
  19105. OutputFile: The name to give the compressed batch file
  19106. /E(ncryption key) /O(verwrite)
  19107. /K (remove comments) /Q(uiet)
  19108. !TTY
  19109. Usage
  19110. BATCOMP is a batch file compressor and optionally allows for simple
  19111. key-based encryption. It translates batch files into a smaller format which
  19112. cannot be read or edited.
  19113. You must specify the full name of the input file, including its extension,
  19114. on the BATCOMP command line. If you do not specify OutputFile, it defaults
  19115. to the InputFile name with a .BTM extension. If you specify OutputFile,
  19116. you must give an extension or the output file will not have one. If
  19117. OutputFile already exists it will not be overwritten unless /O is
  19118. used. Even if you use the /O option, BATCOMP will not compress a file
  19119. into itself.
  19120. The output file will not be legible, but it will run under the current
  19121. versions of 4DOS, 0204NT and Take Command. The behavior and performance
  19122. of the file should be the same as if it were run in its original text form
  19123. as a .BTM file.
  19124. Compression is not effective for very small files and may even result in
  19125. a slightly larger file.
  19126. Unlike most 4DOS commands, BATCOMP is an external command: it is not
  19127. built into 4DOS.COM. The shell needs to be able to find the file
  19128. BATCOMP.EXE in order to run this command. You can arrange this by
  19129. keeping it in a directory listed in your search path, e.g. by adding
  19130. your 4DOS directory to your 649path; or by creating an 595alias:
  19131. alias batcomp=c:\4dos\batcomp
  19132. The BATCOMP.EXE utility does not support the usual 4DOS file selection
  19133. features: attribute switches, wildcards, ranges, @file lists, and so
  19134. on. It is only meant to process one file per invocation. In the unlikely
  19135. event that you need to use multiple filenames or advanced file selection
  19136. features with BATCOMP, use it in a 615DO loop or a 626FOR loop.
  19137. Options
  19138. !INDENT 5 5 0 5
  19139. /E: (Encryption) Specify a key (string) to be used for encryption.
  19140. The key must be no longer than 4 characters, or will be truncated.
  19141. /K: (Remove comments) By default, comments (lines starting with
  19142. "REM" or "::" but not "REM >") are retained in the compressed
  19143. file. /K forces those lines to be stripped for additional size
  19144. reduction.
  19145. /O: (Overwrite) Forces overwriting of any existing OutputFile.
  19146. /Q: (Quiet) Supresses all progress reports (stdout). Errors
  19147. (stderr) are still shown.
  19148. !INDENT 0
  19149. ;---------------------------------------------------------------------------
  19150. !TOPIC 798 Technical Information for Programmers
  19151. !NOINDEX
  19152. !TTY
  19153. Detecting the 4DOS Prompt
  19154. 4DOS generates INT 2Fh calls before and after the prompt is displayed to
  19155. allow TSRs to detect that 4DOS is at the prompt. The calls are:
  19156. AX D44Eh
  19157. BX 0 if 4DOS is about to display the prompt; 1 if 4DOS has
  19158. displayed the prompt and is about to accept keyboard input; or
  19159. 2 if keyboard input is complete and 4DOS is about to begin
  19160. processing the line.
  19161. Any routine intercepting these calls should preserve the SI, DI, BP, SP, DS,
  19162. ES, and SS registers.
  19163. Placing Keystrokes Into the Keystack
  19164. You can put keystrokes into the 4DOS Keystack with an INT 2Fh call. First,
  19165. you must make a call to check whether KSTACK.COM is loaded:
  19166. AX D44Fh
  19167. BX 0
  19168. If KSTACK.COM is not loaded, this call will return AX unchanged. If it is
  19169. loaded, AX will be returned as 44DDh; other registers will be
  19170. unchanged. Once you have determined that KSTACK.COM is loaded, you can send
  19171. keystrokes with this call:
  19172. AX D44Fh
  19173. BX 1
  19174. CX number of words being passed (0 - 255)
  19175. DS:DX address of the keystroke array
  19176. On return, if the call succeeded then AX will be 0; if it failed, AX will be
  19177. non-zero. BX, CX, and DX are destroyed; other registers are preserved. If
  19178. the call succeeds, subsequent calls to INT 16h functions 0, 1, 10h, or 11h
  19179. will receive the stacked keystrokes.
  19180. The keystroke array passed to KSTACK must be an array of words containing
  19181. the values to return from INT 16h. The high byte of each word is a scan code
  19182. and the low byte is an ASCII code. Many programs accept keystrokes properly
  19183. with only the ASCII code, but some require the scan code as well. See
  19184. 913Key Code and Scan Code Tables for a list of ASCII and scan codes for
  19185. most U.S. keyboards. To insert a delay in the keystroke sequence, include a
  19186. word set to FFFFh followed by a word containing the desired delay in clock
  19187. ticks.
  19188. Writing Installable Commands
  19189. An "installable command" is created with a memory-resident program (TSR)
  19190. which can receive signals from 4DOS and process commands. 4DOS makes every
  19191. command available to such TSRs before it is executed; if any TSR chooses to
  19192. execute the command, 4DOS will do no further processing. Otherwise, 4DOS
  19193. processes the command normally.
  19194. The 4DOS "Installable Command" interface is compatible with an undocumented
  19195. interface present in COMMAND.COM for MS-DOS and PC DOS 3.3 and above. This
  19196. interface is documented more thoroughly in the excellent reference text
  19197. Undocumented DOS by Schulman et. al., published by Addison Wesley.
  19198. 4DOS looks for an installable command after alias and variable expansion and
  19199. redirection, and after checking to see if the command is a drive change, but
  19200. before checking for an internal or external command.
  19201. 4DOS first makes an INT 2Fh call to determine whether any TSR loaded will
  19202. respond to the command, with:
  19203. AX AE00h
  19204. BX offset of command line buffer:
  19205. first byte = maximum length of command line
  19206. second byte = actual length of command line, not including
  19207. trailing CR
  19208. remainder = command line, with a trailing CR
  19209. CH FFh
  19210. CL length of command line, not including the command name
  19211. DX FFFFh
  19212. SI offset of command name buffer:
  19213. first byte = length of command name
  19214. remainder = command name, shifted to upper case
  19215. and padded with blanks to 11 characters
  19216. DS segment for command line and command name buffers
  19217. If the TSR does not recognize the command as its own, it must pass the INT
  19218. 2Fh along with registers unchanged. If it does recognize the command, it
  19219. must return 0FFh in AL. The command should not be executed at this
  19220. point. 4DOS will then make another call (buffer formats are the same as
  19221. above):
  19222. AX AE01h
  19223. BX offset of command line buffer
  19224. CH 0
  19225. CL length of command name
  19226. DX FFFFh
  19227. SI offset of command name buffer
  19228. DS segment for command line and command name buffers
  19229. If the TSR executes the command line, it must set the command name length at
  19230. DS:[SI] to 0. If the command name length is not set to 0, 4DOS will attempt
  19231. to execute the command as an internal or external command. This allows the
  19232. TSR to return a modified command line to 4DOS by modifying the command line
  19233. buffer at DS:BX, and leaving the command name length byte at DS:[SI] set to
  19234. a non-zero value. If the command is executed,the TSR should return the
  19235. result of the command (zero for normal return or non-zero for an error) in
  19236. AL.
  19237. Using DESCRIPT.ION
  19238. 4DOS uses the file DESCRIPT.ION (or the file named in the
  19239. 423DescriptionName INI directive) to store file descriptions. This file
  19240. is created as a hidden file in each subdirectory which has descriptions, and
  19241. deleted when all descriptions are removed or when all files with descriptions
  19242. are deleted. If you remove the hidden attribute from the file, 4DOS will not
  19243. hide it again.
  19244. Your programs can access DESCRIPT.ION to create, retrieve, or modify file
  19245. descriptions, and to store other information. DESCRIPT.ION has one line per
  19246. filename, and is unsorted. Each line is in the following format:
  19247. filename.ext Description[<ID>Other program info]...<CR>
  19248. There is normally one space between the description and filename, but
  19249. additional spaces may be used in future JP Software products. The filename
  19250. will be enclosed in double quotes if it contains spaces. The characters
  19251. following the description allow extension of the description format for use
  19252. by other programs. They are as follows:
  19253.  is an ASCII Ctrl-D (04), and marks the end of the description text and
  19254. the beginning of information for a program other than 4DOS. This symbol can
  19255. appear multiple times on each line; each occurrence marks the beginning of
  19256. information for another program.
  19257. <ID> is an identification byte for the program which is using this area of
  19258. the particular line. If you are writing a program which will store
  19259. information in DESCRIPT.ION, test it using an ID byte of your own
  19260. choosing. When you are ready to release the program, contact JP Software
  19261. and we will provide you with an ID byte value that is not in use by others
  19262. to the best of our knowledge.
  19263. Other program info is any text the program wishes to store in its area of
  19264. the line. The text should relate specifically to the file named on the
  19265. line. It may not contain the Ctrl-D character, carriage returns, line feeds,
  19266. or nulls (ASCII 0s).
  19267. 4DOS will copy, delete, or move all the information on a line in
  19268. DESCRIPT.ION, including information owned by other programs, when performing
  19269. the same action on the corresponding file. 4DOS will also change the name if
  19270. a file is renamed. To support DESCRIPT.ION properly, your program must do
  19271. the same if it copies, deletes, moves, or renames files. Take care not to
  19272. remove information which does not belong to your program, or delete lines
  19273. which contain information for other programs. Your program should be able to
  19274. handle a line terminated by a CR or LF alone, a CR/LF pair, an EOF (ASCII
  19275. 26), or the physical end of the file. The lines it creates should be
  19276. terminated with CR / LF. The line length limit is 4096 bytes; exceeding this
  19277. limit will cause unpredictable results.
  19278. If a file is accessed in both LFN and non-LFN environments -- e.g., both
  19279. under vDosPlus and in MS-DOS mode -- then a file may have two lines in
  19280. DESCRIPT.ION: one for the long filename, and one for the 8.3 name.
  19281. Interrupt 2E
  19282. 4DOS provides full, documented support for the undocumented COMMAND.COM
  19283. "back door" entry, INT 2E (hex). INT 2E allows applications to call the
  19284. primary copy of the command processor to execute commands, without loading a
  19285. secondary shell.
  19286. INT 2E support is enabled by default. It can be disabled with the
  19287. !LINE
  19288. 566FullINT2E = No directive in 4DOS.INI, in which case 4DOS "hooks" INT
  19289. 2E, but any calls to it are ignored. INT 2E support adds about 100 bytes to
  19290. the resident size of 4DOS, and applies only to the primary shell (it is
  19291. ignored in secondary shells).
  19292. To use INT 2E, set DS:SI to the address of a buffer containing the command,
  19293. then issue an INT 2E. The buffer format is:
  19294. First byte Length of the command, not including this
  19295. byte or the last byte
  19296. Text bytes The command text
  19297. Last byte CR (ASCII 13)
  19298. You must release enough memory for 4DOS to reload its transient portion,
  19299. and provide about 80 bytes of available stack space for the INT 2E handler
  19300. to use. INT 2E can not be called from a TSR while 4DOS is running (for
  19301. example, a TSR popped up at the 4DOS prompt or from within LIST or SELECT),
  19302. but can be called from within any application or from within a TSR while an
  19303. application (including the 4DOS HELP system) is running.
  19304. INT 2E can invoke any 4DOS command including an alias, an internal command,
  19305. an external command, or a batch file. All changes to 4DOS data (such as
  19306. aliases, environment variables, and SETDOS settings) which are made by a
  19307. command executed via INT 2E calls will affect the primary shell, and the
  19308. environment passed to a program called via INT 2E will be a copy of the
  19309. primary shell's environment.
  19310. INT 2E uses the same internal stack as the primary shell. If a complex
  19311. command is used in the primary shell to start a program which eventually
  19312. issues an INT 2E, the additional stack space required by commands executed
  19313. through INT 2E may (in rare circumstances) cause a stack overflow. If this
  19314. occurs, use the 574StackSize directive in 4DOS.INI to increase 4DOS's
  19315. internal stack space.
  19316. INT 2E also uses the same batch file "stack" as the primary shell. This
  19317. means that if INT 2E is used to execute a batch file, this batch file is
  19318. considered "nested" within any batch file(s) used in the primary shell to
  19319. start the program which issued the INT 2E. This may cause batch nesting
  19320. errors from within the INT 2E call which would not occur if the same
  19321. command were executed at the prompt.
  19322. On return from INT 2E, all registers will be destroyed except SS and SP. AX
  19323. will be set as follows:
  19324. FFFFh An error occurred before processing the command:
  19325. not enough memory was available, INT 2E was called from
  19326. a TSR, or another error made it impossible to handle the
  19327. interrupt.
  19328. 0 The command was processed without error.
  19329. > 0 There was an error in processing the command. AX is the
  19330. error number, equivalent to the %_? value from an internal
  19331. command or the %? value from an external command. If a
  19332. batch file is run, the value will be the error level
  19333. returned by the batch file (via QUIT n or CANCEL n) or the
  19334. last command within it. If an alias is run the value
  19335. will be the exit code returned by the last command in the
  19336. alias.
  19337. !TTY
  19338. Saving This Topic
  19339. To save this topic as a text file, exit the help system and type:
  19340. 4help tech /? > c:\4dostech.txt
  19341. (You can substitute any legal filename for C:\4DOSTECH.TXT.)
  19342. ;---------------------------------------------------------------------------
  19343. !TOPIC 920 An Embarrassment of Riches
  19344. !NOINDEX
  19345. 4DOS provides a wealth of features, and there is often more than one way
  19346. to achieve an objective. Often you will discover different features which
  19347. seem to do the same thing. There's a reason for this apparent redundancy.
  19348. There may an elegant approach which works with internal commands, and a
  19349. clumsier method that works with external programs. Or there may be a
  19350. sophisticated multiline structure for use in batch files, and a more basic
  19351. one-line approach for use in aliases and at the prompt. This section will
  19352. guide you through some of the 4DOS's more easily confused features.
  19353. 929Command log versus history log
  19354. 922Directory history versus directory stack
  19355. 923DO UNTIL versus DO WHILE
  19356. 924Double quotes versus back-quotes
  19357. 925EXCEPT versus exclusion ranges
  19358. 926FOR versus DO
  19359. 927GLOBAL, /S switch, and FOR /R
  19360. 928IF versus IFF
  19361. ;// 10XXInclude lists versus multiple filenames
  19362. 930QUIT versus CANCEL
  19363. 931SWITCH versus IFF / ELSEIFF / ELSE
  19364. ;---------------------------------------------------------------------------
  19365. !TOPIC 921 =920 Riches
  19366. !NOINDEX
  19367. ;---------------------------------------------------------------------------
  19368. !TOPIC 922 Directory history, Directory stack
  19369. !NOINDEX
  19370. The directory history remembers recently-visited directories. It is
  19371. updated whenever you change locations via drive change commands, 601CD,
  19372. 688CHDIR, or 602CDD, 039automatic directory changes, 653PUSHD or
  19373. 651POPD, or the history window itself. The directory history is a
  19374. free-form list: you can select any directory in the list through a
  19375. 040popup window, accessed with a single keystroke. You can save, reload
  19376. or view the directory history with the 613DIRHISTORY command. The handy
  19377. 602CDD - command revisits the location most recently recorded, and is
  19378. worth assigning to a keystroke macro.
  19379. The directory stack has a more formal structure. It is only affected
  19380. by the 653PUSHD and 651POPD commands. Locations on the directory
  19381. stack are revisited in reverse order -- the last directory pushed will
  19382. be the next one popped. There is no keystroke popup window for the
  19383. directory stack, and no mechanism for saving and reloading it. The
  19384. 614DIRS command dumps the current contents of the stack to standard
  19385. output.
  19386. Use the interactive, free-form directory history as a quick and convenient
  19387. way of navigating between directories while working at the prompt. The
  19388. structured, command-driven directory stack is ideal for use in batch files
  19389. and aliases, where changing to a specific drive and directory, and later
  19390. returning to the original location, is a common task.
  19391. ;---------------------------------------------------------------------------
  19392. !TOPIC 923 DO UNTIL versus DO WHILE
  19393. !NOINDEX
  19394. A 615DO UNTIL loop is an exit-condition loop: the condition is tested
  19395. after executing the commands between DO and ENDDO. If the condition is false
  19396. after the commands in the loop have been executed the first time, they will
  19397. be repeated until the condition becomes true (or a LEAVE is executed.)
  19398. A 615DO WHILE loop is an entry-condition loop: the condition is
  19399. tested before executing the commands between DO and ENDDO. If the condition
  19400. is false, the body of the loop is not executed. Otherwise, the commands in
  19401. the loop will be repeated while the condition remains true (or until a LEAVE
  19402. command is executed.)
  19403. Note that the body of an UNTIL loop will always be executed at least once,
  19404. but a WHILE loop may be skipped altogether. Also note the reversed
  19405. logic: an UNTIL loop ends when the specified condition becomes true, but
  19406. a WHILE loop ends when the condition becomes false. Use DO UNTIL for a
  19407. block of commands which must be performed at least once (and possibly
  19408. repeated); use DO WHILE for a block which may or may not need to be
  19409. executed at all.
  19410. ;---------------------------------------------------------------------------
  19411. !TOPIC 924 Double quotes versus back-quotes
  19412. !NOINDEX
  19413. Double quotes suppress the special meaning of some, but not all, special
  19414. characters. Between double quotes, the 041command separator,
  19415. 051redirection and 052piping operators, white space, and
  19416. 084conditional operators all are treated as ordinary characters. Percent
  19417. signs do not lose their meaning -- variable expansion is performed normally
  19418. between double quotes. The 086escape character is not affected
  19419. either. Double quotes are retained throughout the parsing process; when the
  19420. command is executed, it will see the double quotes. Double quotes are
  19421. typically used for filenames or other arguments which may contain spaces or
  19422. other special characters.
  19423. Back-quotes are the more potent form of quoting, and so are sometimes called
  19424. strong quotes. Between back-quotes, all special characters including
  19425. percent signs and escapes are treated as normal characters. (There is one
  19426. exception: you can escape a back-quote within a back-quoted string.) No
  19427. variable expansion is performed, and the back-quotes themselves will be
  19428. stripped out of the string before the command is executed.
  19429. Back-quotes have a more specialized purpose than double quotes. When you
  19430. define 101aliases or functions using the 595ALIAS or 696FUNCTION
  19431. commands, you will often want to store references to variables, functions,
  19432. and parameters, command separators, redirection operators, and so forth in
  19433. the definition. Using back-quotes prevents these special characters from
  19434. being expanded at the time the alias or function is defined. Since the
  19435. back-quotes are removed from the command line before the command is executed,
  19436. they will not be stored in the alias or function definition. When you later
  19437. use the alias or function which you have created, any special characters
  19438. stored in it will be expanded or handled normally. In short, back-quotes
  19439. are used to delay variable expansion and the handling of special characters.
  19440. See 118Argument Quoting for more details on how the two kinds of quoting
  19441. work in 4DOS.
  19442. ;---------------------------------------------------------------------------
  19443. !TOPIC 925 EXCEPT versus exclusion ranges
  19444. !NOINDEX
  19445. All 4DOS internal file-handling commands support 078exclusion ranges to
  19446. prevent specified files or directories from being processed. This support
  19447. is straightforward and robust, and should be used instead of EXCEPT wherever
  19448. possible -- with all internal commands.
  19449. 623EXCEPT is a clumsier addition for the benefit of external
  19450. commands. It simply sets the hidden 946attribute of the specified files
  19451. before launching the specified program, and clears it afterwards. This
  19452. approach has some drawbacks: programs which ignore the hidden attribute will
  19453. not be affected by EXCEPT; the original state of the excluded files' Hidden
  19454. attributes will be lost; if the external program crashes, EXCEPT will not
  19455. have the opportunity to clear the attributes it has set. Use EXCEPT only for
  19456. external programs which lack a file-exclusion capability. Even then, you may
  19457. be better off applying an exclusion range to a 626FOR loop.
  19458. copy /[!*.old *.bad] c:\working\*.* z:\backups\
  19459. except ( *.ion ) crc.exe *.* >! r:\chksums.txt
  19460. for /[!*.ion] %i in ( *.* ) crc.exe "%i" >>! r:\chksums.txt
  19461. There is one rare circumstance where you will need to use EXCEPT instead of
  19462. an exclusion range. EXCEPT can take an 057@file list as an argument. If
  19463. you have a file containing a list of files to be excluded, you must use
  19464. EXCEPT even for internal commands (and watch out for commands which ignore
  19465. the hidden attribute!) Fortunately this situation is unusual.
  19466. ;---------------------------------------------------------------------------
  19467. !TOPIC 926 FOR versus DO
  19468. !NOINDEX
  19469. 626FOR and 615DO offer similar functionality: repeating commands for
  19470. all files matching a wildcard or a set of wildcards, or for all lines in a
  19471. text file; repeating a loop a set number of times; incrementing or
  19472. decrementing a numeric variable. Often you can use either command for any
  19473. of these tasks.
  19474. DO is a multiline structure which can only be used in 102batch files. You
  19475. can have any number of lines between the DO and its corresponding
  19476. ENDDO. You can also use complex flow-control commands like 634IFF and
  19477. 669SWITCH within a DO / ENDDO block, or even branch within a DO block
  19478. using 630GOTO /I. The complexity of the code between DO and ENDDO is
  19479. limited only by the 574stack size. You can restart the loop at any point
  19480. using the ITERATE command, or exit at any point with LEAVE. Since DO is a
  19481. multiline construct, you can (and should) use indentation to indicate
  19482. structure. DO is cleaner than FOR and is usually the better choice in a
  19483. batch file, unless you need to recurse into subdirectories.
  19484. FOR is inherently a single-line command. You might use 085parentheses or
  19485. 086escapes to spread a FOR command over more than one line, but all the
  19486. lines will ultimately be collected together in the input buffer. This fact
  19487. limits the complexity of a FOR loop. (You can work around this limitation
  19488. in a batch file by having FOR call a subroutine using 629GOSUB.) Unlike
  19489. DO, FOR can be used at the prompt or in an 101alias. It also offers a /R
  19490. option which DO lacks. At the prompt or in an alias, FOR is your only
  19491. option. In a batch file, use FOR if recursion into subdirectories is
  19492. needed, or if the loop is very simple (one or two commands); otherwise DO
  19493. is probably preferable.
  19494. ;---------------------------------------------------------------------------
  19495. !TOPIC 927 GLOBAL, /S switch, and FOR /R
  19496. !NOINDEX
  19497. 4DOS provides three different methods of applying commands to nested
  19498. subdirectories. The first is /S. Most internal file-handling commands
  19499. use /S to visit subdirectories recursively. (In the 626FOR command, this
  19500. option is called /R instead for compatibility with CMD.EXE.) When you need
  19501. to use one command and have it affect all subdirectories below a certain
  19502. location, the /S switch is usually the simplest way to go.
  19503. The following internal commands support /S to recurse into
  19504. subdirectories: 596ATTRIB, 606COPY, 609DEL/691ERASE, 612DIR,
  19505. 625FFIND, 646MOVE, and 658REN/695RENAME. Many external commands
  19506. have a similar ability. In some cases it will also be called /S; XCOPY, for
  19507. example, has a /S. Other programs may call it something different; for
  19508. instance, the popular archiver PKZIP uses -r for this purpose. See your
  19509. external program's documentation to learn whether it has a similar option.
  19510. If you need to use a command which does not offer /S or an equivalent
  19511. ability, your second option is the 628GLOBAL command. GLOBAL is somewhat
  19512. clumsier than /S, but it can be used with commands which don't support /S,
  19513. or with multiple commands by using 085command grouping.
  19514. GLOBAL works by changing the current directory to each nested subdirectory in
  19515. turn, and running the specified command (or command group) once in each
  19516. location. When GLOBAL has run out of subdirectories to visit, the original
  19517. current working directory is restored. One consequence of this design is
  19518. that you must first change to the desired location using 602CDD,
  19519. 653PUSHD or similar before using GLOBAL. Another consequence is that
  19520. you should not specify a path to the command's arguments. Write the command
  19521. to operate on files in the current directory:
  19522. rem Pack all .EXE files in C:\TEST\PACKTREE and below with UPX:
  19523. pushd c:\test\packtree
  19524. global /i upx --best *.exe
  19525. popd
  19526. Before using GLOBAL study its 628options carefully, particularly /I. If
  19527. you do not specify /I and the command returns a nonzero exit code, GLOBAL
  19528. will abort without visiting further subdirectories.
  19529. GLOBAL is a rather odd command, and it doesn't support the usual rich set
  19530. of 4DOS file-selection options. The third way of running a command in
  19531. nested subdirectories is to use a 626FOR /R loop. FOR is more
  19532. complicated to use than GLOBAL, but it supports all of 4DOS's file-selection
  19533. features. You can use advanced 073wildcards, filter by 076date,
  19534. 077time, 075size, 056attributes, or 056descriptions, use
  19535. 078exclusion ranges, and so on. Like GLOBAL, FOR can be used to control
  19536. external commands or command groups. Unlike GLOBAL, there is no changing of
  19537. directories; the FOR index returns qualified filenames which will be passed
  19538. to the specified command. You can massage the FOR index using variable
  19539. functions if need be.
  19540. In summary: To run one command in nested subdirectories, use that command's
  19541. /S option if it has one; this is the easiest method. For commands which
  19542. don't support /S or for multiple commands, use either GLOBAL or FOR
  19543. /R. GLOBAL is the easier to use, but you must switch to the topmost
  19544. directory before using it. GLOBAL doesn't support advanced wildcards,
  19545. ranges, and so on. FOR /R is the more sophisticated alternative. It
  19546. requires more typing, but supports all of 4DOS's file-selection
  19547. 071features. In many cases, the choice between GLOBAL and FOR /R is
  19548. a matter of taste.
  19549. del "d:\my documents\memos\*.old" /s
  19550. cdd a:\
  19551. global /i describe descript.ion "4DOS file descriptions"
  19552. for /a: /r a:\ %i in ( *.ion ) describe %i "4DOS file descriptions"
  19553. ;---------------------------------------------------------------------------
  19554. !TOPIC 928 IF versus IFF
  19555. !NOINDEX
  19556. 633IF is inherently a single-line command. You can use 085parentheses
  19557. or 086escapes to spread an IF command over more than one line, but all
  19558. the lines will ultimately be collected together in the input buffer. This
  19559. limits the complexity of an IF command.
  19560. By contrast, 634IFF was designed to be a multiline structure. You can
  19561. have any number of lines between the IFF, ELSEIFF, ELSE, and ENDIFF
  19562. commands. You can easily put complex flow-control commands like
  19563. 669SWITCH, 615DO, or another IFF within an IFF block, or even branch
  19564. within an IFF block using 630GOTO /I. The complexity of the code is
  19565. limited only by your 574stack size. Since IFF is a multiline construct,
  19566. you can (and should) use indentation to show structure.
  19567. IF is often the easier command to use for very simple conditionals: only
  19568. one or two commands to be conditionally executed, no ELSE clause. For
  19569. anything more complex, IFF will be the better option.
  19570. ;---------------------------------------------------------------------------
  19571. !TOPIC 929 Command log versus history log
  19572. !NOINDEX
  19573. The command log, controlled by 643LOG without the /H option, records all
  19574. commands executed, whether typed at the command line or read in from a batch
  19575. file. The lines are written to the log file after expansion of variables
  19576. and aliases.
  19577. The history log, 643LOG /H, records only commands entered at the prompt,
  19578. not those read in from batch files. The lines are stored as typed, and do
  19579. not reflect expansion of variables and aliases.
  19580. Think of the history log as a way to track what the user does. It might be
  19581. be particularly useful if more than one person uses the same computer. The
  19582. command log, on the other hand, is more a record of what 4DOS itself
  19583. does. You can use it while debugging troublesome batch files or aliases to
  19584. see what commands were actually executed.
  19585. ;---------------------------------------------------------------------------
  19586. !TOPIC 930 QUIT versus CANCEL
  19587. !NOINDEX
  19588. 654QUIT terminates only the current batch file; 600CANCEL aborts all
  19589. batch files in the current shell and returns to the prompt. CANCEL is the
  19590. more C-rious of the two. Use QUIT for an early exit from a 599CALLed
  19591. batch file; use CANCEL when a serious error makes further batch processing
  19592. problematic.
  19593. iff not exist "%dir\*.tag" then
  19594. echo No .TAG files to process in %dir
  19595. quit
  19596. else
  19597. copy "%dir\*.tag" "%dir\*.old"
  19598. for %i in ( "%dir\*.tag" ) process.exe /u "%i"
  19599. endiff
  19600. if %@ready[a:] == 0 ( echoerr Drive A: not ready! %+ cancel )
  19601. ;---------------------------------------------------------------------------
  19602. !TOPIC 931 SWITCH versus IFF / ELSEIFF / ELSE
  19603. !NOINDEX
  19604. 669SWITCH tests one expression which may take several specific values,
  19605. and branches accordingly. It's elegant and easy to read, but can only check
  19606. one expression.
  19607. An 634IFF / ELSEIFF / ELSE structure, on the other hand, is more complex
  19608. but also more flexible. It can test multiple conditions at once, or
  19609. predicate one test on another. IFF can also be used to test inequalities
  19610. and ranges, while SWITCH can only compare against specific values. In
  19611. general, where there is only one expression to test and a few known values
  19612. which it can take, the simpler SWITCH is preferred. Otherwise, use IFF.
  19613. switch %_dow
  19614. case thu
  19615. echo Collect timesheets today
  19616. case fri
  19617. echo Issue paychecks today
  19618. case sat .or. sun
  19619. echo Overtime rules in effect today
  19620. default
  19621. echo Normal workday
  19622. endswitch
  19623. iff %_dow == mon .and. %_day lt 8 then
  19624. echo First Monday of the month: Rent is due!
  19625. endiff
  19626. ;---------------------------------------------------------------------------
  19627. ;End of file