Copy file from target computer to development computer





SimulinkRealTime.copyFileToHost(file_name) copies file file_name from the default target computer to the development computer.

Note: The SimulinkRealTime.fileSystem object will be removed in a future release. See the release note for file system commands to use instead. These commands use the SimulinkRealTime.openFTP function and the functions for the MATLAB ftp object.


SimulinkRealTime.copyFileToHost(target_obj,file_name) copies file file_name from the target computer represented by target_obj to the development computer.


collapse all

Copy file from current folder on default target computer.


Copy file from full path location on target computer TargetPC1.

tg = slrt('TargetPC1');

Input Arguments

collapse all

If the argument is a character vector or string scalar, it must be the name assigned to a previously configured target computer.

If the argument is a variable containing an object, it must be a object representing a previously configured target computer.

Example: 'TargetPC1'

Example: tg

Data Types: char | string | struct

If the argument is a file name, the file must be in the current folder on the target computer, as indicated by the function SimulinkRealTime.fileSystem.pwd.

The file is transferred from the target and written with the same file name to the current folder on the development computer.

Example: 'myFile.txt'

Example: 'c:\subDir\myFile.txt'

Data Types: char | string

Introduced in R2014a