banner



How To Open A File In Cmd Windows 10

Find and Open Files Using Command Prompt in Windows 10

Did you ever forget where you lot stored a file on your reckoner or simply couldn't recall part of the name of a file that you badly needed to detect? You could have easily saved yourself some headache had yous known how to find and open files (image, text, video, music) and folders using Command Prompt (CMD) in Windows 10. While information technology is a waste product of time and free energy using a command line interface to open files and folders under regular circumstances, it comes in handy under certain situations.

Find and Open Files and Folders Using Command Prompt in Windows x

The Command Prompt offers a lot of absurd tricks and lets you access a lot of Windows features, including many that are non attainable from within the GUI. Hither, nosotros will show y'all how to find and open files using the Command Prompt. While you tin can do information technology using the Windows File Explorer, the methods detailed beneath will assist you if you forget the full filename or don't remember where you stored information technology on your computer.

Note: I'grand using Windows 10 for this demo, but the same methods volition apply in Windows 7/ 8/ 8.1 and older. Also, yous tin use the methods below to observe and open any type of folder or file in Windows ten control prompt (CMD), including text, video, music, and more.

Observe a File or Folder Using Command Prompt

  • Open Windows Command Prompt in Admin mode by searching for 'cmd' in the Windows Search Bar and selecting 'Run every bit administrator'.

  • Now type in dir "\*file name*" /s to search for the target file on your C:\ bulldoze. Make certain to replace "file proper noun" with the actual name of the file or folder yous're trying to find. For this demo, I'm trying to find a file called 'demo1.jpg'.

command prompt

  • You'll get multiple results even if at that place's only a single file with that name. All the same, y'all can hands place the right path by its size.

specify folder location using command line

  • Past default, the aforementioned command volition search the C:\ drive. If y'all take multiple drives on your PC, you lot volition need to specify the target bulldoze. For example, to search the D:\ drive, you lot should type ind: and press Enter.

change drive in CMD

Now just apply the dir "\*file name*" /southward command described earlier to notice your target file or folder.

Exercise note that you can as well use simply ane asterisk (instead of two), either at the get-go or at the end of the filename. Putting the wildcard at the end will find all the files with your search term at the first of the proper name, while putting it at the start will list all files with your search term at the terminate. I'm putting the asterisk at both ends to observe all files that include the search text, whether at the start, end or somewhere in betwixt.

Open Files Using Command Prompt

Once you lot know the precise path of a file (prototype, text, video, music) or folder, you can easily open up that using the Control Prompt in Windows x. Here'due south how you do it:

Method 1: Open Files in Command Prompt Via the Folder Route

  • Firstly, specify the directory and folder of the file you're trying to open. In my case, the target file lies in a folder called 'Demo Folder' at the root of the D: drive. So, we'll first go to the root of the D: drive. For that, blazon in d:and press Enter as detailed in the earlier segment. You can drib this footstep if you're trying to open a file in bulldoze C:.
  • Now admission the target binder with the post-obit command: cd demo folder/

acees folder in command prompt

  • Finally, type-in "demo2.jpg"(including quotes) and printing Enter.

find file in command prompt

Windows will open the file using the default app associated with that file type.

Method 2: Open Files in Command Prompt Direct

Meanwhile, you can too open files direct from the command prompt if yous know the total file path. Here'due south how you do it:

  • Say you want to open up a file at "C:\Users\<username>\Desktop\Stuff\Img\Jan 2021\28 Jan\CMD\demo1.jpg". For that, open Command Prompt and ensure that y'all bespeak it at the right drive first. Then, but type-in the total path (including quotes) and press Enter.

Open Files Via Command Prompt Directly

Specify an App to Open a File Using Command Prompt

In both the same cases, the file will be opened using the default app associated with that file type. You tin can, however, specify any app on your PC to open that file. Say, your JPG files open with Adobe Photoshop by default, merely you can open it with Paint (or any other uniform app) if you want. Hither's how you do it:

  • To open the aforementioned 'demo1.jpg' file using Paint, nosotros will take to straight the Os towards the installation folder for 'mspaint.exe' alongside the full path of the file itself. For that, nosotros'll utilize the post-obit syntax: "%windir%\system32\mspaint.exe" "C:\Users\Kundu\Desktop\Stuff\Img\Jan 2021\28 Jan\CMD\demo1.jpg"(including quotes).

Specify an App to Open a File Using Command Prompt

The command in a higher place will open up the 'demo1.jpg' file with MS Paint instead of the default photograph viewer app on your PC. Do note that the file paths may vary from one calculator to another.

Go Things Washed Using Command Line Tools in Windows x

Now that yous know how to find and open up files and folders using the Command Prompt in Windows 10, get alee, give it a shot, and let us know why you're looking to employ the Command Prompt to observe and open files on your PC. In instance yous similar working with command-line tools in Windows but the more feature-rich PowerShell is your weapon of choice, check out our tutorial on how to personalize Windows PowerShell on your PC. You can besides check out everything nigh the Windows Concluding and how to install and customize it on your computer.

Source: https://beebom.com/find-open-files-using-command-prompt-windows-10/

Posted by: houghfroopped81.blogspot.com

0 Response to "How To Open A File In Cmd Windows 10"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel