freePCtech (click here to return to the first page) Search the
    siteHelp on using this siteHome
Forums
Features
Articles
Guides/FAQs
Goodies
Downloads
About
Contact

    Articles / Reviews


Batch Backup File

by Don Penlington
1999/10/26

Batch Backup File

by Don Penlington

So you want to make a Batch Backup File.
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:

  1. Make a new text file (right click on an empty part of your desktop and select "New text file")
  2. Name it Backups.txt
  3. 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
  4. Paste it into the text file you've just made. Save and close.
  5. Rename the file Backups.bat
  6. 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 open the Batch file in a text editor (Notepad?), correct the pathname to your Bookmark file, and save.
  7. Shove in a blank floppy disk.
  8. 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 name you want to give it 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.

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

Ready for more? OK.

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 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).

So 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\

The \ at the end of the last 2 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.

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). But the formula displayed above will give you the general idea.

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

 

Articles / Reviews

Hardware
  Articles
  Reviews
Software
  Articles
  Reviews
Diagnostics
  Articles
  Reviews
Networking
  Articles
  Reviews
 
Search
 

 

Free PC Tech

Copyright The NOSPIN Group, Inc. 1991-2006.  All rights reserved.