home *** CD-ROM | disk | FTP | other *** search
- From: marks@tekigm2.men.tek.com (Mark D. Salzman)
- Newsgroups: comp.binaries.ibm.pc
- Subject: v01i004: rm, a "rm" clone with C source
- Summary: mds_rm.arc, a "rm" clone with C source
- Date: 8 Nov 88 18:41:05 GMT
- Approved: dhesi@bsu-cs.UUCP
-
- Posting-number: Volume 01 Issue 004
- Originally-from: "Mark D. Salzman" <marks@tekigm2.men.tek.com>
- Submitted-by: "Mark D. Salzman" <marks@tekigm2.men.tek.com>
- Archive-name: mds_rm/part1
-
- With all the talk in comp.sys.ibm.pc on people having trouble cleaning
- out and removing unwanted directories, I thought I would post this "rm"
- clone for the PC that I wrote. With the correct option flags, it will
- find and remove every file and directory on a disk with the exceptions
- of the root, the current directory (i.e the one you are currently in),
- any directory that is linked to another name (via assign or such), or
- any directory that you leave non-empty. It only uses DOS V2.0 calls so
- it should work on most MS-DOS compatible machines. I also fixed a bug
- so it will work with PC-DOS V4.0, and cleaned up the exit status so it
- can be used in "make" like programs.
-
- Enclosed in the arc are the source in Microsoft C, an EXE, and a short
- documentation file.
-
- ENJOY!
-
- Mark D. Salzman Phone (206) 253-5542.
- Tektronix Inc., P.O. Box 3500, M/S C1-936
- Vancouver, Washington. 98668
- {world_at_large}!tektronix!tekigm2!marks
-
- [
- Options available include query before deleting each file or directory,
- recursively delete directories, query before deleting files with
- archive bit set, verbose mode, and silent mode.
-
- Command line style arguments may also be passed through the environment
- variable RMOPTS where, unfortunately, they override arguments typed
- on the command line.
-
- Source suitable for Microsoft C V4.0 through V5.1 is supplied.
-
- -- R.D.
- ]
-