Dec 102017
 
A simple file mover that has some nice features.
File BCMOVE.ZIP from The Programmer’s Corner in
Category File Managers
A simple file mover that has some nice features.
File Name File Size Zip Size Zip Type
BCMOVE.DOC 18660 6588 deflated
BCMOVE.EXE 17072 9106 deflated

Download File BCMOVE.ZIP Here

Contents of the BCMOVE.DOC file


DOCUMENTATION FILE FOR PROGRAM BCMOVE.EXE.

CONTENTS:

1. Purpose of BCMOVE
2. Quick Start Procedure
3. Copyright and Statement of Liability
4. Command Line Syntax
5. The Function of BCMOVE (the heart of the matter!)
6. Switches
7. Wildcards
8. Cloning BCMOVE Switches
9. ErrorLevel Return Codes
10. Redirection of Output
11. Author, Author!

1. PURPOSE OF BCMOVE

BCMOVE is a utility program to move files from one directory (or
one disk) to another. As opposed to the DOS COPY command, after
BCMOVE finishes there is ONLY ONE COPY of the file remaining, that
being on the TARGET drive/directory (the original file is gone).

BCMOVE will move one file or a group of files specified by a
wildcard filespec (see section 7). When moving files between two
directories on the same disk, BCMOVE moves ONLY THE DIRECTORY
INFORMATION of the file and not the file data. This method is very
quick and very safe. When moving files between two disks, a
successful copy is made on the target disk first, then the source
file is deleted.


2. QUICK START PROCEDURE

The command-line syntax for BCMOVE is:

C> BCMOVE SourcePath [TargetPath] [/Switches]

The SourcePath (or filename, or wildcard filespec) MUST BE
SPECIFIED. If the TargetPath is omitted then the current
drive/directory will be assumed. Optional Switches are discussed
in more detail in section 6.

EXAMPLES:

To move the file MYFILE.TXT from the current directory to the path
D:\WORDPROC\TEXTFILS where TEXTFILS is a subdirectory in the
WORDPROC directory on drive D simply type:
C> BCMOVE MYFILE.TXT D:\WORDPROC\TEXTFILS

To move the file OTHRFILE.DOC from the subdirectory called HOLDFILS
which is a subdirectory of the current directory simply type:
C> BCMOVE \HOLDFILS\OTHRFILE.DOC
the current directory is assumed as the target path.

3. COPYRIGHT AND STATEMENT OF LIABILITY

BCMOVE.EXE and BCMOVE.DOC are copyrighted (c) 1990 by Barry L.
Campbell. They are released as FREE SHAREWARE. No payment is
required for the use of this program.

BCMOVE is fully-supported software. I will reply to comments,
questions, suggestions, etc. received via U.S. Mail (at the
address appearing at the end of this documentation file) or
EASYPLEX on CompuServe (I.D. number 73507,732). I welcome your
comments and suggestions for improving BCMOVE and I will be happy
to answer questions about its use and function. Although I have
tested BCMOVE within an inch of its life, I also welcome your
comments regarding BUGS (yeach!) you might come across.

Although BCMOVE is copyrighted, you are ENCOURAGED to make a backup
copy for yourself and to copy and share BCMOVE with your friends
and associates.

- Individuals copying BCMOVE cannot charge for the copies.
- Bona-fide users groups may charge reasonable media and
distribution fees (not to exceed $10.00) for the copies.
- Software distribution services (those in business to make
a profit from the distribution of SHAREWARE and public
domain software) may charge a reasonable fee (not to exceed
$10.00) after obtaining written permission from the author.

No one may make any changes to the program code. No one may make
any changes to the documentation. The documentation file (this
file) MUST accompany any distribution of BCMOVE.

The author, Barry L. Campbell, promises that the program, BCMOVE,
will perform in substantial conformity with the user documentation.
The author makes no warranty of any kind, expressed or implied,
including but not limited to implied warranties of merchantability
and/or fitness for any particular purpose. The author shall not
be liable for any damages, whether direct, indirect, special or
consequential arising from a failure of the program to operate in
the manner desired by the user. The author shall not be liable
for any damage to data or property which may be caused directly or
indirectly by the use of the program.

IN NO EVENT SHALL THE AUTHOR BE LIABLE TO YOU FOR ANY DAMAGES,
INCLUDING ANY LOST PROFITS, LOST SAVINGS OR OTHER INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OR YOUR USE OR INABILITY TO USE
THE PROGRAM, OR FOR ANY CLAIM BY ANY OTHER PARTY.

4. COMMAND LINE SYNTAX

The command line syntax of BCMOVE is:

C> BCMOVE SourcePath [TargetPath] [/Switches]

The SourcePath must always be specified (even if it is just *.*).
If the TargetPath is omitted then the current directory is assumed.
The optional switches must be preceded by the '/' (forward slant)
character. All command line parameters must be separated by a
space.



5. THE FUNCTION OF BCMOVE

BCMOVE will move a file or files from one directory or drive to
another directory or drive. When finished, there is only one copy
of the file, that on the target path.

You must specify a SourcePath on the command line. This can be a
filename, a wildcard filespec, the full path designator of a file,
a subdirectory name, the full path designator of a subdirectory,
etc.

The TargetPath is optional and is assumed as the current directory
if it is omitted.

The switches (see section 6) are optional but must be preceded by
a '/' character if used.

EXAMPLES:

C> BCMOVE MYFILE.TXT B:\
will move the file MYFILE.TXT (in the current directory) to the
root directory of drive B.

C> BCMOVE B:\ <---TargetPath assumed to be current dir
will move all the files in the root directory of drive B to the
current directory.

C> BCMOVE *.PAS ..
will move all .PAS files on the current directory to the parent
directory (the directory one level above the current directory).

C> BCMOVE C:\HOLDDIR\*.* \
will move all files on the directory called HOLDDIR on drive C to
the root directory of the current drive (C in this case).

When moving files between directories on the same disk, DOS
Function 56h is used to simply move the directory information of
the file to the new directory and not move the data of the files
stored in the data area of the disk. This is fast, and since it
does not touch the data, very safe.

When moving file between two different disks, the file is copied
to the TargetPath first then the SourcePath file is deleted. When
more than one file is moved in this manner each file is treated
individually (first copied then source deleted then go to next
file).

BCMOVE uses all available memory to buffer the file copy operations
so even large files (usually) require only one disk read and one
disk write operation (depending on available memory).

If the source file is marked as a READ ONLY file and an attempt is
made to delete it after a disk-to-disk file move, BCMOVE will fail
to delete the file and show an error message. You may then change
the READ ONLY status flag (using whatever utility you choose) then
delete the file yourself. On same-disk moves, BCMOVE will move a
READ ONLY file without problems.

If the file you are moving already exists in the TargetPath, BCMOVE
will query you as to whether or not you wish to replace the file.
This works both on same-disk moves and disk-to-disk moves. If you
specify the /N (no query) switch (see section 6) on the command
line (or clone BCMOVE with this switch set on, see section 8) then
BCMOVE will replace existing files without asking (like the DOS
COPY command does).

BCMOVE will rename files while moving just as DOS COPY does.
BCMOVE can actually be used instead of DOS RENAME (although I don't
know why anyone would do this) by specifying a new name for the
file in the same directory. For example:
C> BCMOVE MYFILE1.TXT MYFILE2.TXT
will simply rename MYFILE1.TXT as MYFILE2.TXT in the current
directory.

BCMOVE will also make a new directory for you if the one you
specify doesn't already exist. For example:
C> BCMOVE *.TXT C:\TEXTFILS\HOLDFILS
if the subdirectory HOLDFILS doesn't exist, BCMOVE will prompt you
with "Make New Directory? " and wait for your response. If
you type 'Y' then the directory HOLDFILS will be made and all the
*.TXT files in the current directory will be moved to it. If you
answer 'N' then BCMOVE will quit without moving anything. If you
use the switch /M (make new directory) on the command line (see
section 6) or clone BCMOVE with the /M switch ON (see section 9)
then BCMOVE will make the new directory without asking.

Once in a while you may "fool" BCMOVE so that it doesn't know
whether you wish to rename the file you are moving as the
TargetPath or make a new directory as the TargetPath then copy the
file to this new directory. When this situation occurs, BCMOVE
will ask you to clarify by prompting:
1-Rename file on move
2-Make new directory
0-QUIT <0/1/2>
you then answer by pressing 1 to rename the file, 2 to make a new
directory or 0 to quit the operation without doing anything. As
an example:
C> BCMOVE ONEFILE.TXT C:\HOLDAREA\ONEHOLD
you may mean to RENAME the file ONEFILE.TXT to ONEHOLD and move it
to the HOLDAREA directory on drive C ---OR--- you may mean MAKE A
NEW DIRECTORY called ONEHOLD then move the file ONEFILE.TXT to this
new directory. BCMOVE will prompt you as mentioned above for your
intention. If you use the switch /R (RENAME) on the command line
(see section 6) or clone BCMOVE with the /R switch ON (see section
8) then BCMOVE will always RENAME the file when a situation such
as this occurs. If you use the switch /M (MAKE NEW DIRECTORY) on
the command line (see section 6) or clone BCMOVE with the /M switch
ON (see section 8) then BCMOVE will always MAKE A NEW DIRECTORY
when a situation such as this occurs.



