Announcement

Collapse
No announcement yet.

How to search and replace content between to HTML scomments

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to search and replace content between to HTML scomments

    Hello, I am new here and looking for help. I found BC to be amazing, and I am hoping to simplify a task.

    Question: I have some 600 pages HTML/Pages with content and I would like to replace section of those files, and output them to a file extension from *.htm to *.cshtml.

    HTML Code:
    <!-- HTML head BEGIN -->
    
    Some HTML Content
    
    <!-- head END -->
    Essentially, how do I insert or replace all the files content in the folder, so that those HTML files now have

    HTML Code:
    <!-- HTML head BEGIN -->
    
    @{
    Layout = "~/Views/Shared/_Layout.cshtml";
    }
    
    <!-- head END -->

  • #2
    Hello,

    To clarify, are you looking to perform a Replace All (text) command from a Folder Compare? BC4 does not have this direct functionality, to replace text on a selection of files from the Folder Compare session. It does have this command within a Text Compare session (Search menu -> Replace).

    The Folder Compare can filter on file content, so you could set up a filter from the Folder Compare's Session menu -> Session Settings, Other Filters tab, Exclude Files: Not Containing -> the text you are searching for. This would then show only files containing that text in the Folder Compare view.
    Aaron P Scooter Software

    Comment

    Working...
    X