Code covered by the BSD License  

Highlights from
wildcardsearch

Be the first to rate this file! 4 Downloads (last 30 days) File Size: 3.32 KB File ID: #16217

wildcardsearch

by Bob Hamans

 

03 Sep 2007 (Updated 20 Sep 2007)

Searches the file system for files or folders matching a wildcard pattern

| Watch this File

File Information
Description

WILDCARDSEARCH(ROOTDIR, SEARCHSTRING) Searches the file system from the starting directory ROOTDIR for files and folders matching the pattern SEARCHSTRING. The function WILDCARDSEARCH is similar to the search file option in Explorer.

Have a look at the source code for more information. For more info on this function and how to use it, bug reports, feature requests, etc. feel free to contact the author.

MATLAB release MATLAB 7.4 (R2007a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
11 Sep 2007 Bob Hamans

Example 1: Finds all jpg and tif files:
 rootdir = 'C:\'
 searchstr = '*.jpg;*.tif';
 files = wildcardsearch(rootdir, searchstr);

Example 2: Finds all files named EXPxxx.DAT:
 rootdir = 'C:\'
 searchstr = 'EXP???.DAT';
 files = wildcardsearch(rootdir, searchstr);

Please login to add a comment or rating.
Updates
20 Sep 2007

Minor update to 'regexpdir' function.

Tag Activity for this File
Tag Applied By Date/Time
path Bob Hamans 22 Oct 2008 09:25:32
directories Bob Hamans 22 Oct 2008 09:25:32
files Bob Hamans 22 Oct 2008 09:25:32
search Bob Hamans 22 Oct 2008 09:25:32
files folders Bob Hamans 22 Oct 2008 09:25:32
recursive Bob Hamans 22 Oct 2008 09:25:32

Contact us at files@mathworks.com