6. SWITCHES

There are three optional switches available with BCMOVE. They are:
/N or /n -- No query on existing file replacement
/R or /r -- Rename file when moving multiple file or when
confusion occurs (see above)
/M or /m -- Make new directory when moving multiple files or when
confusion occurs (see above)

These switches may be used on the command line by preceding them
with the '/' (forward slant) character and separating them from the
rest of the command line with a space.

Any switch may be used individually or two may be used together.
When using more than one switch ONLY ONE '/' character is used and
there can be NO SPACE between the switches.

The /n switch can be combined with either of the other two switches
(/r or /m) but the /r and /m switches CANNOT be used together.

These are the ONLY valid switch settings:
/N
/R
/M
/NR or /RN
/NM or /MN

If a switch has been cloned to be in its "ON" condition (see
section 8) then the switch can be turned "OFF" by specifying it on
the command line.
For example, if the /n switch has been cloned ON (meaning do not
query before replacing an existing file) and you specify the /n
switch on the command line, then BCMOVE WILL QUERY before replacing
an existing file.
If the /r (rename) switch has been cloned ON (meaning rename files
instead of making a new directory if confusion about which of these
to do occurs) and you specify the /r switch on the command line,
then BCMOVE will prompt you to clarify your intention. If you
specify the /m switch in this case, this will OVERRIDE the /r
switch and BCMOVE will MAKE A NEW DIRECTORY instead of renaming a
file.


7. WILDCARDS

BCMOVE responds to wildcards just like the DOS COPY command does.
The '*' and '?' wildcard characters may be used as they are with
DOS COPY. Here are some examples to clarify:

1)
*.* means ALL FILES regardless of filename length

????????.??? is just the same as *.*

??????.??? means all files that have no more than six name
characters and any number of extension chars

?????.?? means all files that have no more than five name
characters and no more than two extension chars

*.* and ????????.??? match BCMOVE.EXE, A.BCD, THISFILE, THAT.FIL,
and ANYFIL.E. ?????.?? matches A.BC, THAT.FI, ANYFI, and A.B
but not BCMOVE.EXE, THISFILE, nor THAT.FIL.

2)
The '*' character replaces ALL characters on one side of the 'dot'
or 'period' character in the full filename. This 'dot' separates
the name from the extension. ONLY ONE '*' character may appear on
one side of the 'dot'. The '*' may be combined with UNAMBIGUOUS
characters (not the '?') on the same side of the 'dot', but it must
be the last character on its side of the 'dot', as:
A*.PAS means all .PAS files that start with the letter
'A', regardless of the length of the name. The
files A.PAS, ABCD.PAS, AAABBBCC.PAS all match this
wildcard.
*A.PAS is the same as *.PAS, the 'A' is not recognized

The '?' character replaces ANY ONE CHARACTER. You may limit files
to a definite length name or ext by using the '?' character. Where
the specification *.PAS will match ALL .PAS files regardless of the
length of the name (A.PAS, ABCD.PAS, AAABBBCC.PAS) the
specification ????.PAS will match only .PAS files with NO MORE THAN
a four-letter name (ABCD.PAS, AAAA.PAS, A23.PAS and A.PAS
--but not-- ABCDE.PAS nor AAABBBCC.PAS).

You may not combine the '*' and the '?' characters on the same side
of the 'dot'. If you do, the '*' character will win out and any
length name (or ext) will match. For example:
A*.PAS is the same as A?*.PAS and A??????*.PAS. The second two are
incorrect but will produce useable results, the same results gained
by using A*.PAS.

3)
if you specify just a subdirectory name as the SourcePath then all
files in the subdirectory will be moved.
C> BCMOVE C:\HOLDFILS B:\ is the same as
C> BCMOVE C:\HOLDFILS\*.* B:\ and will move all files from the
subdirectory HOLDFILS on drive D to the root directory on drive B.

