Show/Hide Toolbars

EmEditor Help

Navigation: EmEditor Help > Macro Reference > Tutorial

EmEditor Macro Reference: Replace in Files

Scroll Prev Top Next More
EmEditor Home - EmEditor Help - EmEditor Macro Reference - Tutorial

Replace in Files

To replace a string within specified files in a path, use ReplaceInFiles Method.

The following example demonstrates how to replace <H3> ... </H3> in a HTML file with <H4> ... </H4>.


editor.ReplaceInFiles( "<H3>(.*?)</H3>", "<H4>\\1<H4>", "C:\\web\\*.htm", eeFindReplaceRegExp | eeReplaceBackup, eeEncodingSystemDefault, "*.bak", "C:\\Backup" );


editor.ReplaceInFiles "<H3>(.*?)</H3>", "<H4>\1<H4>", "C:\web\*.htm", eeFindReplaceRegExp Or eeReplaceBackup, eeEncodingSystemDefault, "*.bak", "C:\Backup"

Copyright © 2003-2021 by Emurasoft, Inc.