User`s guide

Using xpctarget.ftp Objects
Listing the Contents of the Target PC Folder
You can list the contents of the target PC folder by using xPC Target methods
on the host PC for the
xpctarget.ftp object. Usethemethodsyntaxtorun
an
xpctarget.ftp object method:
method_name(ftp_object)
Note You must use the dir(f) syntax to list the contents of the folder. To get
the results in an M-by-1 structure, use a syntax like
y=dir(f).Seethedir
method reference for further details.
For example, to list the contents of the C:\ drive,
1 In the M ATLA B window, type the following to assign the xpctarget.ftp
object to a variable:
f=xpctarget.ftp;
2 Type
f.pwd
This gets the current folder. You get a result like the following:
ans =
C:\
3 Type the following to list the contents of this folder:
dir(f)
Retrieving a File from the Tar g et PC to the Host PC
You can retrieve a copy of a data file from the target PC 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. The syntax
method_name(ftp_object, argument_list) can be replaced with
ftp_object.method_name(argument_list)
9-7