dcsimg
Results 1 to 3 of 3

Thread: Look for all files in a folder and it's sub folders by their title

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2017
    Posts
    3

    Look for all files in a folder and it's sub folders by their title

    Hi All,
    how can I open a search window, in windows that find all files that have certain title or subject. For example all the jpeg files that their title is animals. Then how can I let user to select some of them to add their path and name to a listview in my vb.net windows form.
    Thank for your kindly help.

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    99,787

    Re: Look for all files in a folder and it's sub folders by their title

    Are you talking about opening a Windows Explorer window? If so then there will be no simple way to do that. If it's even possible, it would involve Windows API functions. Why not just do it all within your app? The Directory.GetFiles method and various others can get the paths of all files that match a pattern and you can load them into a ListBox, CheckListBox, ListView or Treeview for selection.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    99,787

    Re: Look for all files in a folder and it's sub folders by their title

    I just noticed that second sentence. Whether you use Windows Explorer or not, I'm not aware of anything that will inherently know that a title is the name of an animal. You'd have to search for each animal name explicitly.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width