• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2465
  • Last Modified:

Sort files and folders using filesystem object in VB6

Hello there,

I am writing a program with VB6
I need to search one parent folder to find multiple subfolders with certain name pattern and move them to another folder.
I am trying to avoid using database engine such as Access.
Is there any way that I can sort the folder names to speed up this process using filesystem object?
I don't thinkk VB6 has sorted array either.

Thanks for your time.
2 Solutions
Guy Hengel [angelIII / a3]Billing EngineerCommented:
If you are looking for speed I would forget about FSO. This example will provide a fast search and put the sorted results in a listbox:


You could modify the example to copy the folder instead of putting the name into a listbox. Just set the pattern you are looking for as the file type. i.e.  MyFold*
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now