Path: utzoo!attcan!uunet!know!zaphod.mps.ohio-state.edu!usc!ucsd!nosc!logicon.com!trantor.harris-atd.com!charybdis!sonny From: sonny@charybdis.harris-atd.com (Bob Davis) Newsgroups: comp.os.msdos.apps Subject: Re: Utility Request - Walking the Tree Message-ID: <4384@trantor.harris-atd.com> Date: 26 Sep 90 15:36:37 GMT References: <1990Sep25.151041.9590@eagle.lerc.nasa.gov> Sender: news@trantor.harris-atd.com Reply-To: sonny@trantor.harris-atd.com (Bob Davis) Distribution: na Organization: Advanced Technology Dept., Harris ESS, Melbourne, FL Lines: 27 In article <1990Sep25.151041.9590@eagle.lerc.nasa.gov> edjcb@earth.lerc.nasa.gov writes: >I need a utility that will walk the tree structure from a specified point >down and execute commands on each file it finds. I'd like to avoid the >pipe approach to this -- piping a directory list output into something >that will execute the desired command. I already have RESWALK to do that. > >What I really want to do is delete large chunks of files in the tree and >ideally remove the resulting empty directories. Any suggestions would >be appreciated by mail. Thanks a 1,000,000 -- Jeff > >Jeff Brown (216) 433-3888 >edjcb@scivax.lerc.nasa.gov Maybe the UNIX-like utility, rm, with the -r option is what you want. 'rm -r directory-name' will REMOVE EVERYTHING (Careful!) including files AND directories from (and including) 'directory-name' on down in the tree. Also, SWEEP, from the PC Magazine utilities is useful for executing a given command in every directory. Good luck, ______________________________________________________________________________ Bob Davis, UofALA'66 \\ INTERNET : sonny@trantor.harris-atd.com | _ _ | Harris Corporation, ESS \\ UUCP : ...!uunet!x102a!trantor!sonny |_| |_| | | Advanced Technology Dept.\\ AETHER : K4VNO |==============|_/\/\/\|_| PO Box 37, MS 3A/1912 \\ VOICE : (407) 727-5886 | I SPEAK ONLY | |_| |_| | Melbourne, FL 32902 \\ FAX : (407) 729-2537 | FOR MYSELF. |_________|