<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.ultraedit.com/index.php?action=history&amp;feed=atom&amp;title=Replace_in_files</id>
		<title>Replace in files - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.ultraedit.com/index.php?action=history&amp;feed=atom&amp;title=Replace_in_files"/>
		<link rel="alternate" type="text/html" href="https://wiki.ultraedit.com/index.php?title=Replace_in_files&amp;action=history"/>
		<updated>2026-06-18T05:18:21Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.29.0</generator>

	<entry>
		<id>https://wiki.ultraedit.com/index.php?title=Replace_in_files&amp;diff=226&amp;oldid=prev</id>
		<title>Idmadmin: Created page with &quot;Category:Home tab  right Replace in files allows you to search for and replace a string in multiple files in a location of your cho...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.ultraedit.com/index.php?title=Replace_in_files&amp;diff=226&amp;oldid=prev"/>
				<updated>2017-08-10T16:55:51Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&lt;a href=&quot;/Category:Home_tab&quot; title=&quot;Category:Home tab&quot;&gt;Category:Home tab&lt;/a&gt;  &lt;a href=&quot;/File:Ultraedit_replace_in_files.png&quot; title=&quot;File:Ultraedit replace in files.png&quot;&gt;right&lt;/a&gt; Replace in files allows you to search for and replace a string in multiple files in a location of your cho...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:Home tab]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ultraedit replace in files.png|right]]&lt;br /&gt;
Replace in files allows you to search for and replace a string in multiple files in a location of your choosing. The files don&amp;#039;t have to be open in UltraEdit while the search runs. When the search completes, UltraEdit will prompt you with the number of replacements and the number of files changed by the operation. Please note: replace in files will make the replacements to files directly on the hard drive, therefore this operation is irreversible!&lt;br /&gt;
&lt;br /&gt;
Enter the string to search for in the &amp;#039;&amp;#039;&amp;#039;Find what&amp;#039;&amp;#039;&amp;#039; field, and the replace string to be used in the &amp;#039;&amp;#039;&amp;#039;Replace with&amp;#039;&amp;#039;&amp;#039; field.  Both of these fields support single or multi-line strings up to 20,000 bytes.  &lt;br /&gt;
&lt;br /&gt;
In addition to regular characters and strings, both the &amp;#039;&amp;#039;&amp;#039;Find what&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Replace with&amp;#039;&amp;#039;&amp;#039; fields support searching for several special characters and strings with special notation. For example, &amp;quot;^t&amp;quot; will match a tab (or insert a tab if part of the &amp;#039;&amp;#039;&amp;#039;Replace with&amp;#039;&amp;#039;&amp;#039; string). For a complete list of these values, see [[Special search characters]]. These special characters are valuable for matching non-printable text in files.&lt;br /&gt;
&lt;br /&gt;
You can specify the search location(s) in the &amp;#039;&amp;#039;&amp;#039;Directory&amp;#039;&amp;#039;&amp;#039; field. This field may contain multiple search paths separated by semicolons, i.e.: &amp;#039;&amp;#039;C:\mydir1\; c:\mydir2\&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:Ultraedit find i current dir.png|left]] Click the &amp;#039;&amp;#039;&amp;#039;active file directory&amp;#039;&amp;#039;&amp;#039; button to set the &amp;#039;&amp;#039;&amp;#039;Directory&amp;#039;&amp;#039;&amp;#039; field to the active file&amp;#039;s parent directory. Click the &amp;#039;&amp;#039;&amp;#039;...&amp;#039;&amp;#039;&amp;#039; button to open a folder browser where you can browse to and select your target search directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;In files/types&amp;#039;&amp;#039;&amp;#039; field allows you to restrict the search to particular file types by extension. For example, to search only HTML and CSS files, you would use: &amp;#039;&amp;#039;*.html;*.css&amp;#039;&amp;#039;. If left empty, all files are searched.&lt;br /&gt;
&lt;br /&gt;
Use the &amp;#039;&amp;#039;&amp;#039;In&amp;#039;&amp;#039;&amp;#039; setting to set the search area to one of the following:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Files listed&amp;#039;&amp;#039;&amp;#039; will search all files in the directory you specify, respecting the  &amp;#039;&amp;#039;&amp;#039;In files/types&amp;#039;&amp;#039;&amp;#039; filter&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Favorite files&amp;#039;&amp;#039;&amp;#039; will search only [Favorite files] (the &amp;#039;&amp;#039;&amp;#039;In files/types&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Directory&amp;#039;&amp;#039;&amp;#039; fields are ignored)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Project files&amp;#039;&amp;#039;&amp;#039; will search all files in the open project (this option is disabled if no project is open)  (the &amp;#039;&amp;#039;&amp;#039;In files/types&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Directory&amp;#039;&amp;#039;&amp;#039; fields are ignored)&lt;br /&gt;
 &lt;br /&gt;
