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 Displays files names only.
eeFindOutput Redirects search results to the Output Bar.
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-2014 by Emurasoft, Inc.