CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Posts
    3

    Directory.getFiles Problem

    Hi,

    I'm a bit confused by the pattern element of the Directory.getFiles() method.

    I want to retrieve all files in a directory with jpg and tif extensions, but I can't get the following to work:

    files = dl.getFiles(filePath,"*jpg;*.tif");

    If I use 'dir *jpg;*.tif' in a command window the pattern seems to work, but not for the C# code.

    Thanks

  2. #2
    Join Date
    Dec 2000
    Location
    Slovakia
    Posts
    1,043
    You have to call Directory.GetFiles() twice to do this...

    martin

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured