Searching in multiple files


    You can search and replace text or strings of HTML in multiple files or an entire site without needing to open the files. (To specify search conditions for HTML elements, see Finding elements.)

    Note: If you plan to do a global search and replace in multiple files, you should be sure to make a backup of your files and site, especially if you are using wildcard characters.

To find and replace text or HTML in multiple files:

  1. Choose Edit > Find, and click the In Multiple Files tab.
  2. Choose one of the following:
    • Choose Text in Layout Mode to search for plain text in Layout Mode only.
    • Choose Text in Source Mode (encoded) to perform a text-based search in the document's source code.
    • Code Elements searches for HTML code. For detailed information about using this option, see Finding elements.
  3. Type the text or HTML code in the Find text box and the Replace text box, and then select search options.
  4. Do one of the following to specify the search scope:
    • To select a site or a site collection, open the site and choose Sites and Collections from the Search In menu. Select the site folders or collections you want to search.
    • To select individual file(s) from a site, open the site window, choose Files from the Search In menu, and then drag the file(s) from the site window to the file list in the Search In section.
    • To browse and select individual file(s), choose Files from the Search In menu and click Add Files. In the Add Files dialog box, click Add All or select the files you want searched and click Add, and then click Done.
    • To search within a previous result set (an open list of matches that resulted from a previous search), choose Result List from the pop-up menu in the Search In section.
    Drag files into the Find window to add them to the search.
    Drag files into the Find window to add them to the search.
  5. Select options to ignore the case, look for entire words that are not embedded within other words, start searching from the top of the page, wrap around to the beginning of the search, or search for text using wildcards (regular expressions).
  6. Note: Do not use the Regular Expression option unless you understand wildcard searching. This powerful option can cause unexpected results, especially if you plan to search and replace multiple items. For more information, see Using wildcards in a search.

  7. Click Find.
  8. GoLive shows you the first file found containing matching text and opens the file.

  9. Do one of the following:
    • Click Find Next to find or view the next match in the same or next document.
    • Click Find All to find or view all matches. In the Result window, all files with matches are marked by a number appearing in the Hits column. Double-click a file with a hit count to open the file and show the first match highlighted.

To save result sets from the Result window for use in another search:

    Do one of the following:

    • If you'd like to search within the result set, click Use Result in the Results window. You can remove files from the result set by selecting them and clicking Remove.
    • Click Save Collection in the Results window if you'd like to save the results as a collection in the currently open site (a site must be open for the Save Collection option to be available). You can remove files from the Results window by clicking Remove before saving the collection. Saved collections are displayed in the Collections tab of the Site window (see Using collections).