You are on page 1of 2

Find And Replace Text command line utility.

New & improved version of the well-k


nown grep command, with advanced features such as: case-adaption of the replace
string; find (& replace) in filenames.
Latest version is: 1.98
Find And Replace Text v1.98 by Lionello Lunesu
Usage: FART [options] [--] <wildcard>[,...] [find_string] [replace_string]
Options:
-h --help Show this help message (ignores other options)
-q --quiet Suppress output to stdio / stderr
-V --verbose Show more information
-r --recursive Process sub-folders recursively
-c --count Only show filenames, match counts and totals
-i --ignore-case Case insensitive text comparison
-v --invert Print lines NOT containing the find string
-n --line-number Print line number before each line (1-based)
-w --word Match whole word (uses C syntax, like grep)
-f --filename Find (and replace) filename instead of contents
-B --binary Also search (and replace) in binary files (CAUTION)
-C --c-style Allow C-style extended characters (\xFF\0\t\n\r\\ etc.)
--cvs Skip cvs dirs; execute "cvs edit" before changing files
-a --adapt Adapt the case of replace_string to found string
-b --backup Make a backup of each changed file
-p --preview Do not change the files but print the changes

sday, August 25, 2009


Windows Command Line Find and replace - Made easy with FART.exe
Here is a great little application that does a find and replace on a particular
file, file type or file contents, then replaces it with a string of your choice.
It can look in sub directories as well.
The small app is called FART, yes that s right FART - Find And Replace Text!
Usage: FART [options] [--] [,...] [find_string] [replace_string]
Options
* -h, help Show this help message (ignores other options)
* -q, quiet Suppress output to stdio / stderr
* -V, verbose Show more information
* -r, recursive Process sub-folders recursively
* -c, count Only show filenames, match counts and totals
* -i, ignore-case Case insensitive text comparison
* -v, invert Print lines NOT containing the find string
* -n, line-number Print line number before each line (1-based)
* -w, word Match whole word (uses C syntax, like grep)
* -f, filename Find (and replace) filename instead of contents
* -B, binary Also search (and replace) in binary files (CAUTION)
* -C, c-style Allow C-style extended characters (\xFF\t\n\r\\ etc.)
* cvs Skip cvs dirs; execute cvs edit before changing files
* svn Skip svn dirs
* remove Remove all occurences of the find_string
* -a, adapt Adapt the case of replace_string to found string
* -b, backup Make a backup of each changed file
* -p, preview Do not change the files but print the changes
Example 1 (replace text, preview only)
fart -c -r -i -p *.txt original_text new_text
This will look for all .txt files in a sub directory, locate the original_text s
tring within the .txt file and change it to new_text. The -p switch means it won
't actually change anything because this is a preview, showing you how many stri
ngs it found within each .txt file.
Example 2 (replace text)
fart -c -r -i *.txt original_text new_text
Same as above except it will do the actual replacement.
Example 3 (remove text)
fart -r -i --remove *.txt "remove this text"
Rather than replacing one term for another this will remove the specified term.
NOTE: Use quotes around text if it contains spaces, tabs, etc.
Download FART from SourceForge.
Keywords:
windows fart.exe
fart find and replace
notepad find/replace text command line
fart "command line" download
fart.exe find and replace
find and replace fart
replace file command line windows
"find and replace" fart examples
detailed manual fart find replace
find and replace command line executable

You might also like