home *** CD-ROM | disk | FTP | other *** search
- Docs for Cn.com - change name utility
- R. Trevithick, 12/12/87
-
-
- This program allows single file and directory names to be
- changed.
-
- The program is coded to simply call the DOS 56h rename service,
- which handles all the details. I wrote this merely because I
- needed a way of renaming sub-directories - which Dos supports but
- the rename command doesn't. Using DEBUG or the Norton Utilities
- for this was much too tedious...
-
- The syntax is cn oldname newname.
-
- Cn also supports the ability of Dos to rename a file from one
- directory into another on the same drive. Note that the program
- isn't finished yet, so wildcard masks are NOT supported at
- present and you must specify the full pathname of the
- destination.
-
- For example, to move the file cn.c from the \c directory to the
- \utils directory:
-
- cn \c\cn.c \utils\cn.c
-
- This MOVES the file, as opposed to copying it. The file is not
- changed in any way, but simply appears in another directory and
- disappears from the original directory. The only real advantage
- of this is that it's faster and you don't have to delete the
- original file if you don't want it there.
-
- Needless to say, if a file of the same name exists in the
- destination directory, cn will abort with an error message.
-
- This is truly the simplest program I've ever written! All it does is
- call the C library rename() function. Oh well. There's something to be
- said for clean and simple code...
-
-
- -------------Changes as of 12/12/87 revision----------------
-
- - Ported over for Turbo C compiler (original was Datalight.) Code size
- reduced from 4K to 1K.
-
-