home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1995 November
/
PCWK1195.iso
/
inne
/
podstawy
/
dos
/
4dos
/
4uzytki
/
ez-btm11.exe
/
COPYCOM.BTM
< prev
next >
Wrap
Text File
|
1994-02-02
|
2KB
|
58 lines
: COPYCOM.BTM
: (Itamar Even-Zohar, Tel Aviv U., itamarez@plato.tau.ac.il)
: COPYCOM.BTM handles copying of MS-DOS original
: COMMAND.COM to diskettes formatted with /s in 4DOS, if you
: had to have 4DOS.COM under the name COMMAND.COM for misbehaved
: programs like XyWrite anf Nota Bene. The original COMMAND.COM
: must be kept in your ROOT directory under the name COMMAND.OLD, or
: if you use multiple configuration, in a subdirectory called
: MSDOS.
: You can run this batch independently, after you have formatted
: a diskette, or it will run from the FORMAT.BTM menu automatically,
: if you selected first option "A" for "formatting with system".
:
if "%1" == "" (echo.^echo USAGE: COPYCOM d:^quit)
setlocal
alias quix `endlocal^set fail=^quit`
inkey /K"YN" Transfer original COMMAND.COM to %@upper[%1] (Y/N)? %%user
if %user=Y goto check
if %user=N Echo canceled ^ quix^
: If the target diskette is formatted, this batch will copy MS-DOS
: COMMAND.COM to it (it goes to label "copcom"). Otherwise, you will
: get the message: "Diskette has no systen. Format first!"
:check
iff exist %1IBM*.COM .or. exist %1IO.SYS then
goto copcom^
else
echo Diskette %@upper[%1] has no system. Format (or transfer system) first!^ quix
endiff
: If this batch is run as a secondary batch from FORMAT.BTM, and
: you canceled formatting at the level of that batch (by pressing '0', or
: CTRL-C after selection of an option), you will get a "formatting canceled"
: message.
:copcom
set comm=%_boot:\command.old
if exist %_boot:\msdos\command.com (set comm=%_boot:\msdos\\command.com^goto check2)
if not exist \command.old (echo.^echo Original COMMAND.COM not found!^echo (should be in ROOT under name COMMAND.OLD)^quix)
if not exist %1command.com goto copy
:check2
iff exist %1command.com .and. %@filesize[%1command.com,b] lt 60000 then
echo !!The original COMMAND.COM already exists on %1!!
@dir %1
quix
endiff
:copy
echo.
echo Copying now MS-DOS original COMMAND.COM!
copy %comm %1command.com
@dir %1
quix