Article View: comp.os.msdos.programmer
Article #2471MSDOS recursive dir walk SOLVED!
From: Robert Wier
Date: Tue, 02 Oct 1990 04:11
Date: Tue, 02 Oct 1990 04:11
53 lines
2303 bytes
2303 bytes
In my previous posting, I said:
While installing a CD ROM drive, I inadvertantly managed to
copy about a FIVE HUNDRED data files to a hard disk. The path
looks like
c:\dir1\dir2\dir3\dir4\files
The problem is that the files are marked READ ONLY (reasonable
since they came off a CDROM). Question: how do I delete 'em
without having to cd into each and every subdirectory above
the files? (in case it wasn't clear from the above.. there
are about 100 dir4 directories, and 5 - 10 files in each directory).
THANKS to all who sent messages about this..
The response was extremely helpful. A summary:
The responses were about equally divided among the following:
Use the SWEEP program which appeared in PC Magazine, and is
available from their bbs...
Use 4DOS, which is available from SIMTEL, or (which I prefer)
wuarchive under /mirrors/msdos/sysutl ( ps - I just can not
figure out how to reliably navigate around on SIMTEL -- probably
need to RTFM!)
Use a Unix rm type command. I already had one of these (1986)
but it lacked the recursive functions. Again on SIMTEL there
is a package DOSIX, which includes a full featured rm plus
other Unix type commands. This rm does have the standard
unix options. Thus, using
rm -fr dir3
deleted all of the files and subdirectories from dir3 on down,
regardless of the file protection attributes. Worked great.
I started out with 8.2 meg free, and ended up with 19.2 meg
free.
A few people offered custom written code.
To all of you, THANKS!
- Bob Wier
-------------- insert favorite standard disclaimers here ----------
College of Engineering
Northern Arizona University / Flagstaff, Arizona
Internet: rrw@naucse.cse.nau.edu | BITNET: WIER@NAUVAX | WB5KXH
or uucp: ...arizona!naucse!rrw
Technical Details
Message-ID:
<2618@naucse.cse.nau.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!ncar!noao!arizona!naucse!rrwShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!ncar!noao!arizona!naucse!rrw From: rrw@naucse.cse.nau.edu (Robert Wier) Newsgroups: comp.os.msdos.programmer Subject: MSDOS recursive dir walk SOLVED! Keywords: thanks Message-ID: <2618@naucse.cse.nau.edu> Date: 2 Oct 90 04:11:45 GMT Organization: Northern Arizona University, Flagstaff AZ Lines: 53