Dec 172017
Movdir moves directories, their contents and subdirectories quick. | |||
---|---|---|---|
File Name | File Size | Zip Size | Zip Type |
MOVEDIR.DOC | 7332 | 2791 | deflated |
MOVEDIR.EXE | 22515 | 12579 | deflated |
Download File MOVDIR.ZIP Here
Contents of the MOVEDIR.DOC file
MOVEDIR (c)1993 LAX-POB 610-Corvallis, OR. 97339; compsrv 73340,661
USAGE: movedir sourcedirectory targetdirectory [Flags]
forming: \targetdirectory\sourcedirectory.
Flags:
/a allows movement of restricted attribute(H,S,R) files.
/d author's use only, a partial display of what would be done.
/f allows copy over a pre-existing file.
/k allows transfer to pre-existing directories.
/m makes the target directory if it does not exist.
/q quiet during operations except errors.
/q1 reports file moves and copies only
/q2 reports directory moves only
/r removes empty source directory after /s or /t operations.
/s moves contents of source(files & subdirectories), not source itself.
/t moves contents of source(subdirectories only), not source itself.
MOVEDIR is designed to move directories. Intended for use from the
DOS command line the format for usage is:
MOVEDIR sourcedirectory targetdirectory [FLAGS].
WITHOUT FLAGS
Suppose you have two branches of your directory tree that look like:
\one\two\three\four\five and \a\b\c. Then the command:
MOVEDIR \one\two\three \a\b
would create \a\b\three\four\five and leave behind \one\two. The contained
files would of course be moved along with the appropriate directories. See
notes on /a and /f below.
Notes:
What if there are duplicate directory names? That is, suppose you
have branches \one\two\three\four\five and \a\b\three and you issue a command
identical to the one above. You MAY NOT want the files of directory
\one\two\three mixed with the contents of directory \a\b\three! So what
happens is 1)you are informed that you need a /k flag to use the pre-existing
directory \a\b\three, 2)the directories \a\b\three\four and
\a\b\three\four\five are NOT made, their contents are NOT transferred. Any
other transfers that do not entail duplicates will execute properly. If you
DO want the two \three directories mixed together, use the /k flag.
What happens if source and target are on different disks? Across
disks, the contents of the directories are copied and then the source
deleted. The specifics are taken care of by the command. It takes longer
than a simple xcopy as files and directories need to be deleted.
When files are moved or copied, attributes as well as date and time
stamps ARE preserved. While the attributes of directories are preserved, the
date and time stamps of directories ARE NOT preserved. The directories are
manufactured with the date and time current when the command was employed.
WITH /s FLAG (/r flag)
With the /s flag the contents of the source directory are moved to the
target but the source directory itself is not. So,
MOVEDIR \one\two\three \a\b /s
results in the contents of \one\two\three being placed into the
contents of \a\b. Any file that was in \one\two\three will now appear in \a\b
and the same is true for any subdirectory. See the notes on file movement
below. This routine combines the source and target directories. The source
directory is not eliminated. However, if the /r flag is present and the
source directory is empty, the source directory will be removed. Use this
flag sparingly. If you inadvertently merge two directories, it can be tedious
to separate them again.
WITH /t FLAG (/r flag)
With the /t flag, only the subdirectories of the source are moved to
the target, not the files contained within the source. The source directory
will not be removed. However, if the /r flag is present and the source
directory is empty, the source directory will be removed.
/f FLAG
Obviously, some of the options above allow for the merging of files
from two different directories and there is always the possibility in today's
megadirectories that two files may have the same name. In this case, the
routines will not be able to transfer a source file with the duplicate name to
the target directory unless the /f flag is present. This flag allows either
1)that the sourcefilename be copied to the targetfile and then the source file
deleted(if source and target are on different disks) or 2)that the targetfile
is first erased followed by moving the sourcefile to the targetfile
location(if both files are on the same disk). When the command is attempted
without the /f flag you will be informed of the problem, and you will also be
informed that the directory could not be removed. To transfer the remaining
file(s), just issue the identical command line with the /f appended. This
will then effect the desired result.
/a FLAG
Files that are hidden, system or read-only are considered to have
restrictive attributes. Some of them have to stay in the directory where they
originated. Some of them you do NOT want copied over. Unless the /a flag is
present these files will not be moved or copied. Restricted source files
are hidden or system. Restricted target files are hidden, system or
read-only. For example, if the source contains a file which is hidden or
system and the target does not have a file of the same name, then the /a flag
will be required to move or copy it over. If the target has a file by the
same name then the /f flag will also be required. Again, the command will
inform you of the problem and failure to remove the source directory. Again,
to get around the problem, simply reissue the command with the /a flag
appended.
/m FLAG
If the target directory does NOT exist as you wrote it on the command
line, the /m flag will manufacture it and then proceed with commands given.
There is no restriction on how many levels there are in the newly manufactured
target directory.
/q FLAG
During routine use, the command outputs to screen which directories
were made and re-used, which files were transferred and how (move or copy).
This flag drops all of this except for the error notifications. The flags /q1
and /q2 also restrict the output in the way indicated above.
Other notes:
The directories . and .. are accepted.
At the conclusion of its operation, the command will check the
environment to see if any of the paths present there were moved. If they
were, you will be informed of it. The command makes no changes to your
environment.
Hitting Escape at any time during file move/copy operations causes the
command to abort safely after the current file is moved/copied. Striking any
other key will cause the command to pause and another strike will cause it to
resume. Ctrl-break is NOT disabled in this command. Using it will have
unpredictable results regarding the current file being moved.
The best way to "see" the results is with a graphic directory display
such as tree.
Movedir is supplied free of charge to the individual, non commercial
computer user. The author would truly appreciate your report of any bugs or
suggestions.
ANY COMMERICAL USE OR DUPLICATION OF THIS COPYRIGHT MATERIAL WITHOUT
PRIOR LICENSING IS FORBIDDEN BY FEDERAL LAW. VIOLATORS MAY BE SUBJECT TO
CIVIL AND/OR CRIMINAL PENALTIES.
December 17, 2017
Add comments