- Windows find program using file
- Syntax
- Parameters
- Remarks
- Examples
- How can i find and open the program folder in Windows 8.1/10? (location, file, path)
- In Windows-8, 8.1 and 10 It is quite simply to find a program folder or file directory and open it!
- 1.) Open the certain program folder via Search!
- 2.) Open file location, program location via shortcut link windows 8!
- 3.) Windows 8.1 installed programs folder location!
- 4.) Windows 8.1 file explorer location!
- How To Know Which Process is Using a File or Folder in Windows
- Resource Monitor
- Process Explorer
- My Take
- How to do a simple file search in cmd
- 5 Answers 5
- How do I find the location of an executable in Windows?
- 14 Answers 14
- Example
- Output:
Windows find program using file
Searches for a string of text in a file or files, and displays lines of text that contain the specified string.
Syntax
Parameters
Parameter | Description |
---|---|
/v | Displays all lines that don’t contain the specified . |
/c | Counts the lines that contain the specified and displays the total. |
/n | Precedes each line with the file’s line number. |
/i | Specifies that the search is not case-sensitive. |
[/off[line]] | Doesn’t skip files that have the offline attribute set. |
Required. Specifies the group of characters (enclosed in quotation marks) that you want to search for. | |
[ :][ |
]
Remarks
If you don’t use /i, this command searches for exactly what you specify for string. For example, this command treats the characters a and A differently. If you use /i, however, the search becomes non-case-sensitive, and it treats a and A as the same character.
If the string you want to search for contains quotation marks, you must use double quotation marks for each quotation mark contained within the string (for example, «»This string contains quotation marks»»).
If you omit a file name, this command acts as a filter, taking input from the standard input source (usually the keyboard, a pipe (|), or a redirected file) and then displays any lines that contain string.
You can type parameters and command-line options for the find command in any order.
You can’t use wildcards (* and ?) in file names or extensions that you specify while using this command. To search for a string in a set of files that you specify with wildcards, you can use this command within a for command.
If you use /c and /v in the same command line, this command displays a count of the lines that don’t contain the specified string. If you specify /c and /n in the same command line, find ignores /n.
This command doesn’t recognize carriage returns. When you use this command to search for text in a file that includes carriage returns, you must limit the search string to text that can be found between carriage returns (that is, a string that is not likely to be interrupted by a carriage return). For example, this command doesn’t report a match for the string tax file if a carriage return occurs between the words tax and file.
Examples
To display all lines from pencil.ad that contain the string pencil sharpener, type:
To find the text, «The scientists labeled their paper for discussion only. It is not a final report.» in the report.doc file, type:
To search for a set of files, you can use the find command within the for command. To search the current directory for files that have the extension .bat and that contain the string PROMPT, type:
To search your hard disk to find and display the file names on drive C that contain the string CPU, use the pipe (|) to direct the output of the dir command to the find command as follows:
Because find searches are case-sensitive and dir produces uppercase output, you must either type the string CPU in uppercase letters or use the /i command-line option with find.
How can i find and open the program folder in Windows 8.1/10? (location, file, path)
In Windows-8, 8.1 and 10 It is quite simply to find a program folder or file directory and open it!
1.) Open the certain program folder via Search!
1. To open the certain program folder, -path press the [Windows-Logo] key
2. then you simply tap the program name—for this example «internet» for Internet Explorer (see Image-1 Arrow-1).
3. Click on the Program with the right mouse button (see Image-1 Arrow-2),
4. At the bottom of the Windows search will displays a selection.
5. Now you just click on «open location» (. see Image-1 Arrow-3)
The result: (. see Image-2)
Image-1 |
In Windows 8 I will find the program folder and open him! |
2.) Open file location, program location via shortcut link windows 8!
If there is a program such as to link to the Internet Explorer 10.0. Click with the right mouse button on the «program shortcut» and the command «open file location» (. see Image-2 Arrow-1)
Image-2 |
Open the program location in Windows-8 example IE10.0 |
3.) Windows 8.1 installed programs folder location!
The standard install path for programs in windows 8 is Programs and ProgramsX86!
(Image-3) program files folder in Windows 8! |
4.) Windows 8.1 file explorer location!
The ms file explorer is in C:\Windows use this in address bar or %windir%
How To Know Which Process is Using a File or Folder in Windows
Ever wondered which program has a particular file or directory open? Quite often, when trying to delete a folder, Windows reports this:
This error also happens with a file, when we tried to move a file, or delete those file. How we can find out which program or application is currently using it and preventing us to delete/move it? To get the process holding those folder or file, we can use these two utilities:
Resource Monitor
For Windows 7 and above, you can use the built-in Resource Monitor.
Open Resource Monitor, which can be found
- By searching for resmon.exe in the start menu, or
- As a button on the Performance tab in your Task Manager
Resource Monitor from Task Manager’s Performance Tab
From CPU tab, use the search field in the Associated Handles section
When you’ve found the handle, you can identify the process by looking at the Image and/or PID column. You can then close the application if you are able to do that, or just right-click the row and you’ll get the option of killing the process (End Process) right there.
Process Explorer
Process Explorer shows you information about which handles and DLLs processes have opened or loaded.
- Open Process Explorer (running as «administrator») by running procexp.exe or procexp64.exe.
- Enter the keyboard shortcut Ctrl+F. Alternatively, click the “Find” menu and select “Find a Handle or DLL”.
Process Explorer — Find Handle or DLL
- Type in the name of the locked file or other file of interest in the Search dialog box, then click «Search». Partial names are usually sufficient.
- A list will be generated. There may be a number of entries. Click one of the entry, it’ll «Refreshing handles».
Process Explorer — Search
Same as Resource Monitor, an individual handle in the list can be killed by selecting it and pressing the delete key (or Close Handle). However, please be careful when deleting handles, as system instabilities may occur. Rebooting your system maybe will free the locked file/folder.
Process Explorer — Close Handle
Handle is a command line version of Process Explorer.
My Take
I prefer to use Resource Monitor compare to Process Explorer since Process Explorer is slower (especially during «Refreshing handles» process). If I can’t find the handle in Resource Monitor, then I use Process Explorer.
Liked this Tutorial? Share it on Social media!
How to do a simple file search in cmd
I want to quickly search for a file given its name or part of its name, from the windows command line (not power shell). This is similar to opening explorer and using the search box at the top.
Note: dir can search based on a string template but it will not search in the subdirectories.
Note2: findstr can be used to search for a token inside files and has a recursivity flag; it’s funny that a more complex find can be easily discovered .
5 Answers 5
dir /s *foo* searches in current folder and sub folders.
It finds directories as well as files.
/s Lists every occurrence of the specified file name within the specified directory and all subdirectories.
searches for all txt file in the directory tree. Before using it just change the directory to root using
you can also export the list to a text file using
and search within using
EDIT 1: Although this dir command works since the old dos days but Win7 added something new called Where
will search for exe & dll in the drive c:\Windows as suggested by @SPottuit you can also copy the output to the clipboard with
just wait for the prompt to return and don’t copy anything until then.
EDIT 2: If you are searching recursively and the output is big you can always use more to enable paging, it will show — More — at the bottom and will scroll to the next page once you press SPACE or moves line by line on pressing ENTER
How do I find the location of an executable in Windows?
I remembered that I used a tool called as where to find locations for any executable programs like this in a console:
Now I cannot find this tool. Not sure if Windows has a build-in tool to do that search?
14 Answers 14
According to the StackOverflow answer at Is there an equivalent of ‘which’ on windows?, where.exe does this on Windows 7 and Windows Server 2003 and later:
Example
Output:
In powershell use where.exe , Get-Command (or its abbreviation gcm ), as where is the default alias for Where-Object .
EDIT: I should have added, if you can’t use the WHERE command from the command prompt, check your PATH variable. (Just use the «path» command.) Make sure C:\Windows\System32 is in your path. That’s where «where.exe» is located.
WHERE is the command you’re looking for! WHERE is like a cross between the UNIX shell built-in «which» and the «locate» command, in that it works for both command executables and regular files.
It’s also somewhat more complex than either of those two, although, in general a simple
It’s different from the «locate» command in that it’s not looking through the entire filesystem. Instead, the default behavior is to look for files in two locations:
- The current directory.
- All of the directories in the PATH variable.
So, any command that you can run directly from a command prompt without specifying the directory, will be found by the WHERE command. (Because any command like that is already in the PATH variable list.)
If you want to search only in the command path variable, you can use:
If, on the other hand, you want to find all copies of a file in a directory tree, you can use:
Finally, WHERE will find commands and any files with an extension from the PATHEXT variable without including the extension. All other files have to be specified either exactly or with wildcards.
Take for example the files «dxdiag.exe» and «dxdiagn.dll». Note the following command and its output:
It succeeds in returning all versions of «dxdiag.exe» because «.exe» is one of the extensions in the PATHEXT variable. (Note: «WHERE dxdiag» would have worked as well, because C:\Windows\System32 is in the PATH variable.)
on the other hand, fails to return any result, because «.dll» is not in PATHEXT.
In this case, look at the result that adding a wildcard gives us:
It successfully returns all versions of dxdiagn.dll.
For more information, use «WHERE /?». Hope this helps!