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 ]
COPY (usercode)MCPName [ ON familyname ] { TO | AS } "localname"
[ { FROM | VIA } ipnameoraddress ] [ PORT portnbr ]
[ TEXT | BINARY ] [ INDIRECT ]
Use this keyword
|
For
|
TO
|
The folder or directory destination
|
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.
|
TEXT
|
Translating the file contents between ASCII and EBCDIC and adding or removing carriage returns and line feeds.
|
BINARY
|
Preventing any translation
|
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"
|