How can I define EnumerateOptions in VBA

Advertisement

lcao
Guest

How can I define EnumerateOptions in VBA

hi, there. How can I get the file list by filtering file name starting with something,say Report_?
I was thinking about using EnumeratFiles, but I can not define EnumerateOptions by the way below. please shred some light on it?


Dim remotePath As String
Dim mark As String
mark = "*.zip"
remotePath = "uat/download/"
Dim remotefile As New RemoteFileInfoCollection
Dim options As New EnumerateOptions
Set options = EnumerateOptions_None
Set remotefile = mysession.EnumerateFiles(remotePath, mark, options)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,791
Location:
Prague, Czechia

Re: How can I define EnumerateOptions in VBA

Your code works for me. Are you sure you have the latest version of WinSCP .NET assembly registered for COM? Maybe you need to unregister an older version, if you were using some before. You can have one version registered only.

Reply with quote

Advertisement

You can post new topics in this forum