Winsock RCP                                        Version 1.6
Copyright 1994 Denicomp Systems
All Rights Reserved


DESCRIPTION
-----------

Winsock RCP ("Remote Copy") copies files between a PC and a remote host or
between two remote hosts.  It is similar to the Unix utility of the same name.

A "remote host" must be a system running the rshd server process.  This can
be a Unix system or another PC running Denicomp Systems' Winsock RSHD,
Winsock RSHD/95, or Winsock RSHD/NT.


REQUIREMENTS
------------

Winsock RCP requires a PC running Windows 3.1 or higher and a Windows
Sockets compatible TCP/IP stack.


SYNTAX
------

rcp [-abmhrw] [[User@][Host:]]{File | Dir} ... [[User@][Host:]]{File | [Dir]}


PARAMETERS
----------

User@   (optional)  Specifies the user name to be used at the remote
        host.  If this prefixes the Host: parameter, this user name
        overrides the user name of the PC.

Host:   Specifies the host name of the remote host.  This is not
        required if the file or directory referenced is on the PC.
        This host must be a system running the rshd server process.
        That is, you cannot use the host name of another PC running
        Windows or MS-DOS.

File	Specifies the file name of the source or destination file.  You
        may use wildcard characters to copy multiple source files.  You
        may also specify multiple source files individually by separating
        the names with spaces.

Dir     Specifies the file name of the source or destination directory.
        


The Host: parameter is required for either the source file/directory or
the destination file/directory.  Copying between two remote hosts is
permitted by specifying a Host: for both the source and destination.

If a remote host name is not specified for either the source or the
destination, you will receive an error.  Use the COPY command instead.
Do not use the Host: parameter when referencing local files; this will
not work.

If the Host is prefixed by the User@ parameter, that name is used as the
user name at the remote host.  If the User@ parameter is not used, the
local user name is used at the remote host.

The local user name is determined by first looking in the file WIN.INI
in the Windows directory.  If this file contains a section named "[RCP]"
and contains an entry named "User" in that section, the name specified
there will be used as the local user name.  For example, WIN.INI would
contain:

   [RCP]
   User=joe

If this appeared in WIN.INI, the local user name would be "joe" and
Winsock RCP would use this name at the remote host.

If this section does not appear in WIN.INI, Winsock RCP uses the Computer
Name specified in the Windows for Workgroups Network Setup (found on the
Control Panel).  This name is converted to lowercase characters and Winsock
RCP uses this name at the remote host.  Therefore, if no user name is
specified in WIN.INI, the Computer Name of the PC must be set up as a
valid user on the remote host, in addition to being included in the
remote host's /etc/hosts.equiv file.

(If you are not using Windows for Workgroups and your network does not
provide the services that Windows for Workgroups provides, you must use
WIN.INI to specify the user name or always use the User@ parameter.)

If a full directory path is not specified for a remote host, the path
begins at the user's home directory.  That is, if the file/directory
name specified after the Host: parameter does not begin with a slash (/),
it is assumed to reference a file/directory in the user's home directory.

For example, the file "joe@remhost:file.txt" refers to the file "file.txt"
in the home directory of the user "joe" on the host "remhost".

Filenames may contain either slashes (/) or backslashes (\) as directory
separators, for either the host file/directory or file/directories on the
PC.  They will be converted to the appropriate separator.

You can copy multiple files by using wildcard characters, such as * or ?.

You can also copy multiple source files by separating them with spaces.
If the source files reside on the remote host, you must specify the Host:
(and optionally the User@) parameter for each file.

If you copy multiple source files with wildcard characters or by specifying
individual filenames, the destination must be a directory.

Note that a colon (:) terminates the host name.  This causes a problem
when filenames on the PC require a drive letter (e.g. A:).  If a file
name specification begins with one character between A and Z and is
followed by a colon (:), Winsock RCP will interpret this as a drive letter
instead of a host name.  This means that Winsock RCP cannot handle one
character host names.

The destination cannot contain only a drive specification (e.g. A:).  It
must also include a filename or a directory name.  If the destination is
the current directory on the drive, use "." (e.g. A:.).

FLAGS
-----

-a    ASCII conversion.  For file(s) transferred to the remote host, all
      sequences of CR/NL (ASCII 13/10) will be converted to NL (ASCII 10).
      This is the standard Unix text file format.  For file(s) transferred
      from the remote host to the PC, a CR (ASCII 13) will be added before
      every NL (ASCII 10) if that NL is not already preceeded by a CR.  This
      is the standard MS-DOS text file format.  Without the -a flag, files
      are transferred with no translation.

-b    Binary transfer.  File(s) are transferred with no modifications.  This
      is the default, so this flag is not necessary if you want a binary
      transfer.  It is provided for command line compatibility with other
      RCP commands from other vendors.

-r    Recursively copies, for directories only, each file and
      subdirectory in the source directory into the destination directory.

-m    Run Minimized.  Normally, Winsock RCP will display a window showing
      progress and any possible error messages.  With -m, Winsock RCP will
      only display a minimized icon while running.  This is useful for
      software developers who wish to call Winsock RCP transparently from
      within their software.

-h    Run Hidden.  Like -m, but the window will be completely hidden.  Use
      with caution, since hidden windows cannot be accessed through the
      Windows Program Manager using the Task Manager, so you cannot use
      it to manually stop a transfer.

-w    Wait for Return key.  This waits for you to press the Return
      key after the file(s) are copied so you can view the list of files
      copied and any error messages from the remote hots.  If you are
      copying multiple files and the list scrolls the window, you can
      use the scrollbars to review the scrolled information.


NOTES FOR FLAGS
---------------

Specify all flags separately; do not combine flags.  For example, do not use
"-amw"; use "-a -m -w" instead.

The -a flag translates the file regardless of its actual contents.  For
example, if you transfer a non-text file using -a, it will be modified as
if it were a text file.

If you use the -a flag and you transfer multiple files, all files will be
translated as ASCII files.

Using the -a flag to transfer files TO the remote host will slow the operation
of Winsock RCP somewhat because it must read each file twice.  It reads the
file once to calculate the new translated file size, then reads it again to
transfer the data.  This is because the RCP protocol requires that the exact
file size be transmitted before the actual data in the file is sent.  Without
the -a option, the file size can be found by examining the file's directory
entry, but with the -a, the file's contents must be examined to determine the
size after CR/NL combinations are replaced with NL.

The -a flag will also slow Winsock RCP when transferring files FROM the
remote host, but only slightly.

If transmission speed is critical, consider using utilities to translate the
text files after they are transferred.

ADDITIONAL OPTIONS
------------------

There are two options you can specify in the [RCP] section of WIN.INI to
control the behavior of Winsock RCP.

The Minimize entry allows you to control the display of the Winsock RCP
window without using the -m or -h command line options.  This is useful
if you have third party software that calls Winsock RCP and you cannot
modify it to run Winsock RCP minimized or hidden through command line
options.

If you set Minimize to a value of 1 in WIN.INI, Winsock RCP will always
run minimized.  If you set Minimize to a value of 2, Winsock RCP will
always run hidden.

For example, to always run Winsock RCP minimized, specify in WIN.INI:

 [RCP]
 User=joe
 Minimize=1


If either the -m or -h options are specified on the command line, these
will override the option specified in WIN.INI.  However, there is no way
to cause Winsock RCP to run with a normal window if the Minimize option
is specified in WIN.INI.

The other option available is the BlockSize entry.  This specifies the number
of bytes that will be read from a file and sent over the network connection or
the number of bytes read from the network connection and written to a file
at one time.  Note that this does NOT change any TCP/IP parameters; it is an
internal buffer size only.  By default, this is set to a value of 512 bytes.

Normally, you do not need to change this option.  If you set it too high,
you may receive "out of memory" errors from Winsock RCP and it may limit
you to the number of recursion levels when doing recursive copies.


SECURITY 
--------

The local user name determines the file access privileges Winsock RCP
uses at that remote host.  This name also determines the ownership and
access modes of the destination file or files.

It is the remote host that determines whether or not access is granted.  If
the remote host is Unix, the name and IP address of the PC must appear in the
/etc/hosts file.  Also, one of the following conditions must be satisfied:

* The name of the PC as it appears in /etc/hosts is listed as an equivalent
  host in the /etc/hosts.equiv file on the remote host.

* If the name of the PC is not in the /etc/hosts.equiv file, the user's home
  directory on the remote host must contain a .rhosts file that lists the
  name of the PC.  Other information may also be placed in the .rhosts file;
  use "man rhosts" on the Unix system to review the format of .rhosts.
  The .rhosts file in the user's home directory must be owned by either
  the user or by "root", and it MUST have permissions of 0600.

* The user's login on the remote host does not require a password.



EXAMPLES
--------

* To copy a file from the PC to a remote host, use:

          rcp localfile remhost:/u/joe

  The file localfile is copied from the PC to the remote host remhost and
  placed in the directory /u/joe.


* To copy a file from the remote host to the PC, use:

          rcp remhost:/u/joe/remfile \lists\remfile

  The file remfile is copied from the remote host remhost to the file
  remfile in the directory \lists on the PC.


* To copy a remote file from one remote host to another remote host, use: 

          rcp host1:/u/joe/xfile host2:/u/fred/yfile

  The file /u/joe/xfile on host1 is copied to the file /u/fred/yfile on
  the remote host host2.


* To copy all of the files in the directory \docs to the a remote host:

           rcp -a -w \docs\*.* remhost:/u/docs

  All of the files in \docs are copied to the directory /u/docs on the
  remote host remhost.  The files are converted from the MS-DOS text file
  format to the Unix text file format using the "-a" flag.  As the files
  are transferred, their names will display on the screen.  The "-w" option
  tells Winsock RCP to wait for you to press Enter after the files are
  transferred so you can examine the list.


* To copy the file from a remote host to the diskette in drive A: on the PC:

           rcp mary@remhost:resume.doc a:.

  This will copy the file resume.doc from the user mary's home directory
  (since no starting directory was given after the host) to the same
  name on the diskette in drive A: on the PC.  Note the "." after the
  colon of the drive letter.  This refers to the current directory on the
  A: drive, since a destination filename or directory name is required.


* To send the entire directory tree from the PC to a remote host, use:

           rcp -r \share joe@remhost:

  The directory \share is copied from the PC to the home directory of joe
  on the remote host remhost.


SUPPORT
-------

Support is available via U.S. Mail and Compuserve/Internet.

Denicomp Systems
P.O. Box 731
Exton, PA  19341

Compuserve: 71612,2333
Internet:   71612.2333@compuserve.com

