Sort files and folders using filesystem object in VB6

Posted on 2006-06-07
Last Modified: 2012-06-27
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.
Question by:JOSHUABT
    LVL 142

    Assisted Solution

    by:Guy Hengel [angelIII / a3]
    LVL 28

    Accepted Solution

    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*

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
    Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now