20 January 2003. Daniel Hellerstein (danielh@crosslink.net) DIRtools ver 1.16d: Utilities for copying, deleting, and viewing directories DELDIR.CMD -- Delete a directory tree COPYDIR.CMD -- Copy a directory tree DIRTREE.CMD -- Display files in a directory tree -------------------------------------------- Requirements: COPYDIR requires the REXXLIB library. A copy of REXXLIB.DLL is included. COPYDIR also uses ZIP.EXE and FILEREXX.DLL for a few (less frequently used_ options). ZIP.EXE can be obtained from ftp://ftp.freesoftware.com/pub/infozip/OS2/. FILEREXX is freeware, written by Jeff Glatt (thanks, Jeff, wherever you are!) Further details concerning these requirements are listed in the disclaimer at the bottom of this document. -------------------------------------------- Installation: Just copy the .CMD files to a directory in your path (say, C:\OS2\APPS); and copy FILEREXX.DLL and REXXLIB.DLL to a directory in your libpath (say, C:\OS2\DLL). If you don't have ZIP.EXE, obtain it and install it in your path. Note that these utilities are designed to be run from an OS/2 command prompt. -------------------------------------------- Short Descriptions: For details on the usage and options of these tools, please look at the various .CMD files. You can get a short synopsis of these utilities by entering a ? as an argument (for example: COPYDIR ?). For COPYDIR and DIRTREE, you can get a more extensive description by entering ?? (for example, COPYDIR ??). *** DELDIR DELDIR is used to delete a directory tree. It will also delete selected files in & under a directory. Examples: D:>deldir e:\oldjunk D:>deldir f:\archive\mystuff "*.bak" -q *** DIRTREE: DIRTREE is used to sort and display all files in a single, or in multiple, directory trees. It is a useful tool for finding multiple occurence of a given file (or files). Sorting can be by name, extension, size, and/or date (you can sort by multiple criteria); with display in either ascending or descending order. Other features include file exclusion criteria, saving results in HTML format with links to found files, and creation of directory summaries. Example. This will sort and display all *.DOC files in or under e:\manyfile\set1, with files sorted by filename, and by date within a file name. D:>dirtree e:\manyfile\set1\*.DOC -Ond Notes: * DIRTREE can use, but does not require, REXXLIB. However, when examining many files (several thousand), the ability to use REXXLIB procedures can substantially improve progam speed. * DIRTREE.CMD contains several directory oriented procedures that REXX programmers might find useful. * DIRTREE can also be used to find duplicate files, with sets of duplicate files grouped together (duplicate file find can be conducted with, or without, CRC checks). *** COPYDIR: COPYDIR will copy the contents of a directory tree to a new location. Among it's several features are: i) If an error occurs, say due to an uncopyable file, COPYDIR will note the error, and go to the next file (it is "robust" against failures) ii) If copying from HPFS to FAT directories, COPYDIR will convert longnames to 8.3 names. iii) COPYDIR will not overwrite newer files in the destination directories. Or, you can specify a complex set of replacement rules (such as, "only replace if source file is older and bigger"). iv) Instead of copying files from a source to a destination directory, COPYDIR can create a "destination directory specific .ZIP file", and ZIP the files into it. This retains the original structure of the source directory, with the files from these source directories copied to seperate .ZIP files in the destination directories. v) You can exclude, or selectively include, files & directories vi) You can copy files currently being shared (that a normal COPY or XCOPY command will fail on). Example: D:>copydir e:\oldspot f:\archive\oldspot -8 -Rnb For details on COPYDIR, run COPYDIR with an argument of ??. -------------------------------------------- Disclaimer: Permission to use these utility programs for any purpose is hereby granted without fee, provided that the author's name not be used in advertising or publicity pertaining to distribution of the software without specific written prior permision. This includes the right to subset and reuse the code, with proper attribution. This may not apply to the DELDIR.CMD program, since it is based on earlier work; see DELDIR.CMD for details on authorship. Originally, REXXLIB.DLL was NOT freeware; though it appears that it has now been released to the public domain. Regardless, it may freely be used in conjunction with COPYDIR. For details on REXXLIB, check http://www.quercus-sys.com. Lastly, the author of these utilities (and any potenially affiliated institutions), disclaim any and all liability for damages due to the use, misuse, or failure of these utilities or of subsets of these utilities. Thanks to: Buddy Donnelly and Al Savage for suggestions and beta testing.