Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

fromLocalFile

You use fromLocalFile to specify the local source file for file transfer.

The transfer type (data type) can be derived from the file name by means of autoDataSpec (see section "autoDataSpec").

File names may be a maximum of 512 characters in length. This is checked before the Ftscript is run. The length of the resulting file name (directory and filenames) is limited by the operating system in question and the openFT version. The length is the number of characters plus 1 character if directory does not end with a "/". The check is performed while the Ftscript is being run.
For further information, see section "File name attributes".

Restrictions

fromLocalFile must not contain any partner specification after de-referencing.

Format

 <fromLocalFile ref?="ID" data?="auto|char|bin|user"
                recordFormat?="std|undef|var|fix"
                maxRecSize?="int" ccsname?="string" filenames >  
   comment?
   directory?
   autoDataSpec?
 </fromLocalFile

Attributes

Name

Value

Meaning

ref?

string

Reference to another file object.
partner and directory are taken over from this if you have not specified the elements here (see section "Referencing").

data?

auto | char |
bin | user

The default value is auto. Specifies the data type.
If char, bin or user are specified then the autoDataSpec specification is ignored (see section "autoDataSpec").

record-

Format?

std | undef |
var | fix

The default value is std. Specifies the record format.
The standard openFT assignment applies (data=bin -> undef, otherwise var).
If undef is specified then the record format is undefined, e.g. in the case of binary formats. If var is specified then the record format is variable, e.g. in the case of text formats (1 record 1 line; lines can be of different lengths). If fix is specified then the record format is fixed, e.g. f80 (with recordFormat=fix and maxRecSize=80.

maxRecSize?

1-65535
(openFT <= V11:
1-32756 or 1-32767)

Specifies the record size. By default, the openFT value applies, see manual "openFT (Unix and Windows systems) - Command Interface".
If data=char then maxRecSize specifies the length of a line (to the CR/LF). Files with a line length greater than 65535 bytes must be transferred with data=bin.
For example, an Ftscript with a maxRecSize value that is not permitted in openFT V11.0 will not run in openFT V11.0.

ccsname?

string max. 8
characters

Specifies the Coded Character Set, see manual "openFT (Unix and Windows systems) - Command Interface".

filenames

See section "File name attributes".

Example

 <?xml version="1.0" encoding="UTF-8"?>
 <ftscript version="1">
   <transferFile>
     <fromLocalFile name="bin.mp3">
       <directory name="W:/openFT/ftscript/Test/data/small"/>
       <autoDataSpec charPattern="*.txt" userPattern="*.tab *.dat"
            default="bin"/>
     </fromLocalFile>
     <toRemoteFile name="bin.mp3">
       <partner name="UnixP_1">
         <transferAdmission>
           <ftacAdmission ftacAdmission="FTACADM1"/>
         </transferAdmission>
       </partner>
       <directory name="frg_eis_18"/>
     </toRemoteFile>
   </transferFile>
 </ftscript>

In the example, the local file bin.mp3 is transferred to the remote system UnixP_1 under the name bin.mp3.
No transfer mode or autoDataSpec is specified. The transfer mode is bin (default value of autoDataSpec).