Transferring Files or Folders

Use the following procedure and examples to transfer files to or from an MCP disk.

To transfer a file or folder

NOTE:To use this feature, you must have certain privileges. See Accessing File Transfer.

  • At a command prompt, type < DBEnterprise program directory>\DBEnterprise followed by a COPY command, as in the following example. Additional examples are provided below. Make sure that you enclose Windows filenames and directory names in quotation marks. Keywords and MCP filenames are case insensitive.

    COPY "
         localname" { TO | AS } (
         usercode)
         MCPName [ ON 
         familyname ]
    [ { FROM | VIA } 
         ipnameoraddress ] [ PORT 
         portnbr ]
    [ TEXT | BINARY ] [ HIDE ]
    COPY (
         usercode)
         MCPName [ ON 
         familyname ] { TO | AS } "
         localname"
    [ { FROM | VIA } 
         ipnameoraddress ] [ PORT 
         portnbr ]
    [ TEXT | BINARY ] [ INDIRECT ] [ HIDE ] [ OVERWRITE ]
        

    Use this keyword

    For

    TO

    The folder or directory destination. Files will have the same name in the destination directory as the source. To specify a file name use the AS keyword instead of TO.

    AS

    The filename destination. Use this keyword to specify a desired target name. For example, use AS if you want to retain ON < familyname> in the name of a file that is copied from the MCP environment to Windows. If the source is multiple files, the AS keyword is treated as TO and the destination will be a folder or a directory.

    FROM -or- VIA

    The host name or IP address of the DBServer. The keywords are synonymous. The ipnameoraddress is the host name or IP address of DBServer. An IP address must be enclosed in double quotation marks. The portnbr is the number of the DBServer port.

    TEXT

    Translating the file contents between ASCII and EBCDIC and adding or removing carriage returns and line feeds.

    BINARY

    Preventing any translation

    INDIRECT

    Using Indirect Disk access even though Direct Disk might be available

    HIDE

    Hiding the DBEnterprise Replication Dialog during the file transfer

    OVERWRITE

    Overwriting the destination file if it already exists without prompting for confirmation

IMPORTANT:The Windows file name or folder name must always be enclosed in double quotation marks.

When copying from Windows, the localname can include wildcard characters.

The MCPname can be a directory name, which is indicated by /=.

If a syntax error occurs, a dialog box appears with the correct syntax, provided the attempted command can be determined. Otherwise, the dialog box will show the syntax for all commands.

Examples

DBEnterprise copy "e:\batch\data\*.txt" to (PROD)batchfiles/= on mypack via "192.168.16.1" port 6100
DBEnterprise copy "y:\logs\dailyrun.log" as (admin)logfile/daily on prodpack
DBEnterprise COPY (PROD)DATA/SPAN/= ON DBPACK TO "D:\BACKUP\SPAN\DATA"