home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
utility
/
jw.zip
/
MOVE.DOC
< prev
next >
Wrap
Text File
|
1991-11-21
|
5KB
|
109 lines
MOVE "moves" files from one drive and/or directory to another. It uses the
DOS rename function if the move is within the same drive (even if different
directories). This is much faster than physically moving the data. If the
move is between two different drives, the data is physically moved and then
deleted from its former location. A file will not be written over without
your permission. READ ONLY status will be ignored if you give permission to
write over an existing destination file (and READ ONLY status will not be
reset on the new copy). If the file you are moving (the source) is READ
ONLY, it will not be deleted and you will be advised that the result is 2
copies, the original at the source and the new destination copy.
FORMAT: move [path]source [path]destination
The usual DOS wild cards are acceptable, so MOVE \TXT\*.DOC \PVT will
move all .DOC files from the \TXT directory to the \PVT directory. Files
can be renamed while being moved by specifying the new name in the
destination. For instance, MOVE \TXT\*.DOC \PVT\*.XXX will move all of
the .DOC files from the \TXT subdirectory to the \PVT subdirectory, while
changing all of their extensions from .DOC to .XXX.
If MOVE can not find a directory with the destination name you specify, and
the remainder of your destination path is valid, MOVE will assume that a
new filename is being requested. To refer to the example above, if you
specify MOVE \TXT\*.DOC \PVT and you do not have a \PVT directory, MOVE
will assume that you want to to try to move all of the \TXT\*.DOC files
into the root directory and rename them all PVT. After it has moved the
first one, it will find a duplicate name at the destination and will give
you the opportunity to quit.
If you omit the destination entirely, MOVE assumes that the destination
is the current directory. For instance, MOVE C:\UTIL\*.DOC will be
regarded the same as MOVE C:\UTIL\*.DOC *.*.
If MOVE encounters a file name at the destination that is a duplicate
of a file name it is trying to move from the source, it offers the
following options:
Overwrite the destination file with the source file;
Skip the move, leaving source and destination files as they were;
Rename the source file and then move it, leaving the destination file
as it was;
Quit the program, doing no further moves.
The term "Overwrite" is a misnomer. The existing destination file is
actually renamed with the temporary name $$MOVE$$.$$$. It is deleted only
when the source file has been successfully copied. The deletion is done
automatically; or, if the copy process failed, the destination file is
restored to its original name. You should not find $$MOVE$$.$$$ on your
disk unless program execution was interrupted.
You can not rename a file to the same name as the directory into which you
are trying to move it. If you have a \TXT directory, you can not put a file
in it that is also called TXT (since the directory name is actually a kind
of file name). Move will report a duplicate name if it encounters this
situation.
==================================================================
MOVE can also be used to rename a directory, provided that the old
and new directory names are on the same drive.
FORMAT: move \dir\name\old \dir\name\new
Note that if your source path is more than one level deep, you can only
change the LAST level you specify in the source path (changing "old" to
"new" in the example above). For instance, if \DIR\NAME\OLD is a valid
existing path, the following will work:
COMMAND EFFECT ON OLD PATH
======= ==================
move \dir \new_dir \new_dir\name\old
move \dir\name \dir\new_name \dir\new_name\old
move \dir\name\old \dir\name\new \dir\name\new
The following will NOT work:
move \dir\name \new\name <- different parent directory
move \dir\name\old \new\name\old <- different grandparent
move \dir\name\old \dir\new_name\old <- change is not LAST level specified
move \dir\name\old \dir\new <- different levels in source & dest.
move c:\old d:\new <- different drives
You can rename the directory that you are currently in, however DOS will
not take notice of the change until you change to another directory. So if
you have set your DOS prompt to show the directory, it will continue to
show the old name until you have changed directories.
==================================================================
MOVE is freeware from Jim Wygant, copyright 1990. It can be used and
distributed at no charge, provided no changes are made in the program or
this documentation. There are no warranties regarding suitability to any
task. Use at your own risk.
If you discover bugs or problems with MOVE, please contact:
Jim Wygant (CompuServe# 73627,2043)
1130 SW Morrison, #220
Portland, OR 97205
(503) 228-3632
==================================================================
REVISIONS:
1/29/91 -- fixed an error that was wrongly reported if the destination
drive was empty.
8/7/91 -- moves to a different drive now retain the original file date
instead of stamping current date.