Note: to do a replace in all open files, use the regular [[Replace]] dialog with &amp;#039;&amp;#039;&amp;#039;In&amp;#039;&amp;#039;&amp;#039; set to &amp;#039;&amp;#039;&amp;#039;Open files.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Ultraedit find i history.png|left]] &amp;#039;&amp;#039;&amp;#039;History button&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
This button displays a scrollable history list for either &amp;#039;&amp;#039;&amp;#039;Find what&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;Replace with&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:Ultraedit find i favorites.png|left]] &amp;#039;&amp;#039;&amp;#039;Favorites button&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This button opens the &amp;#039;&amp;#039;&amp;#039;Find what&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;Replace with&amp;#039;&amp;#039;&amp;#039; favorites menu with the following options:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|Add to Favorites&lt;br /&gt;
|adds current item in &amp;quot;Find what&amp;quot; field to Favorites list&lt;br /&gt;
|-&lt;br /&gt;
|Edit Favorites&lt;br /&gt;
|opens Edit [[Find/Replace Favorites]] dialog where you can name favorite search strings, organize the list and remove items from the list&lt;br /&gt;
|-&lt;br /&gt;
|Favorites&lt;br /&gt;
|opens sub-menu to select an existing favorite for the &amp;quot;Find what&amp;quot; string&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[File:Ultraedit find i regexp.png|left]]&amp;#039;&amp;#039;&amp;#039;Regular expressions help button&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
This button opens a short regular expression syntax reference for the selected regular expression engine.  This button is subdued unless the regular expressions checkbox is checked.&lt;br /&gt;
&lt;br /&gt;
[[File:Ultraedit find i swap.png|left]]&amp;#039;&amp;#039;&amp;#039;Swap button&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
This button swaps the contents of the &amp;#039;&amp;#039;&amp;#039;Find what&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Replace with&amp;#039;&amp;#039;&amp;#039; fields.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Start&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Invokes an interactive replace in files, where for each match, you&amp;#039;ll see a prompt with options for each file where a match exists. This prompt includes the following buttons:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Skip dir&amp;#039;&amp;#039;&amp;#039;: skips the current file and all other files in the same folder, making no changes to those files&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Skip file&amp;#039;&amp;#039;&amp;#039;: skips the current file, making no changes to it&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Replace&amp;#039;&amp;#039;&amp;#039;: replaces all matches in the file&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Replace all&amp;#039;&amp;#039;&amp;#039;: replaces all matches in current file and continues with search / replace without any further prompts&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cancel&amp;#039;&amp;#039;&amp;#039;: immediately stops the replace in files without any further changes&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Replace all&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Begins the replace in files search with a prompt for confirmation. All replacements are done automatically and immediately to any matched file(s).&lt;br /&gt;
&lt;br /&gt;
[[File:Ultraedit find i options.png|left]] &amp;#039;&amp;#039;&amp;#039;Advanced options button&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
This button expands the advanced search options which are covered below.&lt;br /&gt;
&lt;br /&gt;
==Advanced search options==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Match whole word&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
This option forces the search to match whole words only. This is useful, for example, if you only want to replace &amp;#039;a&amp;#039;, or &amp;#039;A&amp;#039; without replacing &amp;#039;a&amp;#039; that occurs as part of a larger word.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Match case&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
This option forces the search to match the case of the &amp;#039;&amp;#039;&amp;#039;Find what&amp;#039;&amp;#039; string exactly. This option applies to regular expressions as well.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Regular expressions&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
This option enables the use of regular expressions for both the &amp;#039;&amp;#039;&amp;#039;Find what&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Replace with&amp;#039;&amp;#039;&amp;#039; strings. There are 3 different types of regular expressions available: &lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Perl&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt; uses [[Perl regular expressions|Perl style regular expressions]] based on the [[http://www.boost.org/doc/libs/1_50_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html Boost C++ Libraries]].&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;UltraEdit&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt; uses [[Regular expressions|UltraEdit style regular expressions]].&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Unix&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt; uses [[Regular expressions|Unix style regular expressions]].&lt;br /&gt;
 &lt;br /&gt;
