View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

5.0 | 6 ratings Rate this file 8 Downloads (last 30 days) File Size: 20.6 KB File ID: #4397 Version: 1.0
image thumbnail



Brett Shoelson (view profile)


21 Jan 2004 (Updated )

A GUI-driven file grep/backup/editing tool.

| Watch this File

File Information


Filegrep is a powerful GUI for searching files in all directories specified by the user. User can search for filenames only, or within files for specified words/phrases/exclusions. Also, searches can be delimited by date or size, and user can include or exclude (by extension) any file type.

Once a search command is given, the user is presented with a list of files meeting the search criteria. The user can select and launch/edit the files, or can replace strings in them, or can write (back them up) to a new locations. (The backup mode includes an "overwrite older files only" option for protection.)

Features are too numerous to list...code is nearly 2500 lines...but the GUI offers tooltip strings and is pretty intuitive. One can readily exclude comments, or search comments only; searches can also be case-sensitive, or case-insensitive, and whole-word or not. In the (default) smart-search mode, hidden files are skipped.

The program has been tested in the Windows environment in both R12 and R13. After nearly a year of on-again, off-again effort, I think I have most bugs fixed. However, suggestions for improvement are welcome, as are bug reports.

Note: For anyone who previously downloaded my mfilegrep program, this incorporates and FAR surpasses that code in functionality.

MATLAB release MATLAB 6.5 (R13)
Other requirements Thoroughly tested in the Windows environment, in R12 and R13. Most functionality should be platform-independent, but a few launch/edit functions may not work outside of Windows.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (8)
25 Aug 2011 Kevin J. Delaney


25 Jul 2008 Dimitri Shvorob

For some reason, filegrep is taking forever to start; when I end hit Ctrl-C, I get

Error in ==> ver>LocParseContentsFile at 160
fp = fopen(fName,'rb');

Error in ==> ver>sort_toolbox_list at 301

Error in ==> ver at 86
[Toolboxes,verStruct] = sort_toolbox_list(p,isArgout,verStruct,nameLen,verLen);

Error in ==> filegrep at 39
grepopts.rel = ver; grepopts.rel = grepopts.rel(1).Release; grepopts.rel = str2num(grepopts.rel(3:end-1));

Comment only
03 Apr 2008 Dimitri Shvorob

Two issues:
1. Scroll bar for the search-results list doesn't work. (Matlab 2007a here).
2. String search-and-replace does not rename files; it would be nice to add the capability.

Comment only
31 Mar 2008 Dimitri Shvorob

Brett rules! Thanks a lot! :)

22 Dec 2005 Jay Simon

Thank you Brett. This utility, along with your mfilegrep.m, are extraordinally useful additions to my Matlab toolbox.

19 Mar 2004 Bill Driscoll

A very useful and flexible search tool. For those of us who end up with a proliferation of scripts and functions, filegrep can be big help in sorting through our mess. I also like mfilegrep by the same author.

02 Feb 2004 wenyong Li

very comfortable Matlab-explorer!

02 Feb 2004 Derek Goring

As I get older I find it harder and harder to remember what I called that .m file I wrote just last week or month. This program is ideal for that. I've been looking for something like it ever since the days when Windows Explorer replaced xtree.

Contact us