1. Home
  2. PCs
  3. How do you open a file by using command prompt?

How do you open a file by using command prompt?

2024-09-18 14 0

Whatever you are using the Blackview AceBook 8 Windows 11 Home laptop, Blackview MP90 and MP200 Windows 11 Pro mini computers, or Blackview MP100 Windows 11 Home mini PC, or other computers, to open a file using Command Prompt (CMD) in Windows, you can follow these steps depending on the type of file you're opening.

Open a file via CMD



1. Opening a File with Its Default Application


You can use the start command to open a file with its default program (e.g., .txt with Notepad, .docx with Word). Here's how:

  • Open Command Prompt.
  • Navigate to the folder containing the file using the cd (change directory) command.
  • Example:

    cd C:\Users\YourUsername\Documents


  • Use the start command followed by the file name.

Example:

start example.txt


This will open example.txt with the default application associated with .txt files (usually Notepad).



2. Opening a File with a Specific Application


You can specify the application you want to use to open a file. For instance, to open a .txt file with Notepad, use:

notepad example.txt


Or, to open a .docx file with Microsoft Word:

start winword example.docx



3. Opening Executable Files


To run or open executable files (.exe), simply type the name of the file (with or without the .exe extension) and press Enter.

Example:

example.exe



4. Opening a Folder in File Explorer


To open a folder in File Explorer from CMD, use the start command:

start .


This opens the current directory in File Explorer. To open a specific folder:

start C:\Users\YourUsername\Documents


This will open the specified folder in File Explorer.



Windows OS Related,

0

Prev article: Do all notebooks use integrated graphics?

Next article: 2024 Intel processors ranking list

We are here to provide an answer to all of your questions(FAQ) and help you choose

what you really need.

Follow what's new in Blackview!

Copyright © 2024 Blackview. All rights reserved.