# XFTPF\_DIR
> [HTML Version](xftpf_dir.htm)
_Added June 2019_
Opcode XFTPF\_DIR (\&h00400000) in conjunction with XFTPF\_SFTP allows you to create a local directory listing of a remote directory. The subroutine parameter usage is similar to that for XFTPF\_GET, with localpath specifying the filespec of the directory listing, which will be created in CSV format as follows:
"file.ext",type,permissions,owner,group,size,"ctime","mtime"
**Comments**
The _hostfile_ and _hostdir_ parameters must specify the remote directory; filecards are optional. (\*.\* will be assumed if hostfile="".)
The host directory is not included in the "file.ext" field in the CSV directory listing.
The type field will be one of the following: regular,directory,symLink, special,unknown,socket,charDevice,blockDevice,fifo
The owner and group fields will be empty if the server does not support SFTP v4+.
The "ctime" (creation time) and "mtime" (last modification time) fields will be in RFC822 format, e.g. "Mon, 17 Jun 2019 17:40:32 -0700". See the Fn'Date'To'xxxx() functions in [fndatetime.bsi SOSLIB:\[907,10\]](https://bitbucket.org/microsabio/soslib/src/master/907010/fndatetime.bsi) for handy conversions from RFC822 (and many other) date formats.
The implementation is entirely within the [ASHNET](ashnet.htm.md) library modules for Windows and Linux, and is not dependent on any particular A-Shell version.
**History**
2019 June, A-Shell 6.5.1662, ASHNET library update 1.13.166: Opcode added to A-Shell.