TotalNET Advanced Server 5.2 Reference Manual

rucopy

This command copies files between TAS and an LM-NT-OS/2 server. The file name convention used when copying a file depends upon the protocol negotiated. If UNIX and the server negotiate LANMAN 2.0 or higher as the protocol, this command uses the long file name convention; otherwise, it uses the DOS 8.3 file name convention. Only the path specification permits wildcards. The system checks any file copied to a DOS server for compatibility with DOS file naming conventions. If the target file already exists, the system prompts the user to choose one from the options detailed under the Note below. This remote utility is for use only with LM-NT-OS/2-compatible servers.

Location

TNHOME/usr/bin

Usage

To copy local files to a remote server:

rucopy [-u username] [{-p password|-P}] [-v] [-c]
 	[-C charset] [-f] localfile
 	//servername/object/path

To copy remote files to a local computer:

rucopy [-u username] [{-p password|-P}] [-v] [-c]
 	[-s] [-C charset] [-a{s|h}]
 	//servername/object/path/localpath

Options

-u username

Specify the name of the user for the remote server. 

-p password

Specify username's password on the command line. No subsequent password prompt appears.

-P 

Prompt for username's password. The password does not appear as you type it. This option proves especially useful if you want to include the command but not the password in a batch file.

-v 

Give verbose output while copying files. 

-c 

Convert text files from DOS to UNIX format if copying from a remote server and from UNIX to DOS format if copying to a remote server. 

-C charset

Specify the client character set. If not specified, the character set defaults to builtin-codepage-437. Valid character sets include:

builtin-mac-roman

builtin-iso-latin-1

builtin-unicode

builtin-codepage-437

You can use additional character sets if you install TAS. 

-f 

Always overwrite existing target files. 

local_file

Specify the local path to the source file. You may repeat this option to copy multiple files. 

server

Specify the name of the remote server. 

object

Specify the name of a shared object on a remote LM-NT-OS/2 server. 

path

Specify a full or relative directory and file path on the remote server. If not specified, path defaults to the current directory. 

-s

Display files on the local monitor, instead of copying them. 

-a

Include files of one or both of the following types: 

s -- System files

h -- Hidden files

local_path

Specify the path to the target local directory. 


Note -

If a target file already exists, the system prompts the user to choose one of the following options:


O

Overwrite. The system overwrites the existing target file. 

N

New file name. The system prompts the user for a new name for the target file. 

C

Continue. The system continues without copying the file. 

A

All. The system overwrites the current target file and all subsequent existing target files included in this copy operation. This command does not prompt the user to select from these options with subsequent existing target files. 

Examples

  1. Use the following command to copy all files with extension .c to the sub-directory apps of the object root on the server aspen, display names of files as they copy, and prompt for a password, as user Andrew:


    rucopy -u Andrew -P -v *.c //aspen/root/apps
  2. Use the following command to copy files whose names end in .txt in the top directory of the object word on the server demopc to the local directory /tmp, convert the files from DOS to UNIX text format, and supply the password mypass, as user Andrew:


    rucopy -u Andrew -p mypass -c //demopc/word/*.txt /tmp
  3. Use the command below to copy the file autoexec.bat in the top directory of the shared object root on the server vampire to the local file autoexec.dos in the current directory. The object root has share-mode access and no password.


    rucopy //vampire/root/autoexec.bat autoexec.dos
  4. Use the following command to display the contents of the file notes.txt in the top directory of the shared object root on the server demopc, pipe the output to the program more, and prompt for a password, as user Templeton:


    rucopy -u Templeton -P -s //demopc/root/notes.txt | more
  5. Use the command below to copy all files with extension .h in the current local directory to the subdirectory headers of the shared object apps on the server demopc, convert the files from UNIX to DOS text format, and display names of files as they copy. The object apps has share-mode access and no password.


    rucopy -c -v *.h //demopc/apps/headers
  6. Use the command below to copy all files from the directory /tmp to the shared object paint on the server demopc, which expects the character set "shift-jis", as user joe, with password joepass2:


    rucopy -u joe -p joepass2 -C shift-jis /tmp/*.* //demopc/paint