home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1995 November
/
PCWK1195.iso
/
inne
/
podstawy
/
dos
/
4dos
/
4uzytki
/
ez-btm11.exe
/
FILL.BTM
< prev
next >
Wrap
Text File
|
1992-09-05
|
3KB
|
97 lines
@echo off
:FILL.BTM
: By Jeff Epler <bx304@CLEVELAND.FREENET.EDU>
: Edited by Itamar Even-Zohar (B10@vm.tau.ac.il)
: Last edited September 5, 1992
:
: Allows sequential copying to diskettes, filling them to occupy
: maximum space. When there is no more room on the diskette, you
: are prompted to insert next diskette and select the next operation.
: The available operations are: copy, new copy, format, dir, and quit.
: If you select "format", you are then prompted to type the relevant
: format formula (depending on the type of the diskette and its drive).
: If you defined your format formula once, you are allowed later to
: either change or keep it.
:------------------------------------------------------------------------
:begin
if not %@removable[%1] == 1 goto usage
setlocal
:copy
set fs=%@diskfree[%1,b]
*for %n in (%2&) do (
if %@filesize[%n,b] lt %fs (
Copy %n %1
set fs=%@diskfree[%1,b]
)
)
set left=0
*for %n in (%2&) do set left=%@eval[%left+%@filesize[%n]]
if %left == 0 (echo all files successfully copied.^goto end)
:choose
echo There are %fs bytes left on %1
echo.
echo Insert next disk and press C to copy same filespec(s)
echo N to start afresh (new filespec(s))
echo F to format
echo D to directory
echo Q to quit
:ink
inkey /k"cndfq" /w10 Your choice? %%choice
if (%choice) == (c) goto copy
if (%choice) == (n) goto newcopy
if (%choice) == (f) goto format?
if (%choice) == (d) dir %1 /p
if (%choice) == (q) goto end
if (%choice) == () (echos ^goto ink)
goto choose
:format?
iff "%@alias[fcmd]"=="" then
goto define_format
else
gosub formula
goto format
endiff
:define_format
echo Type your format command only (no drive!):
echo (for example: format /4; format /720)
input %%fcmd
alias fcmd=%fcmd
:format
fcmd %1
goto choose
:end
echo.
echo %0 terminated
endlocal
quit
:----------------Re-Start-----------------
:newcopy
echo Specify new drive and filespec(s)
input (syntax: x: filespec(s)): %%prms
%0 %prms
:-----------------Usage-------------------
:usage
echo Usage:
echo %0 x: filespec(s)
echo.
echo x: must be a removable disk.
quit
:==============SUB-ROUTINES===============
:formula
echo Your current format formula is "%fcmd".
echo (C)hange, or (K)eep?
inkey /K"CK" %%rep >nul
iff %rep == C then goto define_format
elseiff %rep == K then return
endiff