Back to product page
- Introduction
- License agreement
- Classes
- Enumerations
- Exceptions
- WeOnlyDo.Client.FtpDLX
- Properties
- Authentication
- Blocking
- BufferSize
- Certificate
- Compression
- DirFormat
- DirItems
- Encryption
- Hostname
- KeepAlive
- LastError
- ListItem
- ListParams
- LocalPath
- Login
- MaxTransferRate
- Passive
- Password
- Port
- PreserveDates
- PrivateKey
- Protocol
- ProxyHostname
- ProxyLogin
- ProxyPassword
- ProxyPort
- ProxyType
- PublicKeyOpenSSH
- PublicKeySSH
- RemotePath
- Resume
- SecureMethod
- SmartGet
- SmartPut
- State
- StrictHost
- Tag
- Timeout
- Timezone
- TransferMode
- TransferRate
- TransferTime
- UseIPv6
- Version
- Methods
- Events
- Properties
- WeOnlyDo.Client.DirItemsCollection
- WeOnlyDo.Client.DirItem
- How to get support?
LoopFiles method
Loops through multiple files in a sequence, recursive, giving their names.
Type
VoidSyntax
- C#
- VB.NET
public Void LoopFiles();
public Void LoopFiles(String RemotePath);
The LoopFiles(RemotePath) syntax has these parts:
public Void LoopFiles(String RemotePath, Int32 MaxLevel);
The LoopFiles(RemotePath,MaxLevel) syntax has these parts:
public Void LoopFiles(String RemotePath);
The LoopFiles(RemotePath) syntax has these parts:
RemotePath | Full path on the server from where to start enumerating files and folders. |
public Void LoopFiles(String RemotePath, Int32 MaxLevel);
The LoopFiles(RemotePath,MaxLevel) syntax has these parts:
RemotePath | Full path on the server from where to start enumerating files and folders. |
MaxLevel | Specifies maximum number of subdirectory levels to access. 0 for unlimited. |
public Sub LoopFiles()
public Sub LoopFiles(ByVal RemotePath As String)
The LoopFiles(RemotePath) syntax has these parts:
public Sub LoopFiles(ByVal RemotePath As String, ByVal MaxLevel As Int32)
The LoopFiles(RemotePath,MaxLevel) syntax has these parts:
public Sub LoopFiles(ByVal RemotePath As String)
The LoopFiles(RemotePath) syntax has these parts:
RemotePath | Full path on the server from where to start enumerating files and folders. |
public Sub LoopFiles(ByVal RemotePath As String, ByVal MaxLevel As Int32)
The LoopFiles(RemotePath,MaxLevel) syntax has these parts:
RemotePath | Full path on the server from where to start enumerating files and folders. |
MaxLevel | Specifies maximum number of subdirectory levels to access. 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. wodFtpDLX.NET will not do anything with those items by itself! Since LoopItem event will provide full paths to those files, it is easy to use those paths later on with GetFile, 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).