# Editing Autoexec.bat

Category: Geeks r Us

## Post 1 by Eleni21 (I have proven to myself and the world that I need mental help) on Saturday, 22-Aug-2009 11:39:06

I want to edit my autoexec.bat file but have a bit of a problem. I don't have MS-Edit. I did the find command, the path command and even a dir/b/p in the dos directory itself and it didn't show up. I'm running MS-DOS 6.21, so by all accounts, it should be there. Then again, this laptop was modified by Humanware and they really expect you to be using Keysoft and not DOS. Wordperfect isn't working, as we all know, and unless I can get one of these text editors that I downloaded to work, I'm in a boat without a paddle. So I'm wondering if I can edit the autoexec.bat file using Windows XP and notepad. Can dos read notepad's txt files, particularly for something as crutial as this or am I better off just using Wordpad and saving as txt MS-DOS format? Also, is there a chance that I could ruin the machine if I make a mistake so that it won't boot or start up? I'm sure I can do a del command of the corrupt file and copy the old one to the proper directory from a floppy but I just wanna make sure I don't damage it so badly that I'll screw up the os. I probably won't, but you know, first time jitters. Speaking of which, can I add any components that might be missing, such as MS-Edit or would that require a reinstall of the operating system?

## Post 2 by wildebrew (We promised the world we'd tame it, what were we hoping for?) on Sunday, 23-Aug-2009 17:54:34

First, do a dir "/a" (without the quotes) to show all files in a directory, or go into folder properties and choose "show hidden files", that way you should be able to see autoexec.bat.
Alsways make a back up of any file like this you are going to change, I use the format autoexec.bat.20090901 for a change made Sept 1st, that way you can restore a file to its previous version in case of a crash.
You should be able to read up on this file in any dos manual and what it does, you can add things like expanding the path command so the system sees more folders by default, adding an editor should not be a problem although I don't remember how to do things the dos way any more since I like the way Windows does it, but, again, there should be a manual, make small changes and restart more often, one change at a time, always back up.
cheers
-B

## Post 3 by Eleni21 (I have proven to myself and the world that I need mental help) on Monday, 24-Aug-2009 15:48:08

lol Folder properties? Dos doesn't even know the word folder and I've never seen anything about finding the properties in a directory. I'm sure the autoexec.bat file is in the dos directory itself. I've never heard of dir a. Do you mean dir/b?

## Post 4 by Eleni21 (I have proven to myself and the world that I need mental help) on Monday, 24-Aug-2009 15:49:43

Btw, no offence meant. I wasn't trying to be rude.

## Post 5 by wildebrew (We promised the world we'd tame it, what were we hoping for?) on Monday, 24-Aug-2009 16:15:03

dir /a the /a should be for showing all files, including hidden files. In Windows Explorer you go to the folder you want, then file and open properties, there you can check or uncheck whether to display all files in folder. My Autoexec is in the root directory but I just have the run of the mill dos prompt with XP and am quite happy with it.

## Post 6 by Eleni21 (I have proven to myself and the world that I need mental help) on Monday, 24-Aug-2009 17:36:29

You're using the dos prompt under Windows. I'm using MS-DOS 6.21. the only windows even on that machine is 3.1 and it's completely separate from dos. I don't even have a screnreader set up for it. At any rate, I'll definitely try that command to see what it does. I love learning new things.

## Post 7 by Eleni21 (I have proven to myself and the world that I need mental help) on Monday, 24-Aug-2009 18:24:07

Here are two specific ways to search for a file that a friend gave me. the quotes must be included.
DIR c: /S | find "autoexec.bat" | more
dIR c: /S | find "audoexec.bat"
The | more on the first one is a pipe but I don't completely understand how it works. I'll try both in a bit to compare the results they give me. This can actually be done for any file, even a text file that you've misplaced. In any case, my problem wasn't finding the file, it was editing it. I'm almost positive it's in c:dos.

## Post 8 by wildebrew (We promised the world we'd tame it, what were we hoping for?) on Monday, 24-Aug-2009 19:55:53

a pipe character is used to feed the output of one program into another, feeding the list of the dir command into find, which searches for specific words, fed into the more command which pauses after a screen full, it's a linux concept so I suppose it's been ported to this DR Dos thing.
dir /s autoexec.bat
without the quotes should yield necessary results and
dir /aH /S
will show all hiden files in your directory and all subdirectories, simply doing a /? after any dos command brings up a list of switches you can use with explanations.
You can edit autoexec.bat with any text editor, notepad, word perfect, pico, even Word, as long as you save it as a text file again (i.e. text format, not .txt), notepad is more than sufficient but things like UltraEdit help with programming since they have line numbers and it can be easier to track changes.
So far I can't say I am impressed with the ease of use of dos, you are having to learn unix and linux command shell, that being said those are very cool, the pipe character has a lot of power, if you use complex find and sort expressions you can list almost anything about any file, but it's not totally simple.

## Post 9 by Eleni21 (I have proven to myself and the world that I need mental help) on Monday, 24-Aug-2009 20:06:46

You probably don't have to use it. The regular find command should suffice. My friend just showed it to me. I'm still using the MS version of DOS on my old machine. Maybe the DR one has easier commands. I know there are several shells out there which get rid of the command line altogether but have only tried one so far, designed for the blind. I'll tell you how the new dos works when I get it set up, which will hopefully be this week. For now, though, I'm gonna experiment on this oldy so that I can feel more comfortable when making the big switch.

## Post 10 by wildebrew (We promised the world we'd tame it, what were we hoping for?) on Tuesday, 25-Aug-2009 12:07:17

There is always space for command line in any operating system. For instance, there is no good graphic way of copying al files with the word "love" ending with .doc to a different directory, graphicaly you'd have to go through bunch of directories and do copy paste, in a command line environment, be it dos, unix or what hve you, you can do this with a simple command. Also writing scripts that do certain things or automate certain tasks requires command line often, ftp transfer is a good example. I've used these methods while writing code for a big corporation and the comand line was my friend in doing these. So I think totally graphical interface, nor totally command line, is the best solution. Of course the average, and especially the casual, user of computers will not have to do these often.

## Post 11 by LeoGuardian (You mean there is something outside of this room with my computer in it?) on Wednesday, 26-Aug-2009 0:15:02

autoexec.bat is on the root (usually c:>) and the editor is edit.com froom the dos directory.
Ironically, for all your attempts to escape Windows, Edit requires use of menus alt+f, s to save for example.
There used to be editor's out there for DOS but I don't know where you'd find any of them.

## Post 12 by Eleni21 (I have proven to myself and the world that I need mental help) on Wednesday, 26-Aug-2009 11:22:35

Yeah, I really need to find one. For some reason, this laptop does not have edit.com or edit.exe. I did three types of searches for it and came up with nothing. thankfully, I will have it's equivalent in Enhanced DR-DOS on the other machine. I think the reason why this one lacks it is because it was modified by Humanware and I'm guessing they expected most people to use Keysoft not DOS. In any case, it's very annoying. I don't necessarily have a problem with menus. Granted, I certainly don't want them in everything, but in some cases, they're fine. I have a problem with graphics, inaccessibility and needlessly complicated things. Once I get everything I need for this os, I won't have nearly as many complications and slow performance as I do in Windows.

## Post 13 by b3n (I'm going for the prolific poster awards!) on Wednesday, 26-Aug-2009 11:46:54

Nothing to be afraid of; its just standard batch.
If you wanted to be really fancy about it, you could make it beep to tell you that it requires input and then use a choice program to choose what screenreader you want to load.
I really don't see why your having so many problems finding it; can't you just go to where you think it is and do something like
if exist autoexec.bat "control g"
Meaning that you would press control g with out the quoats and not actually write it; if the file exists then you'll here a beep.
As far as editing goes you can just do something like
@echo command >> autoexec.bat
And if you want to see its contents, do
type autoexec.bat
I like the way that your so sure that this new os won't have any complications when to me it sounds like one big complication itsself - did you ever work out what to do with the files you downloaded? Do you not think you should spend some time learning how to use the dos your running atm before you delve in?

## Post 14 by Eleni21 (I have proven to myself and the world that I need mental help) on Wednesday, 26-Aug-2009 15:04:52

I don't have a problem finding the autoexec.bat file. lol It's the edit.exe that doesn't exist anywhere on the hard disk. My questions had to do with loading screenreaders and backing up the file so that I can simply substitute the one for the other if I mess up. I don't wanna delete something important and then have the pc not be able to start correctly or have to start without speech. But now you've really intrigued me. I had no idea that you could have it choose which screenreader to use. I'd really love to learn how to do that, since it would solve my problems. What program do you recommend for that?

## Post 15 by Eleni21 (I have proven to myself and the world that I need mental help) on Sunday, 27-Dec-2009 3:12:54

lol It seems that I missed alot when I read this thread last. I guess being very tired and having to conscentrate on what I'm reading helped me pick up more. At any rate, I like this choice option and am guessing it's part of the text that you enter in the file. I have no clue why I thought it needed a program. I can't wait to try the /? switch. It sounds really cool. Also, I didn't realise that there are hidden files in DOS. I thought that was a Windows/Leopard thing. But now that I finally have a decent editor, I'd like to make it so that I can start it from anywhere without having to go in it's directory. I'm sure that I can find instructions on how to do that in old posts here or on the net, or I can just copy part of the file from another program that's already configured that way and substitute the name of the new program in the text. But I need to be sure I can load a backup file incase I do something stupid by mistake. So if the machine has already loaded a file called autoexec.bat and I call my old one autoexec1.bat, for example, how do I get the machine to use that one instead of the corrupt one? I know that I have to rename it and all, but will the computer start if the file has a mistake in it? I've heard of erros causing computers to lock up but I'm not sure if a little error will do that or if you have to really screw it up to get that result.