Code covered by the BSD License  

Highlights from
Filegrep

5.0

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

Filegrep

by Brett Shoelson

 

21 Jan 2004 (Updated 23 Jan 2004)

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

| Watch this File

File Information
Description

SYNTAX:
[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.

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  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (8)
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.

02 Feb 2004 wenyong Li

very comfortable Matlab-explorer!

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.

22 Dec 2005 Jay Simon

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

31 Mar 2008 Dimitri Shvorob

Brett rules! Thanks a lot! :)

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.

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
   [structInfo,dispString]=...

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));

25 Aug 2011 Kevin J. Delaney

Spectacular!

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
path Brett Shoelson 22 Oct 2008 07:13:06
directories Brett Shoelson 22 Oct 2008 07:13:06
files Brett Shoelson 22 Oct 2008 07:13:06
file Brett Shoelson 22 Oct 2008 07:13:06
grep Brett Shoelson 22 Oct 2008 07:13:06
backup Brett Shoelson 22 Oct 2008 07:13:06
launch Brett Shoelson 22 Oct 2008 07:13:06
find Brett Shoelson 22 Oct 2008 07:13:06
search Brett Shoelson 22 Oct 2008 07:13:06

Contact us at files@mathworks.com