Dec 252017
 
Moves files between disks or directores. Just like copy, but moves.
File MF.ZIP from The Programmer’s Corner in
Category File Managers
Moves files between disks or directores. Just like copy, but moves.
File Name File Size Zip Size Zip Type
MF.DOC 17269 5551 deflated
MF.EXE 17467 10536 deflated

Download File MF.ZIP Here

Contents of the MF.DOC file



MOVE.EXE Ver. 4.1





The MF.EXE Utility




What is MF.EXE?




MF.EXE is a utility program that DOS forgot. Some-
times you don't want to COPY a file; you want to put it some-
where else without leaving a copy behind...in other words, you
want to MOVE it.

As the author, I assume no liability for the use of the product.
MF.EXE, all of the files in MOVE-V4.ARC, and MOVE-V4.ARC itself
are provided AS IS without any warranty, expressed or implied,
including but not limited to fitness for a particular purpose.



Why MF.EXE?

Working on any type of file allowable under DOS, it provides for
moving a file (or files) from one disk to another, to different
directories on the same or different disks. MF moves file bytes
in large blocks while minimizing the need for memory. The target
will end up the same exact size as the source. Despite the size
of MF.EXE, it moves somewhat faster than COPY copies, and a lot
faster than COPY followed by DEL. An option lets MF move (rename)
a subdirectory of a disk, using the same flexible syntax as for a
file move.


DOS does not include a `Move' utility -- a program that will
place a source file at a target location without leaving behind
the source file. DOS forces users to use the COPY and then the
DEL (or ERASE) commands. This insures a certain amount of
security against removing a (source) file when the new (target)
file content is not identical to the source. Separating the COPY
and DELETE procedures into two commands allows (enforces) the
opportunity to check that the copying has occurred and to compare
source and target content before deleting the source. However,
it is extremely tedious, especially when you need to move large
numbers of files.

A batch file taking parameters from the command line can be
used to copy, compare and delete, but batch files cannot do much
error checking. There are a number of Move utilities that
overcome the shortcomings of the batch file method and allow
moving files across disk directories or renaming directories on a
disk. However, these `MOVE' file utilities usually either will
not move a file across disks or will not rename directories.






These seemed unnecessary shortcomings; thus, MF.EXE, was written
to overcome them. MF.EXE is strictly a command line utility to
serve a simple purpose. It is not an all around file manager--
on the other hand, it doesn't take as long to load nor spend
lots of time re-writing the screen. In other words, MF.EXE is
optimized for speed.


MF.EXE would be a lot smaller if it did little or no error
checking and if it did not allow the parameters to have a wide
range of syntax. MF.EXE sacrifices its byte size for ease of use
(but without sacrificing speed of execution).



How Does It Work?


MF.EXE will work on PCs bearing the registered IBM trademark and
true compatibles. MF.EXE follows DOS COPY syntax as much as
possible. The rules and flexibility of syntax are:

1) MF.EXE will accept global characters in the source
filespec. Unlike DOS COPY, it will not allow global
characters in the target filespec. If you use global
characters in the source filespec, then no target
filespec is given -- target file(s) will have the same
name(s) as the source file(s);

2) if you do not specify a target the default drive, path
and the source filename will be used by MF.

3) you must give a source filespec;

4) you may give a source path (which must include a \),
or else the default directory of the source drive is
used;

5) you may give a source drive or else the currently
logged drive is used;

