dir - List contents of current directory on target PC

Syntax

MATLAB® command line

dir(file_obj)

Arguments

file_obj

Name of the xpctarget.ftp or xpctarget.fs object.

Description

Method of xpctarget.fsbase, xpctarget.ftp, and xpctarget.fs objects. From the host PC, lists the contents of the current directory on the target PC.

To get the results in an M-by-1 structure, use a syntax like ans=dir(file_obj). This syntax returns a structure like the following:

ans =
1x5 struct array with fields: 
name 
date 
time 
bytes 
isdir

where

Examples

List the contents of the current directory for the file system object fsys. You can also list the contents of the current directory for the FTP object f.

dir(fsys) or dir(f)
4/12/1998     20:00             222390        IO  SYS
 11/2/2003    13:54                  6    MSDOS  SYS
 11/5/1998    20:01              93880  COMMAND  COM
 11/2/2003    13:54  <DIR>           0     TEMP     
 11/2/2003    14:00                 33 AUTOEXEC  BAT
  11/2/2003   14:00                512 BOOTSECT  DOS
  18/2/2003   16:33               4512 SC1SIGNA  DAT
 18/2/2003    16:17  <DIR>           0    FOUND  000
 29/3/2003    19:19               8512     DATA  DAT
 28/3/2003    16:41               8512 DATADATA  DAT
 28/3/2003    16:29               4512 SC4INTEG  DAT
  1/4/2003     9:28          201326592 PAGEFILE  SYS
 11/2/2003    14:13  <DIR>           0    WINNT     
    4/5/2001  13:05             214432 NTLDR      '     
  4/5/2001    13:05              34468 NTDETECT  COM
 11/2/2003    14:15  <DIR>           0  DRIVERS     
  22/1/2001   11:42                217   BOOT    INI'     
 28/3/2003    16:41               8512        A  DAT
 29/3/2003    19:19               2512 SC3SIGNA  DAT
 11/2/2003    14:25  <DIR>           0  INETPUB     
 11/2/2003    14:28                  0   CONFIG  SYS
 29/3/2003    19:10               2512 SC3INTEG  DAT
  1/4/2003    18:05               2512  SC1GAIN  DAT
   11/2/2003  17:26  <DIR>           0 UTILIT~1     

You must use the dir(f) syntax to list the contents of the directory.

See Also

xPC Target™ file object methods mkdir, cd, and pwd.

MATLAB dir function.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS