home *** CD-ROM | disk | FTP | other *** search
-
- L O G I
- 4 \ | / C
- - {*}-
- # 4LOGIC
- /
- /"'''"\ \ The Intelligent Alternative
- < 0^0 > /
- | / | \ Version 1.0
- | ≈≈≈─|──U
- \ ^ /
- ∩
-
-
- * 4DOS is copyright Rex C. Conn and J.P. Software
- * PKZIP and PKUNZIP are copyright PKWARE, Inc.
-
- ┌─────────────────────────────────────────────────────────────────────────┐
- │ T A B L E O F C O N T E N T S │
- └─────────────────────────────────────────────────────────────────────────┘
-
- 1) General Description
-
- 2) Legalities
-
- 3) Requirements
-
- 4) Installation -- REQUIRED READING !!
-
- 5) 4ud and 4cd
-
- 6) 4Copy, 4Move and 4Del
-
- 7) 4LVC - Version Control
-
- 8) Future Enhancements
-
- 9) Contacting the Author
-
- 10) APPENDIX
-
-
-
- ┌─────────────────────────────────────────────────────────────────────────┐
- │ 1 G E N E R A L D E S C R I P T I O N 1 │
- └─────────────────────────────────────────────────────────────────────────┘
-
- 4LOGIC programs are 4DOS .btm (batch mode) files for carrying out
- various tasks on your PC in a simple, intelligent manner. Since they
- are pure batch code they are completely customizable--with a little
- work on your part! They are surprisingly powerful and take full
- advantage of batch file capabilities specific to 4DOS--a command
- shell nobody using a PC should be without!
-
-
- ┌─────────────────────────────────────────────────────────────────────────┐
- │ 2 L E G A L I T I E S 2 │
- └─────────────────────────────────────────────────────────────────────────┘
-
- These programs are guaranteed only to take up space on a disk. I
- will not be held responsible for any problems arising as a result of
- using them. The programs are dedicated to the Public Domain, and are
- free for personal use, with the following restriction:
-
- ┌─────────────────────────────────────────────────────────────────────────┐
- │ I claim sole right to the name 4LOGIC and 4LVC, and retain the │
- │ exclusive right to distribution of any programs under these names. │
- │ While you are free to use the code of any or all of the programs, │
- │ and I ENCOURAGE you to do so, you are NOT allowed to distribute │
- │ your programs under either of these names. Please use another name │
- │ if you make any changes to any of the programs contained in the │
- │ 4LOGIC utilities. You are of course free to distribute the 4LOGIC │
- │ archive in an unmodified form, so long as ALL the files are │
- │ included. │
- └─────────────────────────────────────────────────────────────────────────┘
-
-
- ┌─────────────────────────────────────────────────────────────────────────┐
- │ 3 R E Q U I R E M E N T S 3 │
- └─────────────────────────────────────────────────────────────────────────┘
-
- The 4LOGIC set of programs require the following:
-
- Hardware:
- The programs should run on any machine/monitor combination
- that runs 4DOS.
- A hard-drive.
-
- Software:
- DOS Should work with any version capable of
- running 4DOS.
-
- 4DOS Version 4.0 or above.
-
-
- EDLIN The DOS line editor. Any version. See, it does
- have some uses!
-
- Pkzip & Pkunzip Version 1.10 or above (See the Appendix)
-
-
- ┌─────────────────────────────────────────────────────────────────────────┐
- │ 4 I N S T A L L A T I O N 4 │
- └─────────────────────────────────────────────────────────────────────────┘
-
- ** IMPORTANT ** Failure to follow the installation directions
- will result in erratic execution and error messages. Please read
- through the directions completely once before carrying them out.
- Follow these steps to ensure that the 4LOGIC set of programs run
- correctly.
-
-
- 1) Unzip ALL of the files in the 4LOGIC archive into 1 directory
- that is in your path. The programs will NOT run correctly if the
- directory is not in the path.
-
- Alternatively, create a directory, for example, C:\4LOGIC, and
- add it to your path statement.
-
- (For information about the "path" and creating directories see
- your DOS manual.)
-
-
- 2) 4LOGIC utilities REQUIRE you set the "4LOGIC" environment
- variable so that it points to the above directory. Add the
- environment variable to your autoexec.bat file.
-
- Example: If the directory you place the files in is C:\4LOGIC,
- then add the following command to your autoexec.bat file:
-
- set 4LOGIC=C:\4LOGIC
-
- NOTE: Type the above command from the command line for
- testing purposes so you do not have to reboot. But
- make sure you also put this command in your
- autoexec.bat as well.
- Do NOT add a trailing \, e.g, set 4LOGIC=C:\4LOGIC\
- This is INVALID syntax!
-
- 3) You need approximately 300 bytes free environment space. To
- check how much you have available, run the 4DOS "memory" command.
- Check the environment settings. If you need to increase the
- environment size, do only ONE of either two things:
-
- (a) Alter your 4DOS loading line in the config.sys file by
- adding/changing the amount in the /E: switch. Example:
-
- /E:1024
-
- will give you a 1024 byte environment.
-
- (b) Alter your 4DOS.INI file by adding/changing the "ENVIRONMENT"
- setting. Example:
-
- ENVIRONMENT = 1024
-
- will give you a 1024 byte environment.
-
-
- 4) Make sure the 4DOS KEYSTACK program is active. If it is not
- active, do the following:
-
- (a) Make sure KSTACK.COM is somewhere on your drive.
- (b) Load the program with a command in your autoexec.bat file.
- If KSTACK is in C:\4DOS, use the following command:
-
- c:\4dos\kstack
-
-
- 5) Make sure the following programs are also in a pathed
- directory:
-
- PKZIP & PKUNZIP
- EDLIN
-
- NOTE: It is not absolutely necessary to have EDLIN
- available, however, without it you will NOT be able
- to run the 4MANAGE program.
-
-
- 6) Run the 4UD program. This will create a file named 4dirs.dat
- in the root of your boot drive, usually C:\, which contains all of
- the current drive\directory information on your system.
-
- NOTE: Any time you change any of this information, for
- example, by adding or deleting drives or directories,
- run 4UD again to update the 4dirs.dat file.
-
-
- 7) Run 4CHECK to insure that everything is setup correctly. This
- will do a fairly thorough check of your system. A file will be
- generated showing the results, and will be "list"ed for browsing.
- You can then either delete or keep the file.
-
-
- 8) You are now ready to run the 4LOGIC utilities! Look through the
- rest of the documentation for descriptions of the utilities, or
- plunge right in and run them if you're adventurous. If you have any
- problems, first, read the docs. You should find an answer here
- somewhere. Second, make sure you read all of the information on
- the various entry screens, particularly in 4LVC. Third, if you
- still can't find an answer see section 9 on how to reach me and
- I'll be glad to help. Fourth, if you can't reach me, start examining
- the code. (This is how I learned batch programming myself.)
-
- ┌─────────────────────────────────────────────────────────────────────────┐
- │ 5 4 U D & 4 C D 5 │
- └─────────────────────────────────────────────────────────────────────────┘
-
- Syntax: There isn't any--just execute the program.
-
- Description:
-
- * 4UD
-
- Creates a plain ascii data file called 4dirs.dat in the root of
- your boot-drive containing all of your drive and directory
- information. Run this program whenever you change any of this
- information.
-
-
- * 4CD
-
- A simple change-directory program. This program presents the
- 4dirs.dat file in a 4DOS "select" screen. You then scroll through the
- list using the cursor keys the PgUp and PgDn keys, and the Home and
- End keys. Press ENTER on the drive\directory you highlight with the
- cursor.
-
- If you choose one of the floppy drives, insert a disk in the drive
- BEFORE you press ENTER on the drive letter. This will speed operation
- and bypass any prompts to insert a disk later in the program.
-
-
- ┌─────────────────────────────────────────────────────────────────────────┐
- │ 6 4 C O P Y, 4 M O V E & 4 D E L 6 │
- └─────────────────────────────────────────────────────────────────────────┘
-
- Syntax: There isn't any--just execute the program.
-
- Description:
-
- * All Programs
-
- All three of these programs operate in the same way. You are
- presented with the 4dirs.dat file in a 4DOS "select" screen from which
- you pick drive\directories. In the case of 4Copy and 4Move you pick
- a FROM directoy first, and a TO directory second. For the 4Del you
- pick only one directory.
-
- If you choose one of the floppy drives, insert a disk in the drive
- BEFORE you press ENTER on the drive letter. This will speed operation
- and bypass any prompts to insert a disk later in the program.
-
- Next, you get a 4DOS "select" screen of all the files in the
- directory you picked. From this screen you tag files, using the
- "+ <spacebar> -" keys. After tagging files press ENTER to execute the
- command. To pick a single file, just highlight it and press ENTER. If
- you have tagged any files the command will execute on ONLY the tagged
- files--if the file under the cursor is NOT tagged it will NOT be
- acted on.
-
- A prompt will occur before overwriting files with similar
- names. The output will also be echoed to the screen. Modify the
- appropripriate line in the programs if you want to alter this
- behavior.
-
- You will NOT be prompted before file deletions. So, use with
- caution.
-
- You may always exit from ANY of the "select" screens by pressing
- ESC.
-
- ┌─────────────────────────────────────────────────────────────────────────┐
- │ 7 4 L V C 7 │
- └─────────────────────────────────────────────────────────────────────────┘
-
- What is a Version Control System? Basically, it is a program for
- making backups of numerous versions of the same filename. So, for
- example, if you are writing a program, you will want to keep backups
- of versions of the program containing substantial changes. Why keep
- backups? If you have ever done any programming, you surely have had
- this experience:
-
- %*?#! It was working before I made those changes!!
-
- A version control system allows you to retrieve the last working
- version you backed-up and start again saving untold hours of work.
-
-
- Syntax: 4LVC [command] [filespec 1 filespec 2 filespec n]
-
- All command line parameters are optional. If no parameters are
- given, 4LVC will run in normal menu-mode.
-
- The following rules apply to command line parameters:
-
- command = A X K P or H (Add, eXtract, Kill, Pack, or Help)
-
- filespec 1 to n = filespecs for the A, X, & K commands
- P & H have no filespecs
-
- (A) Only 1 command can be processed per run of 4LVC. All other
- parameters are interpreted as "filespec" options for the
- command entered.
-
- (B) After execution of the command, 4LVC exits to the 4DOS prompt.
-
- (C) If no filepsecs are provided, user input is prompted for.
-
- (D) If the command is invalid, 4LVC starts in menu-mode.
-
- Example: 4LVC A *.btm
- This will present all files in the current directory with the .btm
- extension in a select screen, from which 4LVC will then create/update
- an archive.
-
- NOTE: 4LVC will still cycle through the screens when you
- specify command line parameters. The command line parameters simply
- automate the process in a way similar to what 4DOS keystack commands
- do for any other program.
-
-
- Description: Starting 4LVC in menu mode without any parameters
- presents an opening menu. From the Main Menu you choose the letter
- associated with the function you want to perform. You then move to an
- input screen where you enter any input needed by the procedure,
- usually a filespec of some sort. All of the input screens for each of
- the various functions contain basic help information.
-
- NOTE: You cannot ESCape from an input screen. Due to the way 4DOS
- reads user input greater than one character, you must enter at
- least 1 character and then press ENTER. This is noted on the entry
- screens, and a suggested ESCape is noted. One method is just to
- enter a ; or some other character that will not be found in any
- file in the current directory. This will produce a warning that no
- files were found matching this filespec, and you will be returned to
- the Main Menu. The other method noted is to press ENTER for a
- default pick-list, and then ESCape from there back to Main Menu.
-
- The following descriptions will take you through each of the
- choices available from the Main Menu and briefly describe how they
- operate. These descriptions will focus on explaining how the program
- works rather than on how to use them. As you will see when you begin
- using 4LVC, it is easier to just try the program than it would be
- for me to tell you how to use it.
-
- REMEMBER, this is just 4DOS batch progamming with calls to PKZip.
- It is pretty complex, and the 4DOS batch capabilities are quite
- sophisticated, but messing anything up is pretty unlikely.
-
- ┌───────────┐
- │ Archive │
- └───────────┘
-
- The Archive selection starts the process for creating a new
- archive or adding to an existing one. 4LVC uses PKZip to store the
- archived files. Consequently, you may archive virtually any type
- files, e.g., plain ascii, executables, spreadsheets.
-
- Archive File Format
- ───────────────────
- The archive name has the following format:
-
- ┌──────────> This is the usual PKZip extension
- ┌┴┐
- 4lvc?EXT.zip
- └┬─┘│└┬┘ EXT stands for the file extension of
- │ │ └──────────────> archived files. For example, if you are
- │ │ archiving myfile.pas, EXT will be PAS
- │ │
- │ │ ? is replaced by a P if the archive is
- │ └────────────────> password protected, and a - if it is
- │ not password protected.
- │
- └───────────────────> This is the same for all 4lvc archives.
-
- Examples: 4lvcPpas.zip is a password protected archive containing
- files with the PAS extension.
-
- 4lvc-btm.zip is not password protected and contains
- files with the BTM extension.
-
- All archives are kept in the same directory as the files they
- contain. If 4LVC is setup correctly you can run the program from the
- directory containing the files you wish to archive. You can also use
- the 4cd program in the Utilities Menu to change directories while in
- the 4LVC Main Menu.
- Each archive contains ONLY files with the same extension. So, if
- you have files with different extensions in the same directory, you
- will have a different archive for each particular extension. The
- filenames as they are stored in the archive have the following format:
-
- ┌────────────> This will be the number of the version
- ┌┴┐ stored. For example, version 1 will be
- myfile.### myfile.001, version 2, myfile.002, etc.
- └─┬──┘
- └──────────────────> This is the regular filename.
-
- 4LVC will store up to 1000 different versions of a file in an
- archive. When you create a new archive the first version will have the
- extension 001. Each succeeding version will be incremented by 1. At
- version 1000 the count will roll over to 000 and start incrementing
- the numbers again, deleting the oldest succeeding version each time
- you add a new version.
-
- Password Protection
- ───────────────────
- The password protection scheme is that used by PKZip for
- scrambling zipped files. The way I have implemented it is by allowing
- you to use any 10 ascii characters. This should be sufficient for
- anyone who is using 4LVC as their main VCS. If you want more
- sophisticated password protection, you need to get a better VCS.
-
- If you use passwords simply enter them at the appropriate prompt.
- For any password protected archive ALL of the files stored in that
- archive will use the same password. 4LVC is smart enough to ask for
- the password only once for any particular run. When you add files to
- an existing password protected archive you will again be prompted
- for the password. You MUST use the SAME password on each subsequent
- update of the archive.
-
- Given the file format of 4LVC archives, you can have only 1
- archive for each set of files with the same extension in any
- particular directory. You CANNOT then have a password protected
- archive as well as a non-protected archive of the same files in the
- same directory. For example, you cannot have 4lvcPasm.zip as well as
- 4lvc-asm.zip in the same directory.
-
- Be careful if you use passwords!
-
-
- Comments
- ────────
- 4LVC will prompt you for comments for each new archive, and for
- every file added to an archive. 4LVC will first search for any
- existing comment in a descript.ion file and present this as a default.
- If no descript.ion comment is found the Date/Time/Original Filename
- will instead be presented as the default. You can use the default
- comments, or type in your own. When working on a complex project, you
- should take full advantage of the comment feature.
-
- CAUTION: If you use the Date/Time/Filename default comment for any
- file, and later extract, change, and then rearchive that file, do NOT
- again accept the default comment. When extracting a file, 4LVC will
- put the comment in a descript.ion. If you re-archive the file after
- modifying it, and accept the default comment--the one found in the
- descript.ion file--this will NOT reflect the ACTUAL Date & Time of the
- modified file. Furthermore, you will now have 2 versions of the same
- file with an identical comment.
-
- The archive comment is stored in the archives.dat file kept in the
- directory specified by the 4LOGIC environment variable. This file is
- created the first time you create a 4LVC archive and is used by the
- 4MANAGE utility. The individual file comments are stored in the archive
- by PKZip.
-
-
- Determining Versions
- ────────────────────
- 4LVC determines version numberss by comparing the date and time
- of the file to be archived with the dates and times of files already
- contained in the archive. If the file to be archived is NEWER than any
- archived file, it will then be archived. If it is the SAME, or OLDER,
- it will not be archived. If you extract an older version of a file,
- and subsequently modify it, this will change the date and time, and
- you can then rearchive it.
-
- ┌──────────┐
- │ eXtract │
- └──────────┘
-
- The eXtract function will un-archive any file from a 4LVC archive.
- When you eXtract a file, the eXtracted version will be renamed to the
- original filename, and any existing version will have only its
- extension renamed. For example, suppose you eXtract myfile.007 from
- the 4lvc-btm.zip archive. The eXtracted file will be renamed myfile.btm.
- If there is an existing myfile.btm it will be renamed myfile.$$$. This
- allows you to compare the two files for any changes using your
- favorite file viewer or file-compare program.
-
- CAUTION: If you eXtract a file from an archive, and there is
- an existing file with the $$$ extension left over from a previous
- eXtraction, it will be overwritten without warning!
-
- ┌─────────────────┐
- │ Kill (delete) │
- └─────────────────┘
-
- The Kill function deletes files from an archive. So, for example,
- suppose 4lvc-btm.zip contains the following files:
-
- myfile.001
- myfile.002
- myfile.003
- myfile.004
- myfile.005
-
- You can delete any, or all, of these individual versions. If you
- delete ALL of them, you will now have an empty archive, but the
- archive name still exists. Consequently, if you archive any new *.btm
- files in the same directory, they will be added to this archive. If
- the archive is password protected, you will be prompted for the
- password. You should probably just delete the archive rather than just
- Killing all of the files inside of it.
-
- If you want to Kill files in a password protected archive you will
- be prompted for the password before Killing any files.
-
- ┌───────┐
- │ Pack │
- └───────┘
-
- If you do a lot of Killing in your archives this can be a useful
- function. The Pack function will rename all of the files in an archive
- so they are in numerically sequential order. For example if you have
- an archive with the following files:
-
- myfile.002 stuffy.003 gooofy.002
- myfile.003 stuffy.004 gooofy.004
- myfile.006 stuffy.007 gooofy.006
- myfile.011 stuffy.009 gooofy.008
-
- Pack will re-sequence the files thus:
-
- myfile.001 stuffy.001 gooofy.001
- myfile.002 stuffy.002 gooofy.002
- myfile.003 stuffy.003 gooofy.003
- myfile.004 stuffy.004 gooofy.004
-
-
- This function can take some time if the archive is large.
-
- ┌───────┐
- │ Help │
- └───────┘
-
- The help function will call up this document in the 4DOS list file
- viewer if it is in any directory in your path. If it is not, you will
- be notifed that help is not available.
-
- ┌────────────┐
- │ Utilities │
- └────────────┘
-
- All of the 4Logic utilities are available from the Utilities Menu
- on the right side of the Main Menu screen. Of particular use for 4LVC
- is the 4Manage utility. This is a stand-alone utility that can be used
- to view and delete 4LVC archives.
-
- 4Manage relies on the archives.dat file located in the directory
- specified by the 4LOGIC environment variable. The archives.dat file
- is created the first time you create a 4LVC archive. It contains the
- complete pathname of the archive as well as the archive name comment.
- A sample entry looks like this:
-
- c:\bat\4logic\test\4lvc-btm.zip
- 4Logic Alpha versions--complete
- =============================================
-
- This file is presented in a select screen when you run 4Manage.
- Highlight a filename to view or delete that file. If you delete an
- archive, 4Manage will pass the relevant information to EDLIN, the DOS
- line editor, and the archives.dat file will be updated accordingly.
- See, there are some uses for EDLIN!
-
-
- ┌─────────────────────────────────────────────────────────────────────────┐
- │ 8 F U T U R E E N H A N C E M E N T S 8 │
- └─────────────────────────────────────────────────────────────────────────┘
-
- This depends on user suggestions. Let me know what you would like
- to see added or changed.
-
-
-
- ┌─────────────────────────────────────────────────────────────────────────┐
- │ 9 C O N T A C T I N G T H E A U T H O R 9 │
- └─────────────────────────────────────────────────────────────────────────┘
-
- I can be reached in one of three ways:
-
- RIME Net Drop me a line in the 4DOS or Software conferences
-
- Midas Touch BBS A Superb BBS in Chicago run by Marc Medow. 2
- Nodes, both running Dual Standards.
- Node 1 1-312-764-0591
- Node 2 1-312-764-0761
- You can also get the latest version of the
- utilities here as well.
-
- Home Brad Owen
- 6321 N. Winthrop #510
- Chicago, IL
- 60660
-
-
-
- ┌─────────────────────────────────────────────────────────────────────────┐
- │ 10 A P P E N D I X 10 │
- └─────────────────────────────────────────────────────────────────────────┘
-
-
- PKZip 2.0?
- ──────────
-
- If or when the new ZIP arrives, and if it maintains the same
- command line syntax as the 1.93 beta version that was widely
- distributed, then 4LVC should not need any modifications.
-
- As for converting 4LVC to another archiver format, you are free to
- do it yourself--this is one modification I will NOT personally make.
- Here is why. I do not get that excited about archiver programs. PKZip
- is the defacto standard, even if it does not compress as tight or as
- fast as some other programs, and doesn't have all the bells and
- whistles other programs have. It is about as solid and bug-free a
- program as virtually ANY piece of software ever written. Just consider
- how few versions Phil Katz has had to release in order both to stay at
- the top of the market, and to fix bugs. If you are that concerned
- about the miniscule amount of disk-space you will save by switching
- archivers, by all means, fire up your text-editor, search out all the
- PKZip and PKUnzip calls, and simply replace them accordingly.
- Nuff said....
-
-
- Non-Standard 4DOS Settings
- ──────────────────────────
-
- If you are using non-standard 4DOS switches or characters, you may
- have some problems running the 4LOGIC utilities. For example, if you
- change the compound character from ^ to ; you may get some strange
- behavior. There is no possible way to work around these in a batch
- file. Here is one possible solution. Create a batch file, any name you
- like, with the following two lines:
-
- 4dos /C 4LVC
- exit
-
- This will run a plain session of 4DOS with all of the default
- settings. Next, somewhere near the top of 4LVC put in a SETDOS
- command resetting all of your changed settings back to the defaults.
- This should do the trick.
-
-
- ┌────────┐
- │ Thanks │
- └────────┘
-
- Many thanks to Ric Naff whose 4DVC inspired 4LVC. I have used much
- of the code from version 3.20 of Ric's program, which was written for
- 4DOS 3.2. In my attempts at updating this program to run under 4DOS
- 4.0 I ended up rewriting a lot of the program and renaming it
- 4LVC, as per Ric's requirements.
-
-
-
- I hope you enjoy the 4LOGIC programs, and I welcome all comments,
- suggestions, and bug reports.
-