COPY.TXT
Rob Lake
Aug-19-98

Notes:
o Crashes when returning from cmd_copy.  Works fine on its own
(see mod_copy.zip).  I can't figure out why myself.  I think that
there is a memory allocation problem somewhere.  Hopefully someone
more experienced can track it down.

o I named the module version of copy `cp' to resolve possible abiguity of
naming it copy.

o I don't remember exactly what time I started writing, so I figured around
Aug 1.

o Although the program accepts the /Y or /-Y switches, it does not do
anything with them, yet.

o The default mode for copying is BINARY

o Specify /a before or after the destination file, if one is given,
will append the destination with a ^Z character.  Place appropriate
warning here.  Ex. These commands will add the ^Z character:
        cp "/a cp.com cp.txt"
        cp "cp.com + /a cp.obj cp.txt"
        cp "cp.com /a cp.txt"
        cp "cp.com cp.txt /a"

o You can define the mode for all files in the command line.  Ex.
        cp "/b cp.com + /a copy.c + /a copy.obj /b cp.txt"
works (for whatever reason someone would want to do that:-).

o The following commands where tested with the module copy:
        cp c:\autoexec.bat
        cp "c:\autoexec.bat test.bat"
        cp "..\ temp"
- Given that ..\ has files.  If temp is a directory, will copy all files
to it.  If temp is a file or does not exist, all the files with be copied
to .\temp.  NOTE: Appended to temp, not over written each time.
        cp "cp.com test.com"
        cp "/a cp.com cp.txt"
        cp "file1+file2+file3 file4"
- Will ask to overwrite file4 after file1 has been copied.  This will be
fixed later.
        cp "file5+file1+file2+file3"
- This appends file1, file2 and file3 to file5.  Will ask to overwrite
file5 when file2 has been copied, if file5 does not exist.  Will be fixed
later.
- MS-DOS copy doesn't create file5 if it does not exist.  It
concatenates all to file1, it should print an error message.  This copy
creates a file5 if one does not exist.  This can be changed later.

o This command doesn't work yet:
        cp "*.c+*.h *.txt"
- If tried, will print "NOT IMPLEMENTED YET" message.  This command may be
kind of confusing.  Take for example you have a directory with these files:
file1.c file1.h
file2.c file2.h
The command above will copy file1.c and file1.h to file1.txt and file2.c
and file2.h to file2.txt.  If, say, file1.h does not exist, copy will
produce the messages:
FILE1.C
FILE1.H
File not found - FILE1.H
Invalid handle - FILE1.TXT
        0 file(s) copied
