[FILEDIRS, FILELINES] = FILEGREP
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.
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));
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.
Brett rules! Thanks a lot! :)
Thank you Brett. This utility, along with your mfilegrep.m, are extraordinally useful additions to my Matlab toolbox.
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.
very comfortable Matlab-explorer!
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.
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.