Dec 092017
Copy files in the background.
File BCOPY11.ZIP from The Programmer’s Corner in
Category File Managers
Copy files in the background.
File Name File Size Zip Size Zip Type
BCOPY.ASM 64883 11051 deflated
BCOPY.COM 2415 1880 deflated
BCOPY.DOC 5048 2267 deflated

Download File BCOPY11.ZIP Here

Contents of the BCOPY.DOC file

BCOPY.COM Command V1.1

Douglas Boling 1989 No. 1 (Utilities)

Purpose: A memory-resident utility that copies files in the background so
the user does not have to wait until the copying is completed before continuing
his work.

Format: [d:][path]BCOPY [source [target]] [/X][/U][/Wn]

Remarks: The source and target parameters have the same usage in BCOPY as
in the DOS COPY command, save that if the source is a directory, BCOPY will not
automatically assume an implicit \*.*. DOS wildcard characters (* and ?) are
supported, however, and a source filename need not be repeated as part of the
target filespec unless the name is to be changed. If initially run with the /X
command line switch, BCOPY will use one page of Expanded memory for its data
buffer, thus saving 4 KB of conventional RAM. Run with the /U switch, BCOPY
will uninstall itself from memory, if possible. BCOPY will always complete all
copying tasks in its queue before deinstallation.

BCOPY does not support the DOS COPY /A and /B switches: it makes
straight binary file copies and does not stop at a Ctrl-Z end-of-file marker.
Nor does BCOPY allow using the plus (+) sign to combine multiple source files
into a single copy. Note: unlike the DOS COPY command, BCOPY does not return a
Target Disk Full error message, so care must be exercised to ensure that
adequate storage space is available. Since the principal use of BCOPY is to
load files to a RAMdisk during the execution of an AUTOEXEC or other batch file,
however, this should not present a problem in normal use.

/Wn will cause BCOPY to wait until n files are left and give more time
to the BG routine. /Wn must be the last command line entry. The command tail
is not processed beyond it. /U is the only switch valid with /W. BCOPY
terminates if not installed in BG already. ERRORLEVEL IS SET TO 0. The n can
be any character since only bits 0-3 are used to test the count.

ERRORLEVEL of 255 is returned if there is a syntax or file name error.
Otherwise the ERRORLEVEL is set to the number of filespecs in the que.

The output file is created with the name BCOPY.$$$ and then
after it is closed it is renamed to the proper name. If a file exists
with that name it is deleted. This avoids incomplete files being accessed.
The following sequence could be used to load a ramdrive:

SET PATH=F:\RAMPROGS............

This would allow any programs which have been copied to the
ramdrive to be used.

Available for downloading from PC MagNet (see the BCOPY by Modem
sidebar), BCOPY.COM is already compiled and ready to run. BCOPY.BAS will
automatically create BCOPY.COM when run once in BASIC. To create BCOPY.COM from
the BCOPY.ASM source code requires use of a macro assembler (IBM or Microsoft,
Version 2 or later) and the following commands:


For Turbo Assembler


The problem with the DTA appears to have been that the DTA
address was being changed during the BG's find first/next routine,
which is the only one that uses the DTA. I moved the save/set/reset
routines for the DTA next to the find routine and it eliminated the
problem. It would appear that the BG was losing control to
COMMAND.COM which setup a default DTA for the next program. Any
program with filespecs on the command line could have caused the find
routine to fail.
This appears to be usable fix but not a total solution, as there
must be some problem in the task control of BCOPY. There seems to
be a problem in BCOPY unloading itself enven though it is running
under QikBasic which locks up the system. This can be avoided by
removing it specifically by the command:

I'll repost this after I have found the real problem.

A side effect of using a dummy output filename and then renaming
it, is if the file already exists on the output and the disk is full,
then the file will not get copied.

I can be reached on:

The Helpline BBS, Harrisonburg, VA 703-269-4802
The Mad Hacker BBS, Harrisonburg, VA 703-433-0824

V1.1 By Wayne D. Mingee July 1989.
-Corrected problem in handling of DTA. Multiple executions
no longer cause truncation.
-Now creates output file under dummy name first.
-Added /W switch. Uses int 28h to give more time to BG.
-Displays format line on errror only.
-Made copyright one line.
-Returns file count in ERRORLEVEL
-Eliminated message when only switches given.

 December 9, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>