User`s guide

7 Working with Target PC Files and File Systems
7-6
For example, to list the name of the current directory of a target PC through a
TCP/IP connection,
1 In the MATLAB window, type a command like the following to assign the
xpctarget.ftp object to a variable.
f=xpctarget.ftp('TCPIP','192.168.0.1','22222');
2 Type
f.pwd;
Alternatively, you can use the xpctarget.xpc constructor to first construct a
target object, then use that target object as an argument to
xpctarget.ftp.
1 In the MATLAB window, type a command like the following to assign the
xpctarget.xpc object to a variable.
tg1=xpctarget.xpc('TCPIP','192.168.0.1','22222');
2 Type the following command to assign the xpctarget.ftp object to the tg1
target object variable.
f=xpctarget.ftp(tg1);
Alternatively, if you want to work with the files of the default target PC, you
can use the
xpctarget.ftp constructor without arguments.
1 In the MATLAB window, type a command like the following to assign the
xpctarget.ftp object to a variable.
f=xpctarget.ftp;
xPC Target assigns the f variable to the default target PC.
Listing the Contents of the Target PC Directory
You can list the contents of the target PC directory by using xPC Target
methods on the host PC for the
xpctarget.ftp object. Use the method syntax
to run an
xpctarget.ftp object method:
method_name(ftp_object)