Topic "Search for directories starting with some characters on server."

Author Message
sumangeorge
[View user's profile]

Joined: 2016-12-15
Posts: 15
Location: Detroit
We have to search internal server with directories/folder starting with lets say ABC.
There might be multiple folders such as ABC1, ABC2.

ListDirectory doesn't have option to do it.

Code:

Set directoryInfo = session.ListDirectory("/home/maenrol/ImagesStaging/" & strImages_Folder_Name & "*")



Please let me know if anyone has a solution to this.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26447
Location: Prague, Czechia
Use the EnumerateRemoteFiles instead:
https://winscp.net/eng/docs/library_example_listing_files_matching_wildcard
https://winscp.net/eng/docs/library_session_enumerateremotefiles
sumangeorge
[View user's profile]

Joined: 2016-12-15
Posts: 15
Location: Detroit


Sadly EnumerationOption is not available in vb6.
WinSCPnet.EnumerationOption will throw and error.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26447
Location: Prague, Czechia
That's correct. Then you have to implement the recursion on your own.
Advertisements

You can post new topics in this forum






Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License