The Windows 10 provides a very powerful command line interface that has the ability to perform all the operations that you can do through the File Explorer. Whenever your computer is infected and you can’t access the File Explorer or you want to delete any stubborn file with administrator privileges or you want to open a hidden file from Command Prompt, you first need to browse to the folder.
When working on Command Prompt, you need to know the commands that you can type to perform different operations. The commands are very simple and easy that anyone can remember them.
Opening a Folder in Command Prompt
All you need is to open the Command Prompt from the file explorer and enter the path of the folder with cd.
in case you have nested folders, you can separate each folder name with a forward slash
Here db is a folder inside the folder fyp. You can also move to other drives, to move between drives, you need to type the drive letters with a colon
Opening a File with Command Prompt
When you are in the folder where the file is located you need to enter the filename along with the extension and press enter to open the file.
In case you need to open a file named movies, you need to enter movies.txt and press enter key to open the file. Make sure that you are in the exact directory where the file is located.
The command prompt also provides the possibility to suggest the files on the directory, all you need is to type of the first letter or starting few letters of the file name and press tab until the desired file name comes up.
Command Prompt opens a file in the default application associated with the file extension. You can also open the files in the desired application by providing the application path with the application name along with file path and the file name with correct extension. Note that both the values come in quotation marks i.e. “Path-to-application\application-name.exe” “Path-to-file\filename.extension”
Closing a File
You can also close a file with the exact application name using the following command:
taskkill /im application-name.exe /t
In case you want to close notepad you need to type:
taskkill /im notepad.exe /t
It will close all the instances of the notepad.