IBM FTP Adapter List Option -LS, FTP Commands, List of Commands, LS sorttype, Option Description

Models: FTP Adapter

1 40
Download 40 pages 12.42 Kb
Page 22
Image 22
List Option (-LS)

Chapter 3 - FTP Commands

List of Commands

List Option (-LS)

Use the List Option adapter command (-LS) to allow files to be retrieved based on a user supplied sorting preference.

This command is used in conjunction with the existing FTP URL (-URL) adapter

command and supports a subset of FTP options that control the order in which the files are transferred.

This is an optional command.

-LSsort_type

The adapter passes the -LScommand value to a remote FTP server as an

argument when it lists the files in the directory. One of three events happens at this point:

FTP server accepts the option and lists the files in the specified order

FTP server ignores the option and lists the files in the default order

FTP server rejects the option and the adapter returns an error

For example:

-URLftp://testftp:test@host/mydir –lstr

The -LScommand is issued by the adapter before any file transfer, so that its results are used to control the order of the file transfer. In the example above, all files from mydir would be transferred, the oldest file being transferred first.

Allowable command options include:

Option Description

tSorts by time stamp.

rReverses the order of sort.

tr

Reverses the order of sort by time stamp.

 

 

rt

Same as -LStr.

 

 

All other list options result in the error message: invalid ls option that is logged in the adapter trace file.

Note The List Option (-LS) command options, (t, r, tr, and rt) may be ignored by some ftp servers.

F T P A d a p t e r R e f e r e n c e G u i d e

2 2

Page 22
Image 22
IBM FTP Adapter manual List Option -LS, FTP Commands, List of Commands, LS sorttype, URL ftp//testftptest@host/mydir -ls tr