• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2452
  • 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.
0
JOSHUABT
Asked:
JOSHUABT
2 Solutions
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
0
 
vinnyd79Commented:
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:

http://vbnet.mvps.org/index.html?code/fileapi/recursivefolders_minimal.htm

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*
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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