home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR4
/
RND11.ZIP
/
RND.DOC
< prev
Wrap
Text File
|
1993-11-28
|
6KB
|
124 lines
RND.DOC
-------
Instructions for RND.COM
Version 1.1 (28 Nov 1993)
(c)1991-93 E. Meyer
RND allows you to rename or move directories with a single command, which
is much easier and faster than using DOS commands to create a new directory,
copy the contents (including subdirectories), then delete the original one.
Several other free or shareware utilities for this purpose exist, but
some are large and inefficient (RND.COM is just 2k!), some use awkward input
conventions, some can't move to another position in a tree, most can't move to
another drive, and none seem to handle changes to the current directory on a
drive correctly.
A good directory and tree display utility, such as my own DTA (dir/tree/
attrib), will be a useful aid in your use of RND. Experiment with both a
little to be sure you understand how RND works.
SYNTAX: A>rnd DIRNAME NEWNAME
Wildcards (?,*) or "parent" notation (..) may not be
used. Neither argument can be the root directory, "\".
DIRNAME must be an existing subdirectory, and NEWNAME
a valid subdirectory name that does not yet exist. Any
incomplete directory path will be filled in according to
standard DOS rules. "." may be used for DIRNAME, to
indicate the current directory. A drive alone may be used
for NEWNAME, to mean the same directory on the other drive.
If you type "RND" alone (or with the option "/?") you
will get a brief help message.
If a new path is not specified, the directory is simply RENAMED. If the
new path is different, then the tree is reorganized so that the directory
(with all subdirectories) is MOVED to a different parent directory. (You can
rename and move at the same time; see examples below.) In either case the
process is very fast, involving only rearrangement of directory information.
Only if you are moving to another drive will the files in the directories
actually have to be copied and deleted, which takes longer.
EXAMPLES: RENAMING
1. C:\WORK>rnd d:\wp writing Renames dir D:\WP --> D:\WRITING
2. C:\WORK>rnd sue susan Renames dir C:\WORK\SUE --> C:\WORK\SUSAN
3. C:\WORK>rnd . current Renames dir C:\WORK --> C:\CURRENT
EXAMPLES: MOVING
4. C:\WORK>rnd bill d: Moves dir C:\WORK\BILL --> D:\WORK\BILL
5. C:\WORK>rnd sue d:\temp\sue Moves dir C:\WORK\SUE --> D:\TEMP\SUE
6. C:\WORK>rnd \wp \urgent\wp Moves dir C:\WP --> C:\URGENT\WP
EXAMPLES: MOVING AND RENAMING
7. C:\WORK>rnd \wp \wp\letters Moves dir C:\WP --> C:\WP\LETTERS
8. C:\WORK>rnd sue \susan Moves dir C:\WORK\SUE --> C:\SUSAN
The first four examples are straightforward; the rest may call for some
explanation. Example 5 moves the SUE subdirectory out of the C:\WORK
directory into the D:\TEMP directory (which will be created if necessary).
C:\ D:\ C:\ D:\
\work --> \work \temp
\SUE \SUE
\... \...
Example 6 moves WP down the directory tree, from a subdirectory of C:\ to
one of C:\URGENT (which will be created if necessary).
C:\ C:\
\work --> \work
\WP \urgent
\... \WP
\...
Example 7 is potentially confusing. It too moves WP one level down the
tree; this time it also renames it to LETTERS, while making it a subdirectory
of a new directory (otherwise empty) called \WP!
C:\ C:\
\work --> \work
\WP \wp
\... \LETTERS
\...
Example 8 renames SUE to SUSAN and moves it up the directory tree on
drive C, from a subdirectory of C:\WORK to one of the root C:\.
C:\ C:\
\work --> \work
\SUE \SUSAN
\... \...
ERRORS
RND works on all MSDOS systems (2.x and above); it uses no low level disk
access, just standard DOS calls.
When moving directories, there must be enough free space on the disk to
create the new directory tree (and, if moving to another drive, to copy all
the files contained). Paths cannot exceed 66 characters in length.
In a batch file, the DOS ERRORLEVEL can be tested: RND returns 1 for a
bad argument, 2 for an invalid or existing directory name, 4 if it runs out of
memory, and 8 for an error encountered while attempting to move a directory
(including full disk).
VERSION HISTORY
RND 1.0 (Oct91) - First release.
1.1 (Nov93) - Handles current directory properly under DOS 5 & 6.
RND and its documentation are (c)1991-93 Eric Meyer, all rights reserved.
They may be freely distributed, but not modified or sold for profit without my
written consent. (Exception: Libraries may charge up to $6 for a disk.) The
user takes full responsibility for any damages resulting from the use of this
program. For a disk with the latest versions of all my programs send $10 to:
Eric Meyer
3541 Smuggler Way CompuServe [74415,1305]
Boulder, CO 80303 USA