Back to product page
- Introduction
- License agreement
- Getting Started
- Objects
- Enumerations
- wodFtpDLX
- Methods
- Abort
- About
- AppendData
- AppendFile
- AppendFileFrom
- CheckDir
- ClearCommandChannel
- Connect
- DeleteFile
- DeleteFiles
- Disconnect
- GetAttributes
- GetData
- GetDate
- GetFile
- GetFileAt
- GetFileAt64
- GetFiles
- GetSize
- ListDir
- ListNames
- LocalCRC
- LoopFiles
- MakeDir
- PutData
- PutFile
- PutFileAt
- PutFileAt64
- PutFiles
- RawReceived
- RawSend
- Refresh
- RemoteCRC
- RemoveDir
- Rename
- SetAttributes
- SetAttributes64
- Site
- Properties
- Account
- Arrange
- AscIITranslation
- Authentication
- BackColor
- Blocking
- BorderVisible
- BufferSize
- Certificate
- ClientName
- ColumnCount
- ColumnHeader
- Columns
- ColumnWidth
- Compression
- ContextMenu
- DirFormat
- DirItems
- Enabled
- Encryption
- EncryptionList
- ErrorText
- FIPS
- ForeColor
- HMacList
- Hostname
- IconView
- ItemSkip
- KeepAlive
- LastError
- ListItem
- ListParams
- LocalCertBag
- LocalPath
- Login
- MaxDataPort
- MaxTransferRate
- MinDataPort
- MyHostname
- MyIP
- Notification
- Passive
- Password
- PasvPort
- Port
- Protocol
- ProxyHostname
- ProxyLogin
- ProxyPassword
- ProxyPort
- ProxyType
- RemotePath
- Resume
- SecureMethod
- ShellIcons
- SmartGet
- SmartPut
- SortItems
- SSLCipherList
- State
- StateText
- StrictHost
- TabStop
- Tag
- Timeout
- Timezone
- TransferMode
- TransferRate
- TransferTime
- UseIPv6
- UTF8Encoding
- Version
- Events
- ActionCopy
- ActionDelete
- ActionDownload
- ActionMakeDir
- ActionNewFile
- ActionPaste
- ActionProperties
- ActionRename
- ActionSelect
- AfterViewChange
- Attributes
- Attributes64
- Banner
- BeforeViewChange
- Click
- ClientCertRequired
- Connected
- CryptoInformation
- DblClick
- Disconnected
- Done
- FileTransferData
- Focus
- FTPReply
- HostCertificate
- HostFingerprint
- KeyPress
- ListItems
- LoginChallenge
- LoopError
- LoopItem
- MenuClick
- PreTranslateCommand
- PreTranslateReply
- Progress
- Progress64
- ShowContextMenu
- SiteReply
- StateChange
- Methods
- IwodFtpNotify
- DirItem
- DirItems
- How to get support?
- Technical information
- Fast notifications interface
- Error list
- How to...
LoopItem event
Fires before wodFtpDLX performs operation on file from the GetFiles/PutFiles/DeleteFiles/LoopFiles sequence.
Syntax
- Basic
Private Sub object_LoopItem(LocalFile, RemoteFile, ItemType, Skip)
The LoopItem(object,LocalFile,RemoteFile,ItemType,Skip) syntax has these parts:
The LoopItem(object,LocalFile,RemoteFile,ItemType,Skip) syntax has these parts:
object | A wodFtpDLX object. |
LocalFile | A String value. Full path to file/folder on local disk. |
RemoteFile | A String value. Full path to file/folder on remote server. |
ItemType | A DirItemTypes enumeration, as described in settings. Type of the item - file, folder, symbolic link. |
Skip | A Boolean value. When set to True then intended operation is not performed on the item. |
Remarks
SettingsThe settings for ItemType are:
Constant | Value | Description |
---|---|---|
typeDirectory | 0 | Item is directory. |
typeSymlink | 1 | Item is symbolic link. |
typeFile | 2 | Item is file. |
typeTemporary | 3 | Item is temporary file/folder. |
typeUnknown | 4 | Unknown item. |
Private Sub Ftp1_LoopItem(LocalFile As String, RemoteFile As String, ByVal ItemType As wodFtpDLXComLib.DirItemTypes, Skip As Boolean)
If ItemType = typeDirectory Then
Skip = False
Else
If Right$(RemoteFile, 4) = ".txt" Then
Skip = False
Else
Skip = True
End If
End If
End Sub
which means that only files ending with ".txt" are copied - others are skipped (but directories are created, just in case). You can also use it like this: we will copy all ".txt" files to the same directory, no matter where they originate from:
Private Sub Ftp1_LoopItem(LocalFile As String, RemoteFile As String, ByVal ItemType As wodFtpDLXComLib.DirItemTypes, Skip As Boolean)
If Right$(RemoteFile, 4) = ".txt" Then
LocalFile = "c:\mytxtfiles\file" & Counter & ".txt"
Counter = Counter + 1
Skip = False
Else
Skip = True
End If
End Sub
above sample will not create directory structure at all - but still would copy all .txt files to differently named files on local disk. NOTE: in some environments Skip argument cannot send value back to wodFtpDLX, such as in Delphi and BCB. For this purpose we have added also ItemSkip property that can be set to value True, producing same result as if Skip argument would be set to True.