For information regarding creation of regular expressions see the [[Regular expressions]] or [[Perl regular expressions]] topic.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Preserve case&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
This options forces the search to match the case of the &amp;#039;&amp;#039;&amp;#039;Replace with&amp;#039;&amp;#039;&amp;#039; string with the case of the matched string.  The rules for this are as follows: &lt;br /&gt;
# If the word found is all lowercase the replacement word will be all lowercase&lt;br /&gt;
# If the word found is all UPPERCASE the replacement word will be all UPPERCASE&lt;br /&gt;
# If the word found is MixedCase the replacement word will &amp;#039;&amp;#039;match&amp;#039;&amp;#039; the MixedCase of the replacement word&lt;br /&gt;
&lt;br /&gt;
For example, with this option selected, and &amp;#039;&amp;#039;&amp;#039;Find what&amp;#039;&amp;#039;&amp;#039; set to &amp;quot;The&amp;quot; and &amp;#039;&amp;#039;&amp;#039;Replace with&amp;#039;&amp;#039;&amp;#039; set to &amp;quot;Then&amp;quot;:&lt;br /&gt;
* &amp;quot;the&amp;quot; will be replaced with &amp;quot;then&amp;quot;&lt;br /&gt;
* &amp;quot;THE&amp;quot; will be replaced with &amp;quot;THEN&amp;quot;&lt;br /&gt;
* &amp;quot;The&amp;quot; will be replaced with &amp;quot;Then&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The mixed case scenario requires the &amp;#039;&amp;#039;&amp;#039;Replace with&amp;#039;&amp;#039;&amp;#039; string to have the same number of uppercase characters as its match so that UltraEdit knows where the (matching) mixed case letters are. For example, a replace consisting of &amp;quot;SomeString&amp;quot; for &amp;#039;&amp;#039;&amp;#039;Find what&amp;#039;&amp;#039;&amp;#039; and &amp;quot;FooBar&amp;quot; for &amp;#039;&amp;#039;&amp;#039;Replace with&amp;#039;&amp;#039;&amp;#039; would result in the following matches / replacements:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;somestring&amp;quot; would be replaced with &amp;quot;foobar&amp;quot;&lt;br /&gt;
* &amp;quot;SOMESTRING&amp;quot; would be replaced with &amp;quot;FOOBAR&amp;quot;&lt;br /&gt;
* &amp;quot;SomeString&amp;quot; would be replaced with &amp;quot;FooBar&amp;quot;&lt;br /&gt;
* &amp;quot;SOMEstring&amp;quot; would be replaced with &amp;quot;FooBar&amp;quot; (case is not preserved, as the number of uppercase characters are not equal between the match and replacement)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Search subdirectories&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
By default, only files in the top level of the search directory are searched. If this option is checked, all subfolders of the &amp;#039;&amp;#039;&amp;#039;Directory&amp;#039;&amp;#039;&amp;#039; field search location will be searched, not just the top level files.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Ignore hidden subdirectories&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
If this option is checked (along with &amp;#039;&amp;#039;&amp;#039;search subdirectories&amp;#039;&amp;#039;&amp;#039;), then OS-level hidden subfolders are not searched.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;List changed files&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
If checked, this option will output a list of each file changed by the replace in the output window, followed by the number of replacements in the file.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Open matching files&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
This option will open all files containing a match.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Subdirectories to ignore in search&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
You can exclude certain subdirectories by entering them here. For example, if you want to exclude any folder named &amp;quot;.git,&amp;quot; simply type &amp;#039;&amp;#039;.git&amp;#039;&amp;#039; into this field. Separate multiple items with a semicolon, for example, &amp;#039;&amp;#039;.git;cvs&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;File names/extensions to ignore in search&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
You can exclude file types or names from the search by entering them here. For example, if you want to exclude from the search all files with an extension of &amp;quot;.bak&amp;quot;, simply type &amp;#039;&amp;#039;*.bak&amp;#039;&amp;#039; into this field. Or if you wish to exclude all files with names beginning with the string &amp;quot;index,&amp;quot; you could type &amp;#039;&amp;#039;index*&amp;#039;&amp;#039; here (the asterisk acts as a wildcard). Separate multiple items with a semicolon.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use encoding&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Check this box to manually specify an encoding type UltraEdit should assume when opening files to search them. If this option is left unchecked (recommended), the search will use the default OS encoding for searching files unless a BOM is detected, in which case the encoding signaled by the BOM is used. If this option is checked, the options for are as follows:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Auto-detect&amp;#039;&amp;#039;&amp;#039; will attempt to read the first 10 KB (approximately) of each file and automatically detect the encoding. Due to this additional step and processing, this may impact performance of the search.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Active file&amp;#039;&amp;#039;&amp;#039; will use the active file&amp;#039;s encoding for all files searched.&lt;br /&gt;
* Beyond the above two options, you can manually set a specific encoding type to use for the search. The encoding type you select will be used for all files searched. This list is populated from the list of encodings your OS supports.&lt;br /&gt;
&lt;br /&gt;
Please keep in mind that if an incorrect encoding is used for find in files, search results may be inaccurate or incomplete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;idm-see-also&amp;quot;&amp;gt;&lt;br /&gt;
See also: &lt;br /&gt;
* [[Find]]&lt;br /&gt;
* [[Replace]]&lt;br /&gt;
* [[Find in files]]&lt;br /&gt;
* [[Hex find]]&lt;br /&gt;
* [[Hex replace]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Idmadmin</name></author>	</entry>

	</feed>