IBM FTP Adapter manual List Option -LS

Page 22

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

Image 22
Contents FTP Adapter Reference Guide Document History Part Product Version Published Number Contents Troubleshooting About This Document Related ReferencesOverview FTP AdapterSystem Requirements Access to International VANs About SocketsCommand Alias IAaliascardnum OAaliascardnumFTP Commands List of CommandsLSsorttype Account -AC or -ACCT Audit -A or -AUDITCertificate Authority -CA Client Certificate Password -CPASSClient Certificate -CERT Code Page Local -CPL Code Page Remote -CPRFirewall Connection Method URL -FW or -FIREWALL Open Site Transparent User Userfw UserfwpassAdapter Behavior when -FIREWALL Command Present Ftpuser, Pass ftppassOpen URL Syntax Userlogon or UserTokens Replaced with FTP URL -URL Ftpext-m1st-02.txt Ignore -I or -IGNORE Keep Server -KSList Option -LS Port Mode -PT or -PORT Passive Mode -PV or -PASVMake Directory -MKD Private Key -PKEY Private Key Password -KPASSQuantity -QTY Site -SITE Number of files to be retrieved by the adapterSSL Protocol -SPROTO SSL Encryption Strength -STRStage -STG or -STAGE System -SYS WIN32Trace -T or -TRACE Syntax Summary Data SourcesData Targets URL Syntax Using FTP Adapter CommandsExamples Syntax Summary URL Syntax URL Encoding Troubleshooting Adapter Audit LogAdapter Trace File Sample FTP Adapter Trace FileTroubleshooting Adapter Trace File Appendix a Return Codes and Error Messages MessagesAppendix a Return Codes and Error Messages Index Index