How to Open a Word File from the MS-DOS Command Prompt

Opening a Word file ( .doc or .docx ) from the MS-DOS command prompt is possible, but there are a few steps you need to follow.

Before we move forward, three important commands you need to know here:

cd to change directory

cd.. to go back one step at a time and

dir to show all files and folders in current location.

After every command, you have to press Enter.

 

Now let’s start:

Open the Command Prompt:

Press Win + R on your keyboard

Type cmd and press Enter

 

Navigate to the File Location. By default, it shows you the following location. Use the ‘cd..’ command to go to your file location.

C:\Users\john>

C:\Users\john>cd..

C:\Users>cd..

C:\>

 

List files and folders using: dir

C:\>dir

This will show you all the folders and files in this directory. Now go to your folder

C:\>cd MyDocs

press Enter

C:\MyDocs>

Now you are in MyDocs folder. Type dir and then Enter

C:\MyDocs>dir

It will show you all the sub-folders and files. You can go to any sub-folder and navigate the same way using cd and dir commands

C:\MyDocs>cd MySubFolder

C:\MyDocs\MySubFolder>dir

press Enter. Remember if you want to go back one step then type cd..

C:\MyDocs\MySubFolder>cd..

press Enter

C:\MyDocs>

Now, let’s say your file is in this folder and called MyFile.doc. This is the word document you want to open from command line.

So type:

C:\MyDocs>start MyFile.doc

press Enter. Your file should open now.

 

Another method:

C:\MyDocs>start winword MyFile.doc or

C:\MyDocs>start winword MyFile.docx

 

Same way, let’s say I want to open a .jpeg file in this folder named ocean_wave.jpeg. Just type:

C:\MyDocs>start ocean_wave.jpeg

That’s it.

 

When gets messy, to clear the screen, type in your command line cls and Enter

C:\MyDocs>cls

 

If you need to change the Drive from C to D, type D: and Enter and vice versa:

C:\MyDocs>D:

D:\>

 

To Exit from your MS-DOS command prompt, type exit, press Enter.

C:\MyDocs>exit

 

Cheers and have fun!!!

(Visited 9 times, 1 visits today)

Leave A Reply

Your email address will not be published. Required fields are marked *