decorative banner

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 Searching for 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 Find & Replace tab.
  2. Type the text or HTML code in the Find text box and the Replace text box, and then select search options.
  3. Click the triangle next to Find in Files, and do one of the following:
    • Choose Custom from the Files From menu, and then click Add Files and select the files you want to search. The files are added to the scrolling list at the bottom of the Find window.
    • Choose Custom from the Files From menu, and drag the files you want to search from the desktop or the site window into the scrolling list at the bottom of the Find window.
    • Choose the site from the Files From menu, and choose the site document from the pop-up menu. (The site window must be open.)

    All the pages in the site are displayed in the scrolling list at the bottom of the Find window. You can then remove individual files by selecting the files in the list and then pressing Backspace or Delete.

    Drag files into the Find window to add them to the search.
    Drag files into the Find window to add them to the search.
  4. Select a language encoding to use in the search from the Script of String pop-up menu.
  5. Choose Layout Mode or Source Mode from the Treat Files In menu. Layout Mode lets you find only visible content; Source Mode lets you find matches in the Source Code Editor, which includes the visible content and the source code.
  6. Important: Be careful about selecting Source Mode if you plan to use the find and replace feature. If you select Source Mode, GoLive finds and replaces any occurrence of the text, whether it is visible document content or HTML code. For example, if you search for and replace the word "Traveler" in all project files with Source Mode selected, GoLive replaces that word in hypertext links pointing at a filename (for example, Frequent-Traveler.html), disrupting links in the process.

  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 list box, 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.

    An arrow in the Files column indicates the file currently being searched, and a number to the right of the filename indicates how many occurrences have been found.