FILEMONKEY FAQ
Copyright MonkeyJob Systems 2005
All rights reserved

Home FAQ Forums Contact
Download Tutorials FAQ Awards Report Bugs
 Search For Data
   

Search And Replace



With FileMonkey's search and replace feature, you can search for any text in file names, folder names or file contents and then replace that text with any other text.

For example, if you have 100 html files that all have a spelling mistake then you can use the replace feature to search for all instances of the mistake and replace it with the correct spelling.

Also, if you need to reformat your file names then the replace feature may be able to help. For example, you could search file names for all instances of mpeg and replace them with mp3

The replace feature can even work on folder names and within files.

To remove a piece of text altogether, you can search for the text and then replace it with nothing. For example: if you want to remove all underscores from your file names then you can search for "_" (without the quote marks) and replace them with "" (without the quote marks).

The following example will show you how to replace ALL instances of "seperate" with "separate" within target files.

1.

Target your files. Click HERE for a targeting tutorial.

2.

Once you have targeted your files, select the "Quick-Find, Replace" menu item from the main window.

3.

This will open the Search and Replace window (See Fig 1 below)

Fig 1
replace file contents

4.

Set up the search and replace window exactly as it appears in Fig 1.

5.

In the next step, we will perform the search and replace operation. This will search for all instances of the word "seperate" and replace them with the correct spelling "separate"

This will work on file contents (within files)

When working within files, it is worth noting the following point: If you use this operation on binary (compiled) file types then the binary file type may not run correctly.

A binary file type is a file that is not plain text. Typical files are doc, zip, dll and exe files.

Although the actual operation will work on binary file types, the files may not run properly if they are altered in this way.

Typically, this operation is used for plain text file types.

Plain text files are those like txt, html and log files.

This only applies when working on file contents. If you are working on file names or folder names then you do not need to worry about this issue.

If you wish to only work on plain text files then you could use a target pattern of "*.txt;*.log;*.htm;*.html" in the main window (without quote marks).

6.

It is also worth noting that there is no undo facility (other than the recycle bin) for this operation. If you are worried that the results may not be as expected then you should back up the target files before you begin this operation (You could use the "Copy" feature to do this).

As an added safety precaution, this operation is protected by default by the recycle bin. You can change your FileMonkey recycle bin protection options by selecting the "View / Settings..." menu item from the FileMonkey main window.

7.

When you are ready to begin this operation, click on the start button.

8.

When the operation is complete, the results window will open. This will tell you which files were edited. Files that do not contain the search phrase will not be edited.



Related Topics:
FileMonkey Tutorials
Frequently Asked Questions
Search and replace on file names example
Search and replace information
Search for information (without replacing)
Replacing text within files with file name or other text
Search and replace from the command line

  | About Us | Privacy Policy | Terms Of Use | Affiliates | Forums | Copyright ©2003 MonkeyJob Systems All Rights Reserved |