Forrest logo
back to the findstr tool

findstr:tldr:81389

findstr: Display only the filenames that contain a match.
$ findstr /m "${query}" *
try on your machine

The command "findstr /m "${query}" *" is used in a Windows command prompt to search for a specific string within files in the current directory.

Here is a breakdown of the command:

  • "findstr": This is the command used to search for strings within files.
  • "/m": This is an option for the findstr command that is used to list only the file names that contain the matched string, rather than displaying the lines that contain the string.
  • "${query}": This is a placeholder for the actual string you want to search for. Replace "${query}" with the desired string you want to find.
  • : The asterisk "" is a wildcard character that represents all files in the current directory. It is used as a file name pattern for the findstr command to search through all files.

By running this command, the command prompt will search through all files in the current directory and display only the names of the files that contain the specified string.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the findstr tool