SO YOU WANT TO MAKE A BATCH FILE. By Don Penlington.

What's a Batch File? you may well ask, if you've never had anything to do with Dos. It's simply a single file that gives your computer a series of instructions to carry out several tasks. You double-click it, and it does all the rest automatically. It can save you an awful lot of work, and that's a good thing for anybody, in my book. It's a simple, powerful way to automate some time-consuming tasks.

And I've done it all for you. (Well, almost).

For starters, let's make a Batch file to regularly copy all your Navigator bookmarks. You can easily modify it for Internet Explorer Favourites folder (which is in the Windows folder).

1. Make a new text file (right click on an empty part of your desktop and select "New text file"). Or open any text editor such as Notepad.
2. Select and Copy these lines:
xcopy C:\PROGRA~1\NETSCAPE\USERS\DEFAULT\BOOKMARK.HTM a:\bkmk.htm /i
xcopy C:\PROGRA~1\NETSCAPE\COMMUNIC\PROGRAM\DEFAULTS\BOOKMARK.HTM a:\bkmk2.htm /i

Here's a typical formula for IE:
xcopy C:\WINDOWS\FAVORI~1 a:\Favorites\

3. Paste it into the text file you've just made. Save, name it Backups.bat and close.
4. Now it will have a different (Dos) icon. Voila, you have just made your first Batch file. Now to see if it works. I've assumed that your Navigator is the same as mine, and that you have followed the default installation. If that assumption is incorrect, you will just have to re-open the Batch file in Notepad, correct the pathname to your Bookmark file, and save.
5. Insert a floppy disk.
6. Run (i.e. double-click) the Batch file and watch as it transfers all your bookmarks onto the floppy. You can see it working. On completion, check the floppy and it should now contain the file "bkmk.htm". (Remember, to do this job properly, you may also need to backup the other bookmark file in the Netscape folder Communicator/Program/Defaults. Just add another line, using the same formula but different path).

Now, for the curious, I'll explain what you've done.

xcopy means "copy all the files/information within this folder, including any subfolders".
Then follows the path to the file you want to copy.
a:\ means "copy it to this destination" (in this case our "a" or floppy drive).
Then follows the new name you want to give the file on the floppy (you can call it anything you like, but you must give it the proper extension, here .htm)
The /i tells it to make what's been copied a file and not a folder.
The \ tells it to make a new folder (in the IE sample).

Run this regularly so that your bookmarks will always be reasonably up-to-date if you should ever lose them.

Ready for more?

----------------------------

Now think about what other info you would hate to lose if you ever had a total loss of your hard drive, or perhaps even if you suddenly lost one of your favorite programs entirely and all the info you have carefully stored in it. Of course, I don't mean by this your regular work, say if you are a writer. This you would backup every hour/day/month, and you will already have a normal working method for this. The Batch file is better suited to storing info that only occasionally changes. Such as copies of all your correspondence.

In my case, I like to keep all in and out recent correspondence, also copies of technical notes and tips that I keep updating and adding to regularly.

You can put all these into the same Batch file, there's no limit to the number of lines, at least not until you get to the limit of how much a floppy can hold (of course, you don't have to copy to floppy, you can put it all into another part of your hard drive if you want).

Here's a copy of how the lines in my Backup.bat file look:
xcopy C:\PROGRA~1\NETSCAPE\USERS\DEFAULT\BOOKMARK.HTM a:\bkmk.htm /i
xcopy C:\PROGRA~1\NETSCAPE\COMMUNIC\PROGRAM\DEFAULTS\BOOKMARK.HTM a:\bkmk2.htm /i
xcopy C:\EUDORA\IN.MBX a:\Eudora.txt /i
xcopy C:\EUDORA\OUT.MBX a:\Eudora.txt /i
xcopy C:\EUDORA\INBOX.MBX a:\Eudora.txt /i
xcopy C:\EUDORA\OUTBOX.MBX a:\Eudora.txt /i
xcopy C:\TEXTPAD\TECHNI~1\ a:\Technical.txt\
xcopy C:\TEXTPAD\TIPS a:\Tips.txt\
xcopy C:\WINDOWS\FAVORITES a:\Favorites\

The \ at the end of the last 3 lines instead of the /i tells it to make a separate folder for that info, so that all my tips will appear on the floppy included in a separate Text folder called Tips. Favorites bookmarks will appear in a separate folder.

If you place the batch file in the same folder as the program it is to copy, you must omit the path to that folder, as the batch file automatically looks in its own parent folder to initiate the action. In the above example, if I were to place that Backup.bat file in my C folder, I'd then omit the "C:\" at the commencement of each line. Unless you use Eudora, of course your pathnames to your In- and Out- Email boxes will be different and you will have to alter these accordingly. And remember that as this is all working in Dos (ugh) the pathnames must be in the truncated Dos format (i.e. they cannot be more than 8 characters). The formula displayed above will give you the general idea.

----------------------------

Another powerful use for a batch file is to open any number of programs with one click . Let's say I want to open Eudora, Shortkey, and Textclip with one click. By putting this batch file into my C folder, which also contains Eudora, I don't need to type in the full path (C:\Eudora) because the batch file will automatically look in the folder in which it sits. I have a shortcut to it on my desktop.

If you place the words   @echo off   in the first line, then you will not get a screen readout of the actions your batch file is taking.

This is how it looks:

@echo off
eudora\eudora.exe
progra~1\shortkey\shortkey.exe
progra~1\textclip\textclip.exe

It doesn't matter whether you use capitals or lower case, or even mix them up.

You'll need a bit of trial and error at the start if you've never seen Dos in your life before. But do give it a go. It's well worth it.

---------------------------------

Here's how to make a very simple batch file to restart Windows 95 (May work for Win 98--I haven't tested it).

1. Open Notepad and type

@EXIT

2. Select File, Save, name the file using .bat extension, such as 'restart.bat', save it anywhere you want, and close Notepad.

3. Locate the new file, right-click it, and select Create Shortcut. Drag the new shortcut out to the desktop (or wherever you want it) and rename it.

4. Right-click the shortcut, select Properties, and on the Program tab, select Close On Exit. Click the Advanced button, select MS-DOS mode, and deselect Warn Before Entering MS-DOS Mode. Click Apply and OK twice to close all open dialog boxes.

-------------------------

Everything you need to know about batch files is in the listings at http://www.freetune.com/most_popular_pages.htm