Open text file from command line

by admin on July 16, 2009

On  a Windows machine, we can open a text file from command prompt by just giving the file name.
For example to open a text file named file1.txt, we just need to type file1.txt in the command prompt and press ‘Enter’. 

c:> file1.txt

Note that file name should have the extension as .txt otherwise command prompt would not be able to identify which application need to be used to open the file.

{ 2 comments… read them below or add one }

sumit September 24, 2013 at 6:14 pm

.\filename.txt
then hit enter.

Reply

Suman Ghosh October 29, 2013 at 8:18 am

more filename

Reply

Leave a Comment

HTML tags are not allowed.

Previous post:

Next post: