home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
- WALKDIR Copyright 1992 David Lee All Rights Reserved
-
-
- DISCLAIMER OF WARRANTY
-
- SOFTWARE AND MANUAL ARE SOLD "AS IS" AND WITHOUT WARRANTIES AS TO
- PERFORMANCE OF MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER EXPRESSED OR
- IMPLIED. BECAUSE OF THE VARIOUS HARDWARE AND SOFTWARE ENVIRONMENTS INTO
- WHICH THIS PROGRAM MAY BE PUT, NO WARRANTY OF FITNESS FOR A PARTICULAR
- PURPOSE IS OFFERED. GOOD DATA PROCESSING PROCEDURE DICTATES THAT ANY
- PROGRAM BE THOROUGHLY TESTED WITH NON-CRITICAL DATA BEFORE RELYING ON IT.
- THE USER MUST ASSUME THE ENTIRE RISK OF USING THE PROGRAM. ANY LIABILITY
- OF THE SELLER WILL BE LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OR REFUND
- OF PURCHASE PRICE.
-
- -------------+
- Introduction |
- -------------+
- WALKDIR is a disk utility that allows you to "walk" through a disk's
- directory structure. As it moves, it stops to execute a user supplied
- command (DOS command, program, or batch file) against each directory it
- passes through.
-
- ----------+
- File List |
- ----------+
- Name Size Date Time Description
- ------------ ------ ------- ----- -----------------------------
- WALKDIR.COM 13,254 6-15-92 1:00a The executable WALKDIR
- program.
- WALKDIR.DOC 13,952 6-15-92 1:00a This file.
- REGISTER.DOC 3,316 6-15-92 1:00a Registration instructions and
- form.
-
- If you did not receive all the files listed above, then you have received
- an altered version of my original upload. Please discard the files you did
- receive and try looking for this program on another BBS or service. If any
- of the file sizes, dates, or times have been changed then someone has
- tampered with my original upload. I'd recommend against trying to run the
- program, as it may contain a virus or have been altered to do something
- other than what I wrote it to do. Again I'd recommend disposing of these
- files and trying again from another source. Better safe than sorry.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1
-
-
-
-
- WALKDIR Copyright 1992 David Lee All Rights Reserved
-
-
- ----------------+
- Running WALKDIR |
- ----------------+
- Syntax: WALKDIR "Command"
- Where "Command" is any DOS command, executable program, or
- batch file. The command must be in enclosed in quotes.
-
- Usage: You can run WALKDIR from any directory or subdirectory.
- However, WALKDIR will only process the directories
- subordinate to the directory it's started in. Assume the
- directory structure in Figure 1. If we start WALKDIR from
- the DATA directory, it will process both DEPARTMENT
- directories and all of the directories subordinate to each.
- However, if we start WALKDIR from the DEPARTMENT #1
- directory, it will only process the directories subordinate
- to that directory. It will not process the DEPARTMENT #2
- directory or any of its subdirectories. If we start WALKDIR
- from the USER #4 directory, it will only process the two
- subdirectories belonging to that directory.
-
-
-
- DATA
- │
- ├──── DEPARTMENT #1
- │ │
- │ ├──── USER #1
- │ │ │
- │ │ ├──── WP DIRECTORY
- │ │ └──── DB DIRECTORY
- │ └──── USER #2
- │ │
- │ ├──── WP DIRECTORY
- │ └──── DB DIRECTORY
- │
- ├──── DEPARTMENT #2
- │ │
- │ ├──── USER #3
- │ │ │
- │ │ ├──── WP DIRECTORY
- │ │ └──── DB DIRECTORY
- │ └──── USER #4
- │ │
- │ ├──── WP DIRECTORY
- │ └──── DB DIRECTORY
- │
-
- Figure 1
-
-
-
-
-
-
-
-
- 2
-
-
-
-
- WALKDIR Copyright 1992 David Lee All Rights Reserved
-
-
- Output: WALKDIR produces two files in the directory it is started
- from. The first, WALKDIR.ERR, records any error messages
- produced by DOS during the current run. The second,
- WALKDIR.MSG, captures any other non-error messages DOS
- issues during the current run.
-
- WALKDIR also displays a status screen (Figure 2) while it's
- running. The display shows WALKDIR's progress and reminds
- you of the command WALKDIR is running against each
- directory.
-
-
-
- ┌─ Walk Directory Tree (v1.0) - Copyright (c) 1992 David Lee ─┐
- │ C:\TC\BIN │
- │ C:\TC\INC │
- │ C:\TC\INC\SYS │
- │ C:\TC\LIB │
- │ C:\TC\BGI │
- │ C:\TC\CLASSLIB │
- │ C:\TC\CLASSLIB\EXAMPLES │
- │ C:\TC\CLASSLIB\INCLUDE │
- │ C:\TC\CLASSLIB\LIB │
- │ C:\TC\CLASSLIB\SOURCE │
- │ C:\TC\EXAMPLES │
- │ C:\TC\EXAMPLES\STARTUP │
- │ C:\TC\EXAMPLES\TCALC │
- │ C:\171 │
- │ C:\HAR │
- │ C:\DVC │
- │ C:\DVC\PDT │
- │ C:\DV │
- │ C:\WP │
- │ C:\NEW │
- │ C:\ORG │
- └────── Running the command: dir >> c:\allfiles.lst ──────────┘
- C:\>
-
- Figure 2
-
-
-
-
- Limitations:
-
- 1. The current version of WALKDIR cannot handle more than 100
- subdirectories in any one directory.
-
-
-
-
-
-
-
-
-
- 3
-
-
-
-
- WALKDIR Copyright 1992 David Lee All Rights Reserved
-
-
- Limitations (cont):
-
- 2. Commands executed via WALKDIR should not require any kind of
- user input. Because WALKDIR redirects DOS messages (error
- and informational) to a file, you'll never see the question
- appear. The command "del *.*" is a good example. DOS will
- write the question "Are you sure? (Y/N)" to the WALKDIR.MSG
- file instead of the screen. You won't know whether the
- program has halted because of an error, or because it's
- asking for input. Similarly, if you run a user written
- program, the prompts it generates will overwrite WALKDIR's
- screen and vice versa. The results will be less than
- satisfactory.
-
- Examples:
-
- 1. C:\>walkdir "dir *.doc >> c:\docfile.lst"
- This would find all .doc files in every directory on a C
- drive, and pipe the results to a file called "docfile.lst".
- You have to use the redirect and append (>>) operator
- otherwise the file will only contain the results of the dir
- command from the last directory WALKDIR processes.
-
- 2. C:\>walkdir "del *.bak"
- Delete all .bak files in all directories on the C drive. Be
- extremely careful with deletes. Remember that all matching
- files will be deleted from ALL the directories below the
- directory you start from.
-
- 3. C:\walkdir "copy *.bat d:\batch"
- C:\walkdir "del *.bat"
- Consolidate all .bat files on the C drive in a directory on
- drive D called BATCH. Then delete all the batch files on
- drive C. You could also do this with a batch file
- containing the copy and del commands. That way WALKDIR
- would copy and delete the target files in a single pass.
-
- 4. C:\APPS>walkdir "c:\batch\set-ro.bat"
- Runs the batch file SET-RO.BAT against each subdirectory
- below the APPS directory. SET-RO contains two calls to
- DOS's ATTRIB command, one to make all .EXE files read only
- and another to do the same for .COM files. Although the
- ATTRIB command includes a /s switch to process all
- subdirectories, you cannot use it (the /s switch) and
- specify a file name/type. In other words, it forces you to
- ATTRIB all files in the subdirectories.
-
-
-
-
-
-
-
-
-
-
- 4
-
-
-
-
- WALKDIR Copyright 1992 David Lee All Rights Reserved
-
-
- 5. N:\DATA\DEPT-1>walkdir "n:\data\makedirs.bat"
- Runs a batch file called MAKEDIRS. This might be useful for
- a network administrator who needed to create several
- identical subdirectories (as in Figure 1) for each "user"
- directory. In this case, MAKEDIRS.BAT might contain the
- following commands:
- MD DB
- MD SC
- MD WP
- When WALKDIR runs, it would move from "user" directory to
- user directory creating the three subdirectories (DB, SC,
- WP) for each.
-
- 6. N:\DATA>walkdir "dir | sort > myfiles.lst"
- Another example for a network administrator. Assuming the
- directory structure from Figure 1, this would write a sorted
- directory listing to a file in each directory. Handy for
- handing out to the LAN users, along with a note asking them
- to clean up their directories.
-
- Enhancements: I am already working on a series of enhancements to
- improve WALKDIR's usefulness. I am also extremely
- interested in any suggestion you might have that would
- increase the program's usefulness. Please forward any
- suggestions to me via CompuServe mail (my CompuServe ID
- is 72077,304), or in writing to the address listed on
- the registration form,.
-
- ---------------------+
- Program Requirements |
- ---------------------+
- - IBM compatible PC
- - DOS version 2.x or later
- - 15KB of available system memory to load the program. Actual
- memory usage will vary depending on the complexity of the
- directory structure and the command WALKDIR has to process.
-
- -----------------------+
- Program Specifications |
- -----------------------+
- WALKDIR is written entirely in Borland's Turbo-C version 2.0. The program
- was developed on a Northgate PC operating under MS-DOS version 3.3. The
- program has run successfully on a variety of PC's, both 286 and 386 based.
- I have also run the program on file servers operating under Novell's
- Netware operating system versions 2.15c and 3.10.
-
- ----------------+
- Program History |
- ----------------+
- June 15, 1992 Released version 1.0
-
-
-
-
-
-
- 5
-
-
-
-
- WALKDIR Copyright 1992 David Lee All Rights Reserved
-
-
- ------------------+
- Technical Support |
- ------------------+
- Please report any problems you encounter with the program to me at your
- earliest convenience. Please be sure to include contact information, such
- as your phone number and/or CompuServe ID. I will respond as quickly as I
- can. My CompuServe ID is 72077,304.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 6
-