(Standard DOS allows up to 26 drive names, A-Z, by
specifying a `last drive' with the line
"LASTDRIVE=x"
in your Config.sys file.) If you specify a drivespec
that does not exist on your system, MF.EXE will return
a syntax error message.

6) you may not give a target filespec if global charac-
ters are used in the source filespec; whenever a
target filespec is not given, the source filename is
used by MF.EXE for the target filename;

7) if you use the /S option, source and target names can
be subdirectory names, in which case the source dir






will be renamed to the target dir (this requires DOS
3.x);

8) you may give a target path, else the default directory
of the target drive is used;

9) you may give a target drive (so long as it is Drive A:
through Z:) or else the currently logged drive is used
(if you specify a drivespec that does not exist on
your system, MF will return a syntax error message);

10) MF will move Hidden files and Read-only files if you
want, prompting you whenever a source or target is
Hidden or read only and whenever the target file name
specifies an already existing file. Target files will
have the same file attributes as their source files;

11) MF.EXE does not touch system files, their special at-
tribute indicating they should not be moved around
except in special circumstances and then, usually, via
some utility which is part of the program which the
SYS belongs to. MF will tell you if you tried to move
a file with a SYS attribute.

If the user violates the syntax rules, no files will be
corrupted. If a true copy of the source file is not made at the
target, then the program aborts with a display of correct syntax.
When an error occurs due to incorrect syntax, the program aborts
with a display of correct syntax.

Fortunately, unlike the DOS (2.x & 3.0) COPY command, if you
use while in the root directory and \ filename> for the target, MF.EXE will not allow the user to
copy (or move) the source file to itself. Such DOS COPY attempts
result in butchered files.

I/O is checked whenever I/O occurs in the program. The user
has the option of aborting the program whenever the program pre-
sents a prompt. Additionally, THE USER CAN BREAK OUT OF (ABORT)
THE PROGRAM BY PRESSING THE ESCAPE KEY, CTRL-BREAK, OR CTRL-C.
Regardless of when the user signals the program to abort, it will
do so only occurs when no I/O is occurring; if the program is
in the middle of a move when the ESC key is pressed, it will
finish that move before stopping. This prevents incomplete file
moving when a user changes his or her mind midstream.

Available target disk space is checked to insure that there
is room to move. When the target filename names a file which
already exists at the target location, that space is included
in the amount of target disk space available -- since two files
cannot exist in the same dir with the same name, a move would
have to overwrite such a file. When the target already exists,
the user is asked whether it is okay to overwrite.







Technical note: The required amount of target space to move
a file is based on the cluster size of the target disk
since DOS will allocate space on a disk for files only
in even cluster-size increments. For example, on a
360K floppy, DOS allocates space 1024 bytes at a time.
Thus,a 70 byte file will need 1024 bytes of disk space
in order to be written to a 360k floppy. MF automati-
cally takes the cluster size into account when check-
ing for adequate disk space. Note, however, that a
moved file will always be exactly the same size as its
source, no matter how many clusters it occupies on a
disk.**

When disk space available for a target file is insufficient, the
user is asked if it is okay to continue with the next source file
to move (if a global filespec has been given). This allows the
user to stop the program rather than wading through a series of
"Insufficient disk space for target file " messages for
every source file when the target disk is completely full.

Technical note: To maximize speed and portability, MF does not
incorporate code to require or emulate the presence of a math co-
processor such as the 8087 or 80287. In exchange for the speed
that this provides, a limit is set on the largest amount of free
disk size that MF can handle accurately, that limit being any
number that can be written in 11 digits or less, not counting
commas (in other words, a maximum size of 99,999,999,999 bytes.)
Any and only larger digits are rounded to the nearest even number
But 99 BILLION bytes is more than adequate for even the largest
hardisks commonly used. Free disk space is the only 'real' used
by MF.**

MF can move filles up to 2 billion bytes each in size.

Insufficient disk space for the moving of a file could mean
only that a particularly large file cannot fit onto the target.
MF.EXE allows the user the choice of continuing on to the next
source file to move in case the target has room for that file.
Prompts remain on the screen until the user types one of the
prompted key responses, one of which allows quitting the program.

If you know you want to overwrite existing target files, you
don't have to wade through prompts as the program runs asking if
it is okay to overwrite the existing file. You can add an
option switch to the MF.COM command line:

/O, /D, or /S.

Option switch /O will force MF to overwrite existing target
files, if they are encountered, and moves Read-only and Hidden
files without prompting for permission. /D disallows overwriting
targets files and moving of any Hidden or Read-only files. The
/S option causes MF to become a subdirectory mover, allowing the
user to rename subdirectories on a disk.







Each option switch, and everything else for that matter can
be typed in upper or lower case. Options can immediately follow
the MF command name or be separated from the command name by one
or more spaces. Thus MF /o, mf/o, and MF/O are all acceptable.
The option switches MUST be separated from the source and target
filenames by one or more spaces. Only one option switch is
allowed since each directs the program to behave differently from
the others. If you give more than one option switch, no harm
will be done to any files. If you specify two options and
include a space between them, then the program will try to inter-
pret the second option switch as a source filespec and report
that it could not find the file. Or, if two option switches
are given without spaces between them, then only the first switch
will be observed by the program.





How Does One Remember the Syntax Easily?


If you type MF and press enter, you will get a simple
summary display of correct syntax to help you remember these
simple flexible rules.

If you don't give a target filespec, then each target file
inherits the filename of its source file.

If you don't specify a drive, the current one is used.

If you don't specify a path, the current one of the relevant
drive is used.

For example, suppose you are in a directory on drive C:
called BIGDIR and want to move a file called TEST.FIL to a
subdirectory of BIGDIR called SMALLDIR. . .to do this you could
type

MF \BIGDIR\TEST.FIL \BIGDIR\SMALLDIR\TEST.FIL

or you could type

MF TEST.FIL SMALLDIR

Either way, TEST.FIL will be MOVEd from \BIGDIR to
\BIGDIR\SMALLDIR.








Will MF.EXE RENAME DIRECTORIES?


You can use MF.EXE to rename a directory on a drive (except,
of course, the root directory) if you are using DOS3.0 or higher.
For example, to rename the subdirectory of BIGDIR from SMALLDIR
to TINYDIR you would type

MF/S \BIGDIR\SMALLDIR \BIGDIR\TINYDIR

Technical note: MF allows you to use the .. and . speci-
fications that DOS treats as the names of the current
& parent directory. You can move any subdirectory on
any drive and the operating system will be informed of
the change. So, for example, if you have your DOS
prompt display the current directory, any change any-
where on that path will immediately show up in the DOS
prompt. If you use MF to change the name of the
current directory on any drive, MF is smart enough to
keep that "newly renamed" directory current for that
drive.**


What If I Use 43 or 50 lines per screen?


Depending on the IBM compatibility of your monitor driver
card, MF.EXE scrolls normally whether or not your screen mode is
set to display 25, 43 or 50, etc. lines. Further, MF always
leaves your screen in the very same mode, and with the very same
colors/character-brightness that was on the screen when before MF
was started.

If you have suggestions or comments regarding the program, I
would be glad to hear them.

Scott Hieber
c/o One World Trade Center
Rm. 64N
New York, NY 10048

Or leave me a message on the Hi-Tech BBS at 212-769-4799 or
212-769-4734.


 December 25, 2017  Add comments

Leave a Reply