Learn R Programming

BrailleR (version 1.0.2)

WhichFile: Find a text string in files

Description

Which files in a folder (and its subfolders) include/exclude a given text string

Usage

WhichFile(String, Folder, fixed = TRUE, DoesExist = TRUE)

Value

A vector of filenames returned as character strings.

Arguments

String

The text string or regular expression being sought.

Folder

The head folder to start searching in.

fixed

Fixed text string or if FALSE, a regular expression that will be passed togrep().

DoesExist

If TRUE, it shows the files that do include the text string of interest; if FALSE, files that lack the search string are returned.

Author

A. Jonathan R. Godfrey in response to a request from CRAN to add missing text to help documentation.

Details

Finding a given search string in a pile of text files is time-consuming. Finding which files lack that search string is even harder.