═══ 1. overview ═══ CLEAR backup and clean up Version 1.1, March 2000 A german version is also available * CLEAR creates file lists of files to be saved. These file lists are the input for other programs, especially Info-Zip. CLEAR also creates a CMD-file containing the filenames to delete. You can edit the Clearfile (an ASCII-file, see SAMPLE.CLR). This text file controls the operation of CLEAR and is almost self-explanatory. Here you can also enter the filenames you want to delete after a fixed period (e.g. 14 days), if they are not located in the specified directories. If you want to make a floppy backup, you can start a WPS program object. This will activate CLEAR and the Info-Zip programs ZIP and ZIPSPLIT. The result will be a handful ZIP files with a size of 1.45 MB, which can easy be copied to 3.5" floppies. In version 1.1, I have fixed a bug concerning Warp 4 Fixpack 11: some directories were not reachable anymore; then I have improved the delete functionality: not only files, also the corresponding WPS objects are deleted. This prevents the OS/2 INI files from growing. The intention of CLEAR With CLEAR you can dramatically reduce the quantity of the data you have to backup. Only the really important files are saved. For example, files with the extension BAK or SIK, or files generated automatically, e.g. RES and OBJ while programming, need not be backed up. Only the files with a date later than the last backup have to be saved. I use CLEAR every week and get only one ZIP file with a size of about 200 kB. I program, I use CorelDraw and I do word processing. If you work on two computers at two different places, you can use CLEAR to update the files of the two computers. So you can create a zipfile with all important data you have created on the Computer B since you have left Computer A to update the files at Computer A. With CLEAR you can work well without a streamer, if you don't want to backup very large quantities of data (a lot of faxes, big high resolution graphics, sound- and video-files and so on). If you have a streamer and a streamer software importing file lists, CLEAR will work fine together with your streamer, of course. ═══ 2. Required files, Installation ═══ The following files should be shipped with this documentation: clear.exe main program clear.inf this docu sample.clr ASCII file with user settings ("Clearfile") for CLEAR inst_clr.cmd creates WPS objects clr_rexx.cmd REXX programm used by program object OneDrvZp.cmd used by REXX program destroy.cmd "destroy FILENAME" deletes a file and its corresponding WPS object broom.ico WPS icons, used by inst_clr broom1.ico " broom2.ico " broomInf.ico " FILE_ID.DIZ ASCII file, short program description You can use CLEAR in two different ways: either you use CLEAR.EXE alone; the file-lists created by CLEAR.EXE can then be used as input for e.g. streamer software. Or you want to use CLEAR together with Info-Zip. In this case, you can use a new program object executing CMD-files. subchapters: Install CLEAR for use together with Info-Zip Install CLEAR for use alone (without Info-Zip) next chapter: Editing the Clear-textfile ═══ 2.1. Install CLEAR for use together with Info-Zip ═══ Place all the files into a new directory of your choice, but locate it on a partition where you have enough room: The zipped backup files are placed in a subdirectory of this directory; from there you can copy them to floppies. Make this new directory, where the files are located, current and start INST_CLR. Or simply doubleclick onto the inst_clr WPS icon. This REXX program creates a program object Clear, a folder ClearDat, a shadow of the folder ClearDat on the desktop and a program object for the INF file. The REXX program queries a name for your Clearfile containing your backup and clean up settings. The new Clearfile is placed in the ClearDat folder and initialized with the content of the SAMPLE.CLR file. Then you will be asked which drive letters you want to backup / clean up. A sole operating system partition or a partition with big software applications makes no sense to backup because you can faster reinstall the software from CD than making a restore from floppies. If you want to backup / clean up a second drive letter with completely different filenames to include / exclude, you should better use a second Clearfile with different settings. After installing Clear, you can simply copy the program object Clear and change the name of the Clearfile and the drive letter in the settings notebook, page General, entryfield Parameter. The CMD file used by the program object requires Info-Zip. If you own Info-Zip, make sure that the files ZIP.EXE, UNZIP.EXE and ZIPSPLIT.EXE are located in a directory of your PATH statement. Then you can skip the next subchapter. subchapters: get and install Info-Zip Warning: Bug in Info-Zip Deinstallation next chapter: Install CLEAR for use alone (without Info-Zip) ═══ 2.1.1. get and install Info-Zip ═══ Info-Zip is a freeware packer of the authors Mark Adler, Richard B. Wales, Jeanloup Gailly, Kai Uwe Rommel, Igor Mandrichenko and John Bush. I have made a link from the Clear page of my Homepage http://www.vr-transport.de/Martin Make sure that the files ZIP.EXE, UNZIP.EXE and ZIPSPLIT.EXE are located in a directory of your PATH statement. If you don't know the current contents of your PATH statement: You can simply enter PATH in the OS/2 command line: [C:\] PATH Can you handle ZIP files directly from the WPS ? If no, try my "Simple Zipshell". ═══ 2.1.2. Warning: Bug in Info-Zip ═══ The old Zip Version "Zip 2.0.1 (Sept 18th 1993)" has got a bug while packing files with spaces in the filename! In newer versions, the bug is fixed. If you have got the old ZIP version, you can test whether you are affected by this bug or not: [C:\] dir "* *" /s /f This OS/2 command lists all files where the backup does not work. CLEAR writes filenames containing spaces in quotation marks. With later Info-Zip versions, there are no problems. ═══ 2.1.3. Deinstallation ═══ To deinstall CLEAR simply delete the program object, the ClearDat folder and its shadow using the WPS. Because other entries in the OS2*.INI files are not made, the deinstallation is complete with deleting the WPS objects. In principle, you can create or change the WPS objects by yourself. ═══ 2.2. Install CLEAR for use alone (without Info-Zip) ═══ You need only a few files: clear.exe main program clear.inf this docu sample.clr ASCII file with user settings ("Clearfile") for CLEAR Place these files into a directory of your choice. ═══ 3. Editing the Clear-textfile ═══ Before starting CLEAR you have to modify the Clear-textfile (Clearfile) with an ASCII editor (e.g. the OS/2 system editor e). If you have installed CLEAR for use with Info-Zip, your Clearfile should be placed in the ClearDat folder. Lines beginning with *** must not be changed. Between these lines you can change the entries. Below ***searching the following drive:directories including subdirs: you can place a number of drive:directory entries. It's often adequate only to enter C: The following is also a correct input: C:\FOLDER_A C:\FOLDER_B D: E: On drive C, a backup and cleaning up of FOLDER_A and FOLDER_B with all subdirs will be made, also the whole drives D and E. For every drive letter, CLEAR creates a backup file list. The remainder of the Clearfile explains itself. Note:  If you add /s behind the directory name, subdirs will be included  The usage of wildcards * and ? only works with filenames, not with directory names  There's no size limit for the directory and file lists. If you backup / clean up more than one drive letters, you have to specify the drive letter in the following directory lists: C:\DESKTOP /s D:\SOFTWARE /s If you don't specify a drive letter, the first drive in the "drive:directories" list is choosen. subchapters: Recommendations for excluding dir- and filenames next chapter: Starting CLEAR ═══ 3.1. Recommendations for excluding dir- and filenames ═══ When you specify the excluded directories, note that big software programs are faster reinstalled from CD than from floppies. So a backup with floppies is not necessary. Remember keeping an unpacked version of the file UNZIP.EXE on floppy to restore your zip files if you have to. Programmers only have to save source files and not files the compiler generates, because they can be reproduced every time - for example OBJ- and RES-files, and there are other files you can delete, too. With my Borland C++ Compiler I don't backup, but rather clean up the following files: *.OBJ *.RES *.CSM *.RWP *.~* *.IPF *.INF *.HLP *.BMP work.wrk I create Helpfiles with my MAKEIPF tool, so I can clean up IPF files. BMP files are also temporary because I save graphics as GIF files and reproduce BMP files by using the freeware tool GIF2BMP * . Fax files require a lot of disk space. If I receive a fax, I decide whether I need it in the future or not. If it can be deleted in the future, I use a name filename_temp.fax In the excluding backup and including clean up filename list I add: *temp.fax All files I do only need for some minutes or some days, I choose a filename beginning with "TEMP". In the two filename lists I place the filename: TEMP* ═══ 4. Starting CLEAR ═══ The usage of CLEAR depends on whether you want to use it together with Info-Zip or seperately, for example to get file lists for use with streamer software. subchapters: Using CLEAR with Info-Zip Using CLEAR seperately to get file lists next chapter: Restoring files from zip files ═══ 4.1. Using CLEAR with Info-Zip ═══ subchapters: How it works fixed day file lists result next chapter: Using CLEAR seperately to get file lists ═══ 4.1.1. How it works ═══ After running the installation program you have got a program object Clear using CLEAR together with Info-Zip. This program object points to the REXX program clr_rexx.CMD. In this REXX program CLEAR is running once you have input a fixed day. After creating file lists these are shown in several e editors. After reading, modifying and saving the lists, ZIP is started. After that, ZIPSPLIT divides the big zip-file into several parts, each with a size of 1.45 MB - the right size for copying it to 3.5" floppies. But note: ZIPSPLIT does not divide a big file into two zipfiles. So you can't backup bigger files than 1.45 MB (packed) to floppy. In this case, interrupt the batch file when querying "Press Ctrl-C if..." and the big zip file won't be divided or deleted. The REXX program activates several batchfiles "OneDrvZp.cmd" simultaneously, each for one drive to be zipped. So the REXX program does something like multithreading:. After leaving the editor with the backup file list, ZIP already works while you can examine the delete file list in the editor. ═══ 4.1.2. fixed day ═══ After double clicking onto the Clear program object, you have to enter a fixed day in an entryfield, titled "from e.g: 5/31/95". Only files with a date equal or later than the fixed day are listed in the backup file list. You have to enter the date in the MM/DD/YY format. Instead of 95, you can also type 1995. You always have to enter a fixed day. If you don't want to have a fixed day, enter 1/1/80 or simply press Return. ═══ 4.1.3. file lists ═══ CLEAR creates two text files: SC0912.TXT DEL_0912.CMD The code "0912" means "September 12", so you can see the date of the file list in the filename. The code has got always four digits and is created from the actual system date. If you have specified more than one drive in the Clearfile, for example * * * searching the following drive : directories including subdirs : C : D : \ PATH1 D : \ PATH2 every drive will get its own file list: * SC1209.TXT SD1209.TXT The content of the file SC0912.TXT is a file list of all filenames to be Saved from drive C. The file DEL_0912.CMD is also created. It's a batchfile with all commands for deleting files throughout all drives. When using the Clear program object, both files are automatically shown in the system editor. Remember to save the CMD file before exiting the editor!!! If you are not satisfied with the files CLEAR has choosen for deleting and saving, you should edit the Clearfile straight away. Then, the next time you have to make less changes in the file lists. ═══ 4.1.4. result ═══ Finally, the packed data is placed in the ClearDat folder in separate files, each with a size for copying to empty 3 1/2 inch floppies. SC0912_1.ZIP SC0912_2.ZIP SC0912_3.ZIP and so on. You can copy these files to empty floppy disks by using the WPS or the command line. (The command line is faster.) After that, you can delete the ZIP files in the ClearDat folder. The file lists SC0912.TXT DEL_0912.CMD are also located in the folder ClearDat. I recommend not to delete the backup file lists so you have got a documentation of the backup. The delete file list DEL_0912.CMD can be activated from the WPS by double clicking or from the command line. Then it can be deleted, too. ═══ 4.2. Using CLEAR seperately to get file lists ═══ You can start CLEAR from the command line: CLEAR clearfilename date clearfilename is the name of the ASCII Clearfile, for example MY.CLR. date is the fixed day. All files older than this date won't be listed in the backup file list, all files equal or later will be listed. Example: [C:\CLEARDAT] clear my.clr 7/31/94 After pushing enter, CLEAR creates file lists for backup and clean up. The clean up file is a batchfile with the extension CMD. Before executing the delete batchfile, take a look at it with an editor. Remember to save the file in the editor before executing it!!! You can also enter an optional parameter: a string with four digits. This will get part of the filenames of the file lists. Without entering such a parameter, CLEAR generates this string from the actual system date: for example 0912 for September 12. ═══ 5. Restoring files from zip files ═══ If the harddisk was destroyed and you have to restore your whole data, you have to unzip the files in the right order: You have to begin with the floppies created with the fixed day 1/1/80. The last zipfile has to be the newest one. [C:\] unzip -o a:SC0912_1.zip The parameter -o rewrites files with the same name and location without warning, like COPY. The diretories are automatically restored. You have to keep EXACTLY the right order while restoring the zipfiles! If you do not so, a newer file will be "updated" by an older version of the file without warning! ═══ 6. hints ═══ subchapters: desktop documentation of the backup creating generations piping (hackers only) next chapter: About CLEAR ═══ 6.1. desktop ═══ You should not backup the desktop \DESKTOP with CLEAR. Save your \DESKTOP directory together with the \OS2\OS2*.INI files with special programs for that purpose. ═══ 6.2. documentation of the backup ═══ Don't remove the backup file lists S*.TXT from your harddisk. If you have to find an old version of a file, you can locate the file easily without handling several floppies. ═══ 6.3. creating generations ═══ Using CLEAR the first time, you will choose a fixed day 1/1/80. So no file will be excluded because of its date. When using CLEAR the second or third time (and so on), you only have to save the files later than the date of the last backup. If you have created 20 or 30 of such small zipfiles, you should begin with a new generation by choosing a fixed day 1/1/80 again. Remember, if your hard disk is going to the happy storing-grounds, you have to restore all 30 files in the correct order - more would be tedious. Beginning a new generation is also useful because this has got the effect of storing your data twice. If a single floppy disk does not work anymore, you can reach the data (an older state) nevertheless. If you create a new child (a new generation), you can use the disks of the great-grandfather. So you have always got 3 floppy packs: child, father, grandfather. But it can be useful not to reuse old floppy packs. So you can restore for example a source code of a program three years ago. ═══ 6.4. piping (hackers only) ═══ CLEAR has got another parameter: -@ This parameter passes the backup file lists to standard-output, in addition to the files. Simultaneously, output other than file names (program version, error messages and so on) is omitted. ═══ 7. About CLEAR ═══ subchapters: Freeware - disclaimer bugs and improvements Contacting the author other programs About this hypertext ═══ 7.1. Freeware - disclaimer ═══ I have decided to offer this program as freeware, because registration and selling for a few dollars is too complicated. I you use and like Clear, please send me an E-Mail. A donation can also be registering one of my Shareware programs. CLEAR is provided as is and comes with no warranty of any kind, either expressed or implied. In no event will the author be liable for any damages resulting from the use of this software. ═══ 7.2. bugs and improvements ═══ There was a german version 0.91 for some months, so I assume there are (nearly) no bugs. If you find some, please inform me. Known bugs in 1.0: none before Warp 4 Fixpack 11 (or perhaps earlier, I don't know) see Info-Zip bug (old Zip Version 2.0.1 from 1993) Improvements in 1.1  works also with Warp 4 Fixpack 11; for Clear 1.0, not all directories were reachable anymaore.  improving the delete functionality: not only files, also the corresponding WPS objects are deleted. This prevents the OS/2 INI files from growing. ═══ 7.3. Contacting the author ═══ Press image for information about my person. E-Mail address: Martin@vr-transport.de Homepage: http://www.vr-transport.de/Martin ═══ 7.4. other programs ═══ I've also written other Freeware- and Shareware programs. Visit my Homepage http://www.vr-transport.de/Martin both Win95/NT and OS/2; Linux versions for some programs are planned. WSedit: Editor compatible to Wordstar: reading and writing Wordstar (DOS) files, ASCII IBM and ISO codepage. Supports Wordstar Ctrl key commands and CUA commands. Syntax-highlightning, Translation, spell checking, function key macro recorder and a lot of other features. WSedit handles very large ASCII files. Freeware. pmCalc: Pocket calculator with scientific and programmer functions, calculating with variables, Regression, easy transfer to/from the clipboard, detailed error messages, online help. pmCalc recalculates the result after every keystroke. You enter a formula like you would in a programming language. Shareware 25$. HyperMake: Creates HTML files, Winhelp MS HTML-Help and OS/2 Help from a more simple and intelligent ASCII format. Automatic linking, window arrangement, helptables, footnotes, tables and other features. Shareware if source file > 20 kB. See hypertext TinyAlarm: A simple countdown with a slider from 1 to 60, an alarm by entering alarm time and a chime. System shutdown. Freeware. cd-shortcut: instead of whole directory names you enter only substrings. Searching through several drives and opening OS/2 WPS folders. Freeware. Simple Zipshell: Packing and unpacking ZIP files by using the graphical desktop. Freeware. ═══ 7.5. About this hypertext ═══ I have created this hypertext by using my HyperMake hypertext tool. It creates Winhelp, OS/2 Help and HTML files from one simple and intelligent ASCII format. If a phrase is marked with an "index char", it is placed in the index and all other occurrences in the hypertext will get a link automatically. HyperMake also creates Helptables, and for line drawing, footnotes, window arrangement (and so on) there are short commands. The links at the end of some windows "subchapters... next chapter..." are created automatically. HyperMake is shareware for source files > 20 kB. (this one has got 13 kB). Visit my homepage for more information about HyperMake. http://www.vr-transport.de/Martin end of hypertext ═══ ═══ Beschaffen Sie sich bitte clear11g.zip. Sogar die EXE-Dateien unterscheiden sich. Besuchen Sie meine Homepage http://www.vr-transport.de/Martin ═══ ═══ Graham Welland, 1989 ═══ ═══ this is because ZIP.EXE is not adding the drive letter to the directory/filename. ═══ ═══ Martin Vieregg, 34. I've studied economics. My main job is working in my own consulting company. Our special subject is public transport, especially railways. The title of my doctoral (PhD) thesis was "increasing efficiency of railway long-distance passenger traffic" (only german language). Visit http://www.vr-transport.de