4)
if you specify just the drive name as the SourcePath OR the
TargetPath then the current directory of that drive will be used.
If the current directory of drive B is B:\TEXTFILS\HOLDTHEM and you
issue the command:
C> BCMOVE *.* B:
then BCMOVE will move all files in the current directory of drive
C to the \TEXTFILS\HOLDTHEM directory of drive B.

5)
You can also use alternate path designators in place of the full
path name. For example if the current drive/directory is
C:\MYFILES, then all of these terms mean the ROOT directory of
drive C:
C:\ <--- full path name
\ <--- means the root directory
.. <--- means the parent directory (in this case, the root)
If the current directory is C:\LEVELONE\LEVELTWO\LEVEL3 and you
issue the command:
C> BCMOVE *.* ..
BCMOVE will move all the files in the current directory (LEVEL3)
to the PARENT directory (LEVELTWO).


8. CLONING BCMOVE SWITCHES

As supplied, all three switches, /N /R and /M (see section 6) are
set "OFF". BCMOVE will get your permission to replace an existing
file and will ask you to clarify if a rename/make new directory
confusion occurs (see section 6 for an example of this possible
confusion).

Using the command:
C> BCMOVE /N CLONE
will clone the copy of the BCMOVE.EXE file you just ran so that the
/N switch is "ON" when BCMOVE is run from now on. That is, BCMOVE
will NOT query but will replace existing files without asking.

The /R and /M switches can also be cloned "ON". As when using the
switches in the command line, you can combine /N with /R and with
/M but you cannot specify the /R and /M switches together.

The command:
C> BCMOVE / CLONE
will return all switches to their (as supplied) "OFF" state.

All the valid switch combination for the clone command are:
/N -- turns /N "ON" and /R and /M "OFF"
/R -- turns /R "ON" and /N and /M "OFF"
/M -- turns /M "ON" and /N and /R "OFF"
/NR or /RN -- turns /N and /R "ON" and /M "OFF"
/NM or /MN -- turns /N and /M "ON" and /R "OFF"

BCMOVE's clone command will clone the copy of the file you just ran
so you may rename BCMOVE.EXE to anything you like (MOVE.EXE for
example) and clone will still work. Also you may run BCMOVE from
anywhere on any disk and the clone function will find and clone the
file you ran.

If you compress BCMOVE.EXE with the new LZEXE.EXE file compression
utility or if you alter BCMOVE.EXE in any way which changes its
size then the clone command WILL NOT work and an error message will
be issued. If you wish to compress BCMOVE.EXE then clone BCMOVE
first. Also, keep a copy of the uncompressed version around and
clone then compress this version if you wish to change cloned
switch settings.



9. ERRORLEVEL RETURN CODES

BCMOVE will set the DOS ErrorLevel codes upon exiting.
ErrorLevel=0 indicates successful completion of the action
requested (move or clone). Any non-zero ErrorLevel code indicates
some sort of failure of the action requested.

The specific codes returned are:
1- Invalid number of parameters
2- Invalid switch(s) (on command line or in clone command)
3- SourcePath not found or File not found
4- Unable to open file (to copy or clone)
5- Error reading file (on copy or clone)
6- Error writing file (on copy or clone)
7- Unable to delete source file (on copy, source file READ ONLY,
for example)
8- Insufficient memory for operation (on copy) (very unlikely)
9- Cannot make new directory
10- BCMOVE file not found (on clone)
11- Non-specific file error
12- File cannot be moved onto itself
13- BCMOVE file has been altered (cannot clone)

10. REDIRECTION OF OUTPUT

BCMOVE's screen output can be redirected to any valid device (a
file, a printer, the 'NUL' device) using the '>' DOS redirection
symbol. This is useful if you use BCMOVE in a batch file.
Redirect to the nul device and check errorlevel on exit to
determine action completed. To redirect screen output to the nul
device use, for example:
C> BCMOVE *.* C:\HOLDFILS > NUL
all messages (including error reports) will be redirected to the
nul device (the great bit-bucket in the sky, never to be seen
again).


11. ABOUT THE AUTHOR

I am Barry Campbell, a member of the Association of Shareware
Professionals, and author of TwoDisks -- a utility file used to
read two directories at the same time, compare these directories
and allow files to be copied, moved or deleted with ease.

I can be reached for comment at:
Barry L. Campbell
P.O. Box 1123
Kaneohe, HI 96744-1123

or via CompuServe EASYPLEX, ID 73507,732






 December 10, 2017  Add comments

Leave a Reply