Show/Hide Toolbars

EmEditor Help

Navigation: EmEditor Help > Macro Reference > Editor Object > Methods

EmEditor Macro Reference: FindInFiles Method

Scroll Prev Top Next More
EmEditor Home - EmEditor Help - EmEditor Macro Reference - Editor Object

FindInFiles Method

Searches multiple files for matching string. The resultant list of the searched files will be displayed on the current window. If the document is not saved, this method will display the prompt message whether to save the file.

[JavaScript]

editor.FindInFiles( strFind, strPath, nFlags, nEncoding, strFilesToIgnore  );

[VBScript]

editor.FindInFiles strFind, strPath, nFlags, nEncoding, strFilesToIgnore

Parameters

strFind

Specifies a string to search for.

strPath

Specifies a path to search from. It can include wild cards such as * and ?.

nFlags

Specifies a combination of the following values.

eeFindFileNamesOnly

Only file names will be displayed and the whole lines containing the searched string will not be displayed as results. Cannot combine with eeFindLineOnly or eeFindMatchedOnly.

eeFindLineOnly

Only the whole lines containing the searched string will be displayed as results. Cannot combine with eeFindMatchedOnly or eeFindFileNamesOnly.

eeFindMatchedOnly

Only the matched strings will be displayed as results. Cannot combine with eeFindFileNamesOnly or eeFindLineOnly.

eeFindOpenDirect

Directly opens the document that includes the specified string. Cannot combine with eeFindOpenFilter or eeFindOutput.

eeFindOpenFilter

Directly opens the document that includes the specified string, and set the specified string as the filter. Cannot combine with eeFindOpenDirect or eeFindOutput.

eeFindOutput

Displays the Find in Files results as a list in the Output Bar. Cannot combine with eeFindOpenDirect or eeFindOpenFilter.

eeFindRecursive

Searches in subfolders of the specified path.

eeFindReplaceCase

Matches cases.

eeFindReplaceEscSeq

Uses escape sequences. Cannot combine with eeFindReplaceRegExp.

eeFindReplaceIgnoreFiles

Ignores the files or folders specified by strFilesToIgnore.

eeFindReplaceOnlyWord

Searches only words.

eeFindReplaceRegExp

Uses a regular expression. Cannot combine with eeFindReplaceEscSeq.

eeFindSaveHistory

Saves the searched string for repeated search.

eeOpenDetectAll

Detects all encodings.

eeOpenDetectCharset

Detects HTML/XML Charset.

eeOpenDetectUnicode

Detects Unicode signature (BOM).

eeOpenDetectUTF8

Detects UTF-8.

nEncoding

Selects from the Encoding Constants, or specify any code page used in the Windows Operating System.

strFilesToIgnore

If nFlags  includes eeFindReplaceIgnoreFiles, specify the file or folder names to ignore. It can include wild cards such as * and ?. To specify multiple files, use semicolons (;) to separate them.

Version

Supported on EmEditor Professional Version 4.02 or later.

Copyright © 2003-2016 by Emurasoft, Inc.