How to search for a file name in Visual Studio code [Using Shortcut]?

It is easy to find a file in VScode using its name. However, it may not show matching files if you search for it using the search option from the left panel file explorer by using the name as a search word. The solution to this problem can be found here.

VScode, how to search for a file?

how to find file name in vs code?

Ctrl + P

To search for a specific file name in Visual Studio Code, you can use the file search functionality provided by the editor. Here’s how you can do it:

how to find file in vscode
Filename search in vs code

  • Open Visual Studio Code.
  • Press Ctrl + P (Windows/Linux) or Cmd + P forMac) to open the Quick Open menu.
  • In the input field that appears, type the filename you want to search for. For example, if you want to search for a file named “codetryout.php”, you would type codetryout.
  • As you type, Visual Studio Code will start listing the matching filenames in the Quick Open menu.
  • Click on the desired filename in the list to open the corresponding file.

This is a quick file search method if you are quickly looking to open the file.

To summarize, we have reviewed the steps to search files in vscode. Your vscode has more advanced file search options available.

Please refer to this complete guide for them: VSCode advanced file search options


This article discussed using Visual Studio Code’s file name search function. VScode is one of the most actively developed IDE today. Features and options are added or enhanced on every update. Please check the latest release notes for more up-to-date information.

Related articles:

Best Practices for File Naming

File naming is an essential part of data management. Poor file naming practices can lead to confusion and lost data. Following best practices for file naming is crucial to ensure that files are easily accessible, identifiable, and understandable.

Read more here: File naming conventions best practices

Use Descriptive Names

The first best practice for file naming is to use descriptive names. When you name a file, make sure that the name is descriptive enough to provide context about the file’s content. Descriptive names should be concise but detailed enough to help you identify what the file is about. Avoid using generic or vague words such as “Document 1” or “Untitled.” Instead, use names such as “MarketingPlanJanuary” or “QuarterlyReport_Q1” that provide specific information about the file’s content.

Consistency is Key

The second best practice for file naming is consistency. Consistent file naming ensures that files are easy to find, organize, and understand. Develop a naming convention and stick to it. For instance, you could use a specific date format such as YYYY-MM-DD or a particular naming convention such as Title_Creator_Date. If you work in a team, ensure everyone uses the same naming convention.

Use Special Characters with Caution

The third best practice for file naming is to use special characters with caution. Special characters, for example:


– can cause compatibility problems and make accessing files on different systems difficult. Avoid using special characters in file names; use hyphens or underscores to separate words.