Back to product page
- Introduction
- Overview
- License agreement
- Getting Started
- Objects
- Enumerations
- wodSFTP
- Methods
- Abort
- About
- AppendData
- AppendFile
- Connect
- DeleteFile
- DeleteFiles
- Disconnect
- ExtendedCmd
- GetAttributes
- GetData
- GetDataAt
- GetFile
- GetFileAt
- GetFiles
- ListAttributes
- ListDir
- ListNames
- LoopFiles
- MakeDir
- PutData
- PutDataAt
- PutFile
- PutFileAt
- PutFiles
- RealPath
- RemoteClose
- RemoteOpen
- RemoteRead
- RemoteWrite
- RemoveDir
- Rename
- SetAttributes
- SetAttributes64
- Properties
- Authentication
- Blocking
- BufferSize
- ClientName
- Compression
- Encryption
- EncryptionList
- ErrorText
- Extensions
- FingerPrint
- FIPS
- HMacList
- Hostname
- KeepAlives
- KeyExchangeList
- KeySignatureList
- LastError
- ListItem
- LocalPath
- Login
- MaxTransferRate
- MyHostname
- MyIP
- Notification
- Password
- Port
- PrivateKey
- ProxyHostname
- ProxyLogin
- ProxyPassword
- ProxyPort
- ProxyType
- RemoteIdentification
- RemotePath
- Resume
- ServerErrorCode
- ServerErrorText
- State
- StateText
- Timeout
- Timezone
- TransferMode
- TransferRate
- TransferTime
- UseIPv6
- Version
- Events
- Methods
- IwodSFTPNotify
- SftpItem
- SftpItems
- How to get support?
- Technical information
- Fast notifications interface
- Error list
LoopFiles method
Loops through multiple files in a sequence, recursive, giving their names.
Type
NoneSyntax
- Basic
object.LoopFiles [RemotePath], [MaxLevel]
The LoopFiles(object,RemotePath,MaxLevel) syntax has these parts:
The LoopFiles(object,RemotePath,MaxLevel) syntax has these parts:
object | An expression evaluating to an object of type wodSFTP. |
RemotePath | Optional. A Variant value. Holds full path on the server from where to start enumerating files and folders. |
MaxLevel | Optional. A Variant value. Specifies maximum number of subdirectory levels to copy. 0 for unlimited. |
Remarks
This method will just loop through all folders and files on specified RemotePath, and fire LoopItem event for each file/folder it finds - allowing you to save it (for example, in local collection) and then use later for various file/folder operations. wodSFTP will not do anything with those items by itself! Since LoopItem will provide full paths to those files, it is easy to use those paths later on with GetFile, GetData, PutFile, DeleteFile (etc.) operations.If you want to download all those files (and create appropriate directory structure locally) you should use GetFiles method instead.
Do not forget that RemotePath should always specify full absolute path (i.e. /home/joe/something) instead of relative path (i.e. joe/something).