searchfiles

Version 1.0.0 (2.95 KB) by Bramvg
a dialog box to search files recursively using wildcard symbols * and **
12 Downloads
Updated 29 Aug 2019

View License

searchfiles shows a dialog to search files recursively

SYNTAX:
files = searchfiles
files = searchfiles(startfolder, filterspec, limit, dialogname)
[files, startfolder, limit, option] = searchfiles(startfolder,...
filterspec, limit, dialogname, optiontext, optiondefault)

A dialog is shown where the user can search files recursively using
wildcard symbols (* and **), with the option to limit the number of files
per folder, and with an optional custom checkbox.

INPUT ARGUMENTS (all arguments are optional):
startfolder = root folder to start search (default is pwd)
filterspec = search string, supports wildcards same as dir (default
is '\**\*.*')
limit = limit number of files per folder (default is 0 = no limit)
dialogname = figure name of the dialog window (default = 'Search files')
optiontext = text label of an optional checkbox. the checkbox is only
shown if optiontext is not empty (default is empty)
optiondefault = initial state of the optional checkbox (default is
false)

OUTPUT ARGUMENTS:
files = cell array of strings of selected file names, if cancel is
clicked files is 0
startfolder = root folder (same as input unless the user browsed to a
new folder in the dialog)
limit = same as input unless user changed number in dialog
option = state of the optional checkbox (true or false)

Cite As

Bramvg (2024). searchfiles (https://www.mathworks.com/matlabcentral/fileexchange/72576-searchfiles), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2018b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on File Operations in Help Center and MATLAB Answers
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0