Text File Search

版本 1.0.0.0 (16.5 KB) 作者: Aman Siddiqi
Search text files using a list of terms, one at a time
1.4K 次下载
更新时间 2007/5/18

无许可证

This file uses a list of search terms in excel. That way the search terms can easily be updated. It searches each text file in a specific directory, one search term at a time. If one is found, that search stops & it moves to the next text file. The results are outputted in an excel file with the original file name in one column, and the found term in another.

I wrote this for a specific usage at work. So its not a general script. But you can use it to start from and modify my code instead of starting from scratch. For instance, if one of the search terms is found for any text file, the script also searches another small set of search terms in the script itself because those require If statements. That can be removed.

You could for instance have the file renamed instead of outputting to a spreadsheet. This script will give you a basis. I utilized another members script to actually do the text searching. My file more helps you build it into a larger process.

引用格式

Aman Siddiqi (2024). Text File Search (https://www.mathworks.com/matlabcentral/fileexchange/15025-text-file-search), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R14SP1
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Search Path 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0