# Questions about DOS



## starchild (Sep 17, 2002)

I've been doing DOS tutorials and have a book, but tonight I realized I have never seen anything about this (and couldn't find it)

How do I WRITE something? Like text. I go over changing directories and making sub directories and deleting them. And some basic comands like showing the contents of a drive (and having it show one page at a time)

Unless there's a command I haven't seen that opens some sort of text editor, I can't figure out how one would write something, in order to then save it?

I read about DOSSHELL, but when I type this in (on C drive) it says BAD COMMAND/FILE NAME.

I've typed in HELP and got a box that comes up, with files, save, exit, etc. Is it something to do with this?

Also, I haven't been able to get a document file open.

For example, I can put in a floppy with files on it, change to the A drive and open it, so it shows the list of files on it.

How do I open one of the files? I type the name in, and try it by itself or with .DOC after it, and it doesn't work.

Do I have to type all the information that is after it, too (I think it's the date and time)?

Then, if I get it open, so I could read it (and maybe edit it or change it?) how do I close it again? 

I think I'm missing something here, there must be something else that comes up to do all this with. 

I'm mainly trying to learn DOS just to know it. It's sometimes helpful to know, even with using WINDOWS (sometimes I've gotten stuck in DOS and was like being in a foreign country), also, I like the way I can type something in, and hit ENTER and it carries it out. There's something more satisfying with this than clicking a mouse 

It seems like opening, writing/editing, and saving text would be part of the basics.

Back when all there was only DOS, and no WINDOWS, and WORD, etc. to write on, there must have been a way to write files to have something to save in all the directories and subdirectories the tutorials teach about.

Thanks,

~ Carrie


----------



## Cosmic (May 5, 2003)

Ok for DOS.

How do I WRITE something?

Well everybody had their favorite little word processing programs. Mine was one called ED. Directly from DOS you could use something like EDLIN (A command as part of DOS). Also was possible to use DEBUG. Not many people probably used the built-in DOS editors. EDLIN has its own little bunch of commands similar to any text editor. That included being able to create, edit and save a file.

To show a text file directly from the Command Line, use the command TYPE. As in TYPE A:MYDOC.TXT/P that puts the ASCII text document on the screen in a paging format.

Can also redirect with TYPE and put the document to printer as with TYPE MYFILE.TXT > PRN

Us old DOS hands were much slicker than that. Using the DOS command line for commands was not done that much after the very early days. Programs like AUTOMENU and OVERVIEW (Which later morphed into TREEVIEW) came along and most folks switched to using those as a replacement for DOSSHELL which never did work very well. You still could execute DOS command line type commands inside a program like TREEVIEW. 

Once you knew DOS it was about like riding a bike. You never really forget how. To be really proficient, you pretty well had to master the basics, even with the menuing programs. Plus a lot of people did normal routine things with Batch files. Was extremely common way of automating many tedious operations.

Many of us actually wrote our own software for daily chores. Small well tailored programs were a joy compared to many of the commercial stuff that never actually did what you wanted. 

TREEVIEW is a gas because you can do most of the DOS commands as logical couple of key strokes, plus see all the drives contents in open windows at the same time. My machines where set up to boot to AUTOMENU which could call programs or common DOS functions as menu item selections. One of those selections was to go to TREEVIEW to do file manipulations. AUTOMENU could be tailored exactly to your particular machine by using its own built in language to write a script type program. You sort of used DOS as a backup to a backup for anything that was not directly supported. Within TREEVIEW there was an ability to execute a DOS Command Line sequence by a few keystroke setup.

You got to be a pain freak to want to operate in DOS totally from the Command Line. We didn't do it for long in the old days. Everybody wants to invent the better mousetrap.


----------



## Elvandil (Aug 1, 2003)

Did you forget the "edit"?


----------



## Cosmic (May 5, 2003)

EDIT under DOS is part of the EDLIN command set of which there are something around a dozen or more supporting commands.

EDLIN was not that popular. I never really used it. Text editors were some of the first programs people started to write and they very quickly became the default programs of choice. Uncle Bill never tried to upgrade EDLIN in any meaningful way. Always was a crude little bugger.

The dirty little secret was Uncle Bill made a career of putting a gun to people's head for their improvements that were written to take care of missing functions or slick tricks that DOS did not have. He basically "Made them offers, they couldn't refuse" and those would show up in the next version of DOS. His one big screw up was Version 4.0, which Microsoft actually tried to introduce a bunch of changes made in "Secret". The big joke was all the work was really Microsoft's for once and look at the result. A total flop. Uncle Bill got credit (and the real money) for a lot of other peoples hard work.


----------



## Elvandil (Aug 1, 2003)

You obviously know your DOS history! But I was thinking of something a bit more elegant than EDLIN, like the edit.com external command that came with DOS 5 and above that I have made available to our OP here:


----------



## Cosmic (May 5, 2003)

Ah, that EDIT.COM of the later versions is probably a direct take out from a number of the programming languages. I would note it is exactly the underlying editor in the QuickBASIC series to include QBASIC. From the dates it would appear it was developed for the programming languages and exported to be a word processor as part of DOS. By that stage my habits were well set and I didn't use it. My favorite was one called PCWrite and you could couple that in a two stage process with one called SCRIPT and make fantastic printed documents because it had all the power of a typesetting publishing program.

The question of any of the later things in DOS was always from who did Uncle Bill steal that part? Very little seemed to be direct Microsoft inventions. He even "Borrowed" the original DOS program. Altho that "Look" in the MS-DOS Editor was something Uncle Bill tried to maintain was exclusive for the use of Microsoft. It appears in many DOS Programs and many people claimed it was the most elegant layout that could be devised. Even to the point, I have a code generation program that will generate a program layout in that style for the GUI portion. I did use it quite a bit as the general layout for many programs I wrote. Even improved on how the drop down menus can call subroutines and built mouse control into it. Uncle Bill never made me an offer, darn it. Be interesting to find who the original author was.

Yeah, I guess Starchild would like the Editor if nothing else is in the toolbox. Old DOS can get you hooked if you play around enough.


----------



## kiwiguy (Aug 17, 2003)

Edlin?
What a luxury!

Whats wrong with COPY CON filename.ext ??

Direct console input, and use CTRL-Z to quit and write to file.

Just don't make a mistake.... Or you start again.

DOS user since DOS 1.0


----------



## AbvAvgUser (Oct 3, 2002)

Just to contribute with my 2 cents. This is how copy con works.

Copy Con filename.txt means, copy whatever is on the console (screen) to the file filename.txt. 

DOS user since 'don't know the version, but 1988' 

DOS doesn't have file associations. So you have to first open the application and from there open the required file. Just typing the name of the file won't open the associated application.

Secondly DOSShell, is getting a command prompt like C:> or C> from within a program. That was DOS's way of primitive multi-tasking. In Windows (98), you can go to Start > Run and type command. You will get DOS Prompt. That is something similar to DOS Shell.


----------



## jack_madboy (Jun 1, 2004)

yes, type edit in dos. do mu use command promt?


----------



## jack_madboy (Jun 1, 2004)

or is it just that dos stupidm program built into 98\me\98se\95\3.1...


----------



## Cosmic (May 5, 2003)

I just hope this thread does not kick off a DOS War's mode where all old users must reveal all the buried secrets held for so long. I totally refuse to tell how to program above RamTop even if they put bamboo splints under my fingernails. The beauty of DOS was the many deep secrets the uninitiated who never had been fully inducted into the Society never got to know. The mumbling of sacred jive and slight hand movements over small glowing embers.

A million years from now, when they dig up a DOS disk from some ancient ruins, nobody will the able to decipher how it worked. Inscrutable will be the best word anybody will be able to come up with. After many years of long study, all the experts will agree, all practitioners of this ancient Black Art all did it exactly the same way.


----------



## starchild (Sep 17, 2002)

This is very interesting to read. It seems like the DOS tutorials and books must assume that we (who are trying to learn it) KNOW about editors to open and read/write files in?

I can get this IN the dos program? Like type the name ELIN? 

I don't know how else one would get it, without the internet to download it from.

There wasn't the internet in DOS?

I could probably read the archives here and learn a lot.

I spent most of today in SECURITY, and on my daughter's computer (upstairs) she never pays much attention to viruses adware and such. I had put the programs in to find and remove them, but she hadn't run them and updated them. I've been getting all the viruses and toolbars and stuff that had taken over out, with a LOT of help from people on this board.

One thing I didn't find out (yet) I was in DOS- I went in because I've learned (here) how to clear the history and temp files that way. I was trying to look at drives, etc. and opened the C drive (with /P to move it one page at a time) I saw two weird files called 0 The number, I think. One had nothing beside it (just the size, date, etc. further over) and one had a long space and BAT after it. One 174 bytes and the other 255 bytes.

I tried to open them in DOS (because I think viruses don't effect this?) and couldn't

I must still be missing something with this.

I type the name, in this case 0 after the promt (which was C drive) and hit ENTER.

It just kept saying BAD COMMAND/FILE NAME.

I later went and found the files in WINDOWS, but didn't want to open them. The virus scan said they're okay (and so far nobody's told me anything about them in SECURITY) One, in properties had a lot of stuff like display toolbar, and restore settings at start up.

I didn't want to just take them out.

Anyway, the point in DOS is, I'm not doing something write with opening them. Unless I need to have the text editor and open that first?

It's probably some simple thing.

Back around 1993, we were homeschooling our kids, lived outside of Boston MA, one of my teenage son's friends decided our younger kids should learn about computers. He was (and probably still is) very much into this.

He brought one of his to our house, BIG (noisy and hot) and set it up. It was probably one of those IBMs they had before WINdOWS. I knew nothing about them. I think he mainly just showed off with it, he'd type stuff (in DOS of course) and bring up files, and games, etc. and say "see, just do that!"

Nobody in our family could figure it out. I used to try, over and over (with no real instructions) I remember that BAD COMMAND/FILE NAME though 

He had some cds with math problems on them, he'd set up for my kids to do (in their head, with a time limit). It seemed like it was just as easy to write the problems down on a paper and have them do them.

After awhile, he took it all back home.

Back in 1982 or so, one daughter went to community college and took "Business Computers" (we didn't have one, at home) She had to learn BASIC which never made sense to me. PASCAL I think was one?

Long pages of "let #1 stand for.." (or something)

I know that's a computer program, and you type it in and hit ENTER, but I never knew what it does when you do that.

Anyway, that's my history with DOS...

I do want to learn it, just to know, so if I need it for something. Especially in an emergency way (reinstalling WINDOWS for one thing. The times I've done it, I've mainly just guessed. The hd were already partitioned, which helped) 

I'm not ready to give up WINDOWS though. I am holding onto 98 and 98 SE, though.

~ Carrie


----------



## brushmaster1 (Jun 15, 2002)

I actually *miss* DOS! It was fun finding work-arounds to do many of the things that are taken for granted by Windows users.


----------



## AbvAvgUser (Oct 3, 2002)

I agree with brushmaster1. Even I miss DOS . Those good old days when mouse was a luxury and programming it made you feel proud (only initially though  ). I had made so many of my own .h files in C and so many function libraries. Linked C with Clipper and COBOL. Good old DOS days.


----------



## codejockey (Feb 11, 2002)

First, kudos for trying to learn DOS. Everything you learn about DOS will serve you well with Windoze, Unix/Linux and other operating systems. At the risk of over-simplifying and boring the more accomplished DOS masters posting here, let me try to clear up at least a little of your confusion ...

DOS is often described as an "operating system". An operating system is just a collection of programs that provides basic services to you, the user, so that you can interact with the machine. For example, one service is displaying information (characters, graphics, etc.) on the screen. Another service is loading programs into memory and preparing them to run when you type their name at the command line. Another service is managing the storage and retrieval of information on different media (floppies, hard drives, etc.). However, even with all of the services DOS provides, there are still lots of things it doesn't do -- and editing files is one of them. 

This means that you must use DOS to load a different program (an editor) in order to create and modify files. Microsoft recognized that editing files is something most people want to do, and so they provided a rudimentary editor program (edlin) that was included when you purchased DOS. Other people wrote more extensive editors (PCWrite, WordStar, WordPerfect, etc.) and you were free to choose which you prefered to use (or even switch among them as needed). So here is the bottom line: when you wish to edit (modify, create) a file, you must type the name of some editor program at the command line. For example, if you wanted to modify the file calendar.txt and you were going to use the edlin editor to do it, you would type: edlin calendar.txt at the command prompt. That command tells DOS to load the program edlin, and to arrange for edlin to know that you want to edit the file named calendar.txt.

I wouldn't recommend beginning with edlin, however, as it is a line-oriented (as opposed to a screen-oriented) editor, and will seem positively prehistoric by today's standards. If you are using a more recent DOS version (5.0 or later), you can try using a different editor supplied with DOS, named edit. Again, to create, modify or view the file named calendar.txt, you would type: edit calendar.txt at the command line.

The reason simply typing the name of the file you want to edit doesn't work is because DOS is expecting you to begin the command line with a command that it recognizes, such as copy, find, dir, etc. When you type only the filename, DOS tries to find a command with that name, and fails (there is no command named calendar.txt, for example). 

There's lots more to the story here, but hopefully this was somewhat helpful. Again, kudos for wanting to understand DOS.


----------



## DaveBurnett (Nov 11, 2002)

On later versions of DOS you can find out what commands are available, and some help on them, by typing HELP
If you already know the command name you can get help by HELP COMMANDNAME or COMMANDNAME /?


----------



## starchild (Sep 17, 2002)

I'm going to have to get an ink cartridge (if I can squeeze it into the budget this month  I'm trying to take notes on this, to use when IN dos and then can't read my own wriiting 

I think the version of DOS I have is 4- something. (I put in VER once when I read about this, and that's what I remember) The book I have about DOS is for 5-6

Mine must have come with the version of WIN I have 98SE. 

I can put in HELP (I found that on my own) and it brings up a grey box with words in it. That needs the keys to navigate through, and I find what works at some point.

How would I get the other, and easier to use text editors? I think WordPerfect (which is now for WINDOWS) would be something to buy?

Can I download something (in WINDOWS) and than install it in the DOS?

That woudl be another lesson, opening something and installing it!

Seems like all the lessons/tutorials I see are for making and saving files. it never says where one GETS the files in the first place (saying you don't have WNDOWS to have made them in something, first) and deleting, etc.

I think it will be good to know. I remember when I learned to make webpages (which took a lot time, staying up half the night, trying things over and over, asking people questions trying to figure it out) I wanted to learn html coding, from the start. I figured it would be good to know, like if something didn't work right, I could go over it.

I know people who make webpages in programs like FRONTPAGE who don't know what it's doing, and can't fix it if it's not right.

I'm still way behind on a lot, though. I'm either an old dog learning new tricks, or a sponge (LOL)

I turned 60 last Nov (am a great grandmother) and have had a computer since Fall of 1998. First got one with the idea of learning it and finding a way to use it to make money at home, because I don't have a car, and live out in the country.

Still haven't got to that point yet, I think just the learning is a help, it takes up my mind and helps me feel like I'm doing SOMETHING.

The times I've needed DOS for something, it's been frustrating not knowing what to do. I'm probably not the first and only one frustrated by BAD COMMAND/FILE NAME 

~ Carrie


----------



## DaveBurnett (Nov 11, 2002)

That version of dos would be version 7 if it came with windows98 and MicroSoft in their 'wisdom' removed some of the better DOS commands, and added others so the book you have be different in quite a few places.



> Can I download something (in WINDOWS) and than install it in the DOS?


Most certainly.


----------



## Lurker1 (Jan 30, 2001)

Well if you are just going to look at BAT and TXT files then use the windows notepad. It should let you look at at most of the DOS files that you can change.

EDLIN ugh, copy con double UGH!!!!!!!!


----------



## DaveBurnett (Nov 11, 2002)

Lurker1 said:


> Well if you are just going to look at BAT and TXT files then use the windows notepad. It should let you look at at most of the DOS files that you can change.
> 
> EDLIN ugh, copy con double UGH!!!!!!!!


But then she would not be learning DOS, would she - which IS the point of the exercise


----------



## starchild (Sep 17, 2002)

Later..

I was in DOS, got the EDIT up and figured out how to get around in it. I can get something open like MYDOCS, the files come up and I highlight one and it opens.

I can't resize it so it fits on the screen. It runs off to the side "forever". There are a lot of what look like formatting marks on the top and around it. I found a menu on the top that says screen size, but nothing happens.

There is also one that says COLOR- which is another story. I was trying these out, different backgrounds and text and my grandaughter (who turned 5 last March) was fascinated with it. She also now loves Photoshop filters, I will bring up a picture (duplicate it) and she'll sit and click on filters and see what it does, and than CTRL-Z to change it back. She can't read, but she knows where the filters are and clicks on them at random. She called Photoshop "the Eye" because of the icon. She can put it on, wait for it to load and do everything but find a picture and open it (and duplicate it for safety) She can click on LIQUIFY and swirl the colors around with that.

Of course, I am helping her learn. (she can also open WORD and change the color and size of the text and practice spelling and writing in that)
So, I showed her how to get to FILE and over to where the COLORS was, and using the arrow keys to get to the background and forground colors, and ENTER to see it on the screen (and write letters) I left her alone writing letters, and next thing she had the options on again, and was changing the colors. Since you can see it in the sample bar on the bottom, she'd find the combination she wanted before hitting ENTER and then writing some letters. She was having the best time with this and did it for maybe 30 mins.

I have an older computer I once tried to fixup, and never could get it to go online (tried 2 modems and people here in HARDWARE tried to help me for around 6 weeks)I put it in the bedroom, figuring I could use it for writing, but then needed the monitor for something else. If I can get another monitor at some point, I can set this up for the 5 year old. She doesn't care if she's online or not.

Anyway, that did cut into my practicing DOS today. 

Questions for today... how to resize it so it fits on the screen?

How do I get OUT of a directory once I get in it? For example, I get MY DOCS (or a floppy disk) and it's in the editor, now do I get into something else? 

One thing I've noticed, my DOS opens with the prompt in WINDOWS and not C

I can change it to that.

Also, when I had the editor open it said in a few places to use CTRL and one of the F keys, and this did nothing (for me)

I probably won't do much in DOS, but I'd like to know it, just to know it. And if I ever need to. 

Like, sometimes it's hard to delete a file in WINDOWS. I've tried to delete one that has a virus, and everytime I right click on it (to delete) the virus scan background shield comes up. I think this is where finding it and deleting it in DOS would work.

I don't have to worry about viruses in DOS, right?

~ Carrie


----------



## brushmaster1 (Jun 15, 2002)

There were DOS viruses, but they are not very common any more. That is a good thing, because they were often boot sector viruses and could cause a *lot* of damage!


----------



## Lurker1 (Jan 30, 2001)

Hi Starchild

If your daughter likes playing on the computer you could try getting her an older version of KIDPIX to run. Using a mouse you can draw on the screen and fill in colors. It also come with several "stamps" which allowed you to place premade pictures (like different animals) in three different sizes anywhere on the screen. Then you could save the entire picture for later.


----------



## Cosmic (May 5, 2003)

If you really want to play around in DOS get the later versions. If you really have Version 4.0 that was maybe the most horrible version ever. Was so bad, its lifetime was extremely short. No wonder you are confused.

Go here you can download DOS 6.22 for free.

http://www.peteweb.com/oldos.php

DOS 6.22 was maybe the sweetest plain vanilla version ever. It will also have a nice text editor called EDIT.COM. Also will have QBASIC which was the free programming language. Very easy to learn.

Actually if you are going to play around off line on an older machine, I would get the Operating Shell program TREEVIEW and do it up brown. You are still operating in DOS but it is far less painful and very slick and the only real way to get around in DOS. Knowing the DOS Commands and what is going on is still very useful as the the TREEVIEW keystrokes simply are doing DOS Commands / Operation by in a far more practical manner.

Up to DOS Version 5.0 a lot of things were lacking. The size of hard drive DOS could directly format was quite puny. DOS 3.1 could only support 26 MB. DOS 6.22 can support ~600 MB hard drive. DOS 6.22 has defrag and all the goodies we lusted for in the dazes of DOS.

With pure DOS you have to basically forget about what we used to call the GUI. (Graphic User Interface). There was no resizing of a window if the program didn't do it. Everything in the GUI was under control of the program as written. Interfaces to hardware was under control of drivers and you had to have the correct driver or you were out of luck.

Initial computer setup was via the user correctly setting up the two files that controlled how the computer booted and what capabilities it would have in many areas. Those two files were called AUTOEXEC.BAT and CONFIG.SYS

Those files are in the root directory of drive C. Save them and maybe all other files in the root directory, including any drivers, if you are going to upgrade a machine to DOS 6.22. You will need to set up the machine again after loading DOS 6.22. Everything is done by the person, nothing is automatic. Depending on how complicated the old machine was, did it have a sound card, CD-ROM, etc, you need to know quite a bit about how to initially set up the machine and those two files.

Don't confuse Windows and Uncle Bill's wet dream about how the Operating System would do everything automatically. In the days of DOS very little was "automatic" and very little happened unless you could tell the machine what to do.


----------

