.


:




:

































 

 

 

 


) .

)

: IF [NOT] <1>= =<2> <>

, "= =".

<1> = = <2>, <>. .

5. iftren.bat, "K", "P", .

if '%1'= ='K' F:\WORK\KEYTREN\TRK

if {%1}= ={P} H:\LANG\TP\TURBO

if #%1#= =## echo : iftren K ( iftren P)

%1 "K", "P", , BAT- . IF , "K", , . IF "P" TURBO. IF , BAT- , , .

 

. ifdir.bat, ("S", "P" "W") DIR , .

 

IF GOTO.

6. iftren.bat 5, :

@echo off

if '%1'= ='K' goto kt

if {%1}= ={P} goto tp

if *%1*= =** echo : iftren K ( iftren P)

goto end

:tp

cls

echo TURBO PASCAL...

H:\LANG\TP\TURBO

goto end

:kt

cls

echo TRK...

F:\WORK\KEYTREN\TRK

:end

. iftren.bat 6 .

 

) .

: IF [NOT] EXIST [<>][<>]< > <>

IF , , <>.

7. ifexist.bat, , , , $$$. , :

@echo off

cls

if exist %1 goto yes

echo !

goto end

:yes

copy %1 *.$$$

:end

. ifexist.bat 7 .

 

8.

BAT- . , .

: FOR %%<> IN (<>) DO <>

<> - DOS. <> ( ), . <> . <> .

<>:

(*.doc)

(*.txt a*.bat *.exe)

(1 2 3 4 5 6 7)

(A B C D E F G H I J)

8. TXT- .

@echo off

for %%f in (*.txt) do type %%f

type %%f %%f TXT- .

9. ABFG.bat : CAT-A, CAT-B, CAT-F, CAT-G, , A, B, F, G.

@echo off

for %%c in (A B F G) do md cat-%%c

for %%f in (A*.*) do copy %%f cat-A

for %%f in (b*.*) do copy %%f cat-b

for %%f in (f*.*) do copy %%f cat-f

for %%f in (g*.*) do copy %%f cat-g

. ABFG.bat .

, , ABFG.bat.

 

9. BAT- BAT-

BAT- . , , , . .

) BAT- ( , ). BAT- BAT-. ,

) BAT- CALL:

: CALL < BAT-> [< >]

. BAT- BAT-. , CALL.



<== | ==>
|
:


: 2017-02-24; !; : 1119 |


:

:

,
==> ...

2057 - | 1974 -


© 2015-2024 lektsii.org - -

: 0.011 .