cd

Change folder on target computer

Description

example

cd(filesys_object, folder_name) changes the currently active folder on the target computer. Prints an error if the destination folder does not exist.

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.

Examples

collapse all

Using the file system object fsys, change the folder from the current one to one named 'logs'.

tg = slrt;
fsys = SimulinkRealTime.fileSystem(tg);
cd(fsys,'logs')

Input Arguments

collapse all

File system object created by using the SimulinkRealTime.fileSystem creation function.

The file system object represents the target computer file system. You work with the target computer file system from the development computer by using file system methods.

Example: fsys

Data Types: struct

If you omit the drive letter, the command assumes that the folder path is relative to the default drive.

A fully qualified folder name can have a maximum of 248 characters, including the drive letter, colon, and backslash.

Example: logs

Data Types: char

Introduced in R2014a