SimulinkRealTime.copyFileToTarget

Copy file from development computer to target computer

Syntax

SimulinkRealTime.copyFileToTarget(file_name)
SimulinkRealTime.copyFileToTarget(target_obj,file_name)

Description

example

SimulinkRealTime.copyFileToTarget(file_name) copies file file_name from the development computer to the default target 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.

example

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

Examples

collapse all

Copy file from current folder on development computer to top folder on default target computer.

SimulinkRealTime.copyFileToTarget('data.dat')

Copy file from current folder on development computer to full path location on target computer TargetPC1.

tg = slrt('TargetPC1');
SimulinkRealTime.copyFileToTarget(tg,'c:\xpcosc\data1.dat')

Input Arguments

collapse all

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

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

Example: 'TargetPC1'

Example: tg

Data Types: char | string | struct

The file being copied must exist in the current folder on the development computer.

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

If the argument is a path name, the file portion of the path name is extracted as the development computer file name. The file is copied to the location indicated by the path name. The folder must exist on the target computer.

Example: 'myFile.txt'

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

Data Types: char | string

Introduced in R2014a