# DOS and the Web? Opening a file!



## BahamaBoy (Dec 5, 2007)

Is there a way I can open a .txt file that is on the web from DOS?

For example;
Let's say the file is located at: http://www.mydomain.com/document.txt

Is there a DOS command that I can use to open that file and maybe make it pop-up in windows?

Thanks


----------



## Frank4d (Sep 10, 2006)

Type at a command prompt or in a batch file:
*start iexplore http://www.mydomain.com/document.txt*

(substitute firefox for iexplore if you use Firefox)


----------



## BahamaBoy (Dec 5, 2007)

Frank4d: Thank for your reply.

However, my browser does not work on the computer I need to pull the file down. Is there a way I can have it open str8 to notepad or wordpad from a command in DOS?


----------



## Squashman (Apr 4, 2003)

You can use a utility called wget to download files from the Internet. 

May we ask why your browser isn't working. Have you tried Firefox and IE? Maybe we can help you fix the problem with your browser.


----------



## Rumpel (Sep 13, 2004)

BahamaBoy said:


> Frank4d: Thank for your reply.
> 
> However, my browser does not work on the computer I need to pull the file down. Is there a way I can have it open str8 to notepad or wordpad from a command in DOS?


If you're really serious about working from a command prompt in DOS instead of a graphic interface -- use WGET to download the file, then type TYPE at the command prompt, followed by a space and the full path and name of the file.

Hopefully, the textfile is not large, because this command will display the entire file and will not stop scrolling until the entire file has been displayed. Only the last 25 lines will remain on the screen.

It would be easier to use WGET to download the file, then open it using whatever Windows applet is handiest.


----------



## Squashman (Apr 4, 2003)

I suppose he could always use Lynx. That is what I used in the early days of the Internet because the University I went to didn't have PC's yet.
http://lynx.browser.org/


----------



## Frank4d (Sep 10, 2006)

I tried again today using MS Office Word2003 and http test documents open ok:
start winword.exe http://www.mydomain.com/document.txt


----------

