-- EUREAP -- -- A program to transport files using floppies -- A program to back-up files using floppies -- Version 1.6 - 2006/11/14 -- -- Author: R. M. Forno -- Contact either of: -- ricardoforno@tutopia.com, ricardoforno128@hotmail.com -- -- DISCLAIMER -- This is free software. I will not be held responsible for any damage it -- may cause to you or, for that matter, to anybody else. Use it at your -- own risk. -- I have no obligation to maintain or support this program in any manner. -- However, I will accept comments, questions, requests and error reports -- through e-mail, and eventually answer them. -- -- INTRODUCTION -- Have you ever needed to transport files from a PC to another one when -- you had only floppies to that end (no CD-RW, no modem, etc.)? -- Have you ever needed to back-up files under the same conditions? -- Well, this program helps solving these problems. -- There is a bunch of programs to split files to floppy capacity (or to any -- given size), but they require much hand work, so being prone to error. -- -- With the present program, you can ease these tasks and get a better use -- of floppy capacity. -- -- The following are the advantages of EUREAP: -- -- 1) The process is completely automated. The user is prompted to enter -- yes/no type answers only when inserting floppies. -- -- 2) You can use floppies of any capacity, even with defective tracks, and -- mixed capacities (double sided / single sided, for example). However, -- 720 KB floppies use 1024-byte blocks. In this case, mixing floppies with -- different capacities could be non-optimal. -- -- 3) As the files are automatically compressed, you save floppy space, and -- so you can diminish the number of floppies needed. -- -- 4) An extremely fast knapsack algorithm is included, to optimize the -- distribution of files among floppies, and so further decreasing the -- number of floppies needed. -- -- 5) Usually, you make two or more copies of back-up files, as the -- floppies quality is nowadays very low. So, when a floppy fails, you have -- another copy to rescue you. But then, Murphy law strikes, and the second -- copy also fails. -- Assume there is a 10% probability of failure. Using 2 copies, you will -- get a mere 1% failure probability. But, if you want to be sure, you will -- probably make a third copy, lowering failure probability to 0.1%. This -- applies if you write a single, big file to each floppy. -- This program writes a number of chunks (13 by default) to each floppy. So, -- unless the floppy fails completely, the failure probability is reduced. -- In fact, assume there is a 10% probability of a floppy developing a single -- bad sector or track, and let us disregard the possibility of double, -- triple, etc. failure, only to simplify the calculation. -- This means, as assumed early, that a big file spanning all floppy tracks -- will have a 10% failure probability. -- But this program (by default) writes 13 files (chunks) to each floppy. -- So, the probability of any specific chunk getting bad is 0.1 / 13 = 0.0077, -- that is, 0.77%. -- And the probability of having *the same* chunk bad in the 2nd copy is -- 0.0077 * 0.0077 = 0.00006, that is, only 0.006%, or less than 1 case in -- 100,000. -- But a big file was split into 13 chunks, and then, the probability of -- this file getting bad is about 13 * 0.00006 = 0.00078, that is, 0.077%. -- So, compare: using floppy-sized chunks and 2 copies, you get a 1% -- probability of getting a bad 1,457,664-byte file. -- And using the present technique, you have a 0.077% failure probability -- under the same conditions: a 13-fold decrease, as you could have guessed -- at first. -- This calculation has been simplified to some extent. -- Please note that this decrease in failure probability is attained only -- if you make 2 or more copies of the files. -- -- 6) The program checks floppies to avoid overwriting them in case you -- inadverentently left in the drive the last one written by the program, or -- even if you try writing to a floppy that was previously used in the same -- run. -- -- 7) Source code is provided. This code is free for everybody. You can -- modify it to your taste, or use any part of it as you like. You do not -- need to do so, but I will be glad if you mention me when you use part or -- all of the code. Especially interesting is the extremely fast knapsack -- algorithm included, that may be used to fill to the brim floppies, CDs, -- etc., or even trucks. -- -- REQUIREMENTS -- HARDWARE: PC 386 and up. Hard disk. 3 1/2" (or 5 1/4") floppy drive. -- RAM depending on data (8 MB will usually suffice). Hard disk space -- depending on data (100 MB free space will suffice in most cases). -- -- SOFTWARE: MSDOS and compatibles; or Windows 95, 98 FE, 98 SE, ME, 2000, -- NT, XP; or Linux; or Free BSD. Euphoria Interpreter / Compiler. PKZIP / -- PKUNZIP (if using long names, a version supporting them). -- -- FILES CONTAINED IN THE PACKAGE -- The archive EUREAP.ZIP contains: -- -- 1) This README.TXT file, or as part of the source code. -- -- 2) Source code for the program, named EUREAP.EX. -- -- 3) REAP.BAT, to ease use. -- -- INSTALLATION INSTRUCTIONS -- 1) Unzip EUREAP.ZIP using PKUNZIP, WINZIP, WINRAR, or any other suitable -- software (as you are reading this, you probably already did so). -- -- 2) Download the Euphoria interpreter from www.RapidEuphoria.com. This is -- a free download. -- -- 3) Install Euphoria as instructed in the Euphoria distribution. -- -- 4) If you do not have one, download a PKZIP version. If you are using -- long file names, this version should support them. If it does not, you -- will be restricted to the 8.3 DOS standard file names. If you use -- stand-alone DOS, or boot W9X in DOS mode, you will have to modify the -- source code to avoid problems originated by the attempt to get long names -- when they are not supported. -- In case you wish to use another archive compressor / decompressor, you -- will have to modify the source code. The compressor / decompressor should -- support being called from the command line. -- -- 5) Create a folder named as you wish. We will call this folder -- . You may use an existing, non-empty folder, but this -- is not recommended, as the program will delete some files / folders -- having specific names. -- -- 6) Copy EUREAP.EX to this folder. Additionally, you might want to copy -- REAP.BAT -- -- 7) Copy PKUNZIP.EXE and PKZIP.EXE to the same folder. This is not needed -- if you can access them from the DOS PATH. -- -- USAGE INSTRUCTIONS -- 1) This program may be run directly from Windows, but it is preferable to -- run it from a DOS window. While it is prepared to run under Linux / -- Free BSD, I did not yet test this capability. Please contact me if you -- have any difficulty in that respect. -- -- 2) Move (or better copy) the files and folders you want to transport or -- back-up to a folder named as you wish. -- -- 3) Get hold of a sufficient number of formatted floppies. These floppies -- should be, in principle, good quality, but the program supports floppies -- with defective sectors and of different capacity, mixed as you wish. -- In case of floppy failure, the program may be restarted at the previous -- point. -- -- 4) Run EUREAP.EX using the Euphoria interpreter. If correctly installed, -- the EUPHORIA interpreter should be in the PATH. Under a DOS shell in -- Windows, type: -- EX EUREAP (plus an optional list of parameters). -- You can also type: EXW EUREAP.EX to run the program under a Windows -- environment. -- To run it directly from Windows, associate .EX files with EX.EXE. -- You can run REAP.BAT instead. Modify it according to the parameters you -- need. -- -- 5) Follow the on-screen instructions to create files on floppies. -- -- 6) To restore the floppies contents, follow the detailed instructions -- below. -- -- DETAILED INSTRUCTIONS -- -- FLOPPY CHARACTERISTICS -- A double-sided, high density 3 1/2" floppy has normally capacity for -- 1,457,664 bytes, distributed among a number of files and folders. -- Other types of floppies may have different characteristics. -- Floppies with defective tracks have a smaller capacity. -- -- A floppy file can consist of any number of bytes, from 0 to 1,457,664. -- However, as it is formed by 512-byte blocks, the real space occupied is -- a multiple of 512. So, the directory listing may inform that file X has -- 13,577 bytes, but the occupied space is actually 13,824 bytes (the next -- multiple of 512); file X occupies 26 full blocks and part of a 27th block. -- -- In addition, if files are in the root folder (A:\), the maximum number -- of them is 224. This maximum can be reached only if file names adhere to -- the 8.3 DOS standard, that is, 1-8 characters for the name, an optional -- dot, and 0-3 characters for the extension. -- -- In case some file name does not adhere to this standard, the maximum -- number of files is less than 224, the exact limit being a function of the -- lengths of the names. -- -- This maximum number of files does not apply if the files are not in the -- root folder. -- -- The present program does not use floppy subfolders, so this maximum applies. -- -- Floppies for this program should be formatted, but not necessarily -- empty. All files and folders in them will be erased, unless you select -- a (not recommended) option to keep these old files and folders. -- -- Of course, you should not write-protect the floppies. -- -- -- COMMAND LINE PARAMETERS -- Command line syntax: -- EX EUREAP [] [>parameter 2>] ... [] -- [] means parameters are optional. All parameters are optional for this -- program. -- All letters may be upper or lower case without distinction. -- Parameters are separated by one or more spaces or tabs. -- No whitespace is allowed between the parameter keywor and the equal sign -- that follows it in most cases, and between the equal sign and the parameter -- value. -- -- Most parameters for this program may be omitted. -- -- BLOCK= where is a positive integer. -- The standard block size for double-sided, high density 3 1/2" floppies -- is 512. Usually you do not want to modify it, but if you use some other -- floppy type, you will get better results using the block or cluster -- size that corresponds to this type. For example, for 3 1/2" floppies -- formatted to 720 KB, BLOCK=1024 will provide better results. In this case, -- you should also modify the CHUNK parameter (see below). -- Default is 512. -- -- TIME=