[comp.os.msdos.misc] how do you do this?

butler@saturn.sdsu.edu (Michael Butler) (02/27/91)

Hi there folks;

Does anyone know how to do the following in a msdos environment?
find . -name '*.bak' -exec rm {} ;

Thank you,
Mike Butler
butler@cs.sdsu.edu

mcdonald@aries.scs.uiuc.edu (Doug McDonald) (02/27/91)

In article <1991Feb27.072015.7027@ucselx.sdsu.edu> butler@saturn.sdsu.edu (Michael Butler) writes:
>Hi there folks;
>
>Does anyone know how to do the following in a msdos environment?
>find . -name '*.bak' -exec rm {} ;
>

It might be helpful to state what you want to do. The above is
utterly incomprehensible. Use words.

jdb@reef.cis.ufl.edu (Brian K. W. Hook) (02/27/91)

In article <1991Feb27.072015.7027@ucselx.sdsu.edu> butler@saturn.sdsu.edu (Michael Butler) writes:
>Hi there folks;
>
>Does anyone know how to do the following in a msdos environment?
>find . -name '*.bak' -exec rm {} ;

For those of us who don't know UNIX, how about filling us in on what this
does?  I believe that there is a PD program called sweep that will come
close to what you want.

SWEEP DEL *.BAK

I don't know what that -name means though.

Brian

valley@uchicago (Doug Dougherty) (02/28/91)

mcdonald@aries.scs.uiuc.edu (Doug McDonald) writes:


>In article <1991Feb27.072015.7027@ucselx.sdsu.edu> butler@saturn.sdsu.edu (Michael Butler) writes:
>>Hi there folks;
>>
>>Does anyone know how to do the following in a msdos environment?
>>find . -name '*.bak' -exec rm {} ;
>>

>It might be helpful to state what you want to do. The above is
>utterly incomprehensible. Use words.

I assume he wants to delete all the .BAK files in the current and all
sub- directories.  Get UFIND, an MS/DOS implementation of Unix Find.  It
does this and much more...

henry@garp.mit.edu (Henry Mensch) (02/28/91)

mcdonald@aries.scs.uiuc.edu (Doug McDonald) writes:
|> 
|> In article <1991Feb27.072015.7027@ucselx.sdsu.edu> butler@saturn.sdsu.edu (Michael Butler) writes:
|> >Hi there folks;
|> >
|> >Does anyone know how to do the following in a msdos environment?
|> >find . -name '*.bak' -exec rm {} ;
|> >
|> 
|> It might be helpful to state what you want to do. The above is
|> utterly incomprehensible. Use words.

that's easy:  he wants to find all the files with the suffix .bak under the
current directory (and its directories) and execute an arbitrary command (in
this case, "rm {filename_here}").

-- 
# Henry Mensch    /   <henry@garp.mit.edu>   /   E40-379 MIT,  Cambridge, MA
# <hmensch@uk.ac.nsfnet-relay> / <henry@tts.lth.se> / <mensch@munnari.oz.au>
#     via X.400: S=mensch; OU=informatik; P=tu-muenchen; A=dbp; C=de

rreiner@yunexus.YorkU.CA (Richard Reiner) (02/28/91)

valley@uchicago (Doug Dougherty) writes:

>In article <butler@saturn.sdsu.edu (Michael Butler) writes:
>>Does anyone know how to do the following in a msdos environment?
>>find . -name '*.bak' -exec rm {} ;

>Get UFIND, an MS/DOS implementation of Unix Find.

Better yet, get the GNUish MSDOS project's port of GNU find.  It does
everything UNIX find does that still makes sense on MessDOS.
Available on simtel20 and in several other places.

--richard

ruthenb@bgsuvax.UUCP (Joe Ruthenberg) (02/28/91)

From article <1991Feb27.154923.28267@ux1.cso.uiuc.edu>, by mcdonald@aries.scs.uiuc.edu (Doug McDonald):
> 
> In article <1991Feb27.072015.7027@ucselx.sdsu.edu> butler@saturn.sdsu.edu (Michael Butler) writes:
>>Hi there folks;
>>
>>Does anyone know how to do the following in a msdos environment?
>>find . -name '*.bak' -exec rm {} ;
>>
> 
> It might be helpful to state what you want to do. The above is
> utterly incomprehensible. Use words.
  

Guess your not a unix person, huh? If you have a program like whereis
you can pipe the output into the del command to get results, but
in general what you want to do is not easy. I'm sure somebody figured
out how to do it. Another possibility is to use 4DOS. In 4DOS, you
can use the global command to globally delete all *.bak files. If
you can find a normal dos global command, this will work too. I 
suppose red might work as well. Another thing you might want to
consider is how to delete all 0K files... Hmm...

Joe Ruthenberg
ruthenb@andy.bgsu.edu
 

valley@uchicago (Doug Dougherty) (02/28/91)

ruthenb@bgsuvax.UUCP (Joe Ruthenberg) writes:

>Guess your not a unix person, huh? If you have a program like whereis
>you can pipe the output into the del command to get results, but
>in general what you want to do is not easy. I'm sure somebody figured
>out how to do it. Another possibility is to use 4DOS. In 4DOS, you
>can use the global command to globally delete all *.bak files. If
>you can find a normal dos global command, this will work too. I 
>suppose red might work as well. Another thing you might want to
>consider is how to delete all 0K files... Hmm...

>Joe Ruthenberg
>ruthenb@andy.bgsu.edu
> 

As I said, (U)find will do all this, and more.

There is also a PCMAG (I think) utility called SWEEP that can globalize
any command.  You say "SWEEP {cmd} ..." and it runs {cmd} in each and
every subdir on the disk.

fisher@sc2a.unige.ch (02/28/91)

In article <1991Feb27.072015.7027@ucselx.sdsu.edu>, butler@saturn.sdsu.edu (Michael Butler) writes:
> Does anyone know how to do the following in a msdos environment?
> find . -name '*.bak' -exec rm {} ;

You can use exactly (or almost exactly) the same syntax under msdos if you
have taken the time to download the needed unix-like tools from any good
archive site (e.g. Simtel20's directory [MSDOS.UNIX]).  Several improved
delete tools would acomplish the same thing, although with another syntax.

For non-unix persons, the above means:
find [all files in the] . [current directory and below, matching the] -name
'*.bak' [and] -exec[ute the command] rm [i.e. del, on all these files] {} ;

Under dos, the furthest you can go is finding all the *.bak on a physical drive
(chkdsk /v | find "*.BAK"), but you'll need a way to add the "del" in front of
every line...

Markus Fischer, Dpt of Anthropology, Geneva CH

wolf@netcom.COM (Buckskin Tech.) (02/28/91)

In article <1991Feb27.154923.28267@ux1.cso.uiuc.edu>, mcdonald@aries.scs.uiuc.edu (Doug McDonald) writes:
> 
> In article <1991Feb27.072015.7027@ucselx.sdsu.edu> butler@saturn.sdsu.edu (Michael Butler) writes:
> >Hi there folks;
> >
> >Does anyone know how to do the following in a msdos environment?
> >find . -name '*.bak' -exec rm {} ;
> >
> 
> It might be helpful to state what you want to do. The above is
> utterly incomprehensible. Use words.

Translation:

Recursively decend the directory struction from the current directory,
deleting all *.bak files as you go.

(personally, I use an "rm" clone and say:
   rm -r *.bak
but my rm came with a commercial package)

 - Phil @ Buckskin Technologies

rmich@Lise.Unit.NO (Rolf Michelsen) (02/28/91)

Mike Butler writes:
> Hi there folks;

> Does anyone know how to do the following in a msdos environment?
> find . -name '*.bak' -exec rm {} ;

I thinks you should find what you are looking for in the <msdos.filutl> directory
on Simtel. Download the program WHEREIS. (Don't remember the exact name at the
moment, but it is something like whereis4...) This is a powerful shareware file
finder with the ability to delete found files.

    ___________________  
   /                   | 
  / Snail-Mail:        | 
 /   Rolf Michelsen    |
/    Studpost 130      |
\    7034 Trondheim-NTH|
 \  E-Mail:            |
  \  rmich@lise.unit.no|
   \___________________| 

msschaa@cs.vu.nl (Schaap MS) (02/28/91)

In article <valley.667677123@gsbsun> valley@uchicago (Doug Dougherty) writes:
>mcdonald@aries.scs.uiuc.edu (Doug McDonald) writes:
>>In article <1991Feb27.072015.7027@ucselx.sdsu.edu> butler@saturn.sdsu.edu (Michael Butler) writes:
>>>Hi there folks;
>>>Does anyone know how to do the following in a msdos environment?
>>>find . -name '*.bak' -exec rm {} ;
>>It might be helpful to state what you want to do. The above is
>>utterly incomprehensible. Use words.
>I assume he wants to delete all the .BAK files in the current and all
>sub- directories.  Get UFIND, an MS/DOS implementation of Unix Find.  It
>does this and much more...


Use 4dos.

Then:
global del *.bak


   Michael Schaap
   msschaa@cs.vu.nl

rkl@cbnewsh.att.com (kevin.laux) (02/28/91)

In article <1991Feb27.154923.28267@ux1.cso.uiuc.edu>, mcdonald@aries.scs.uiuc.edu (Doug McDonald) writes:
> 
> In article <1991Feb27.072015.7027@ucselx.sdsu.edu> butler@saturn.sdsu.edu (Michael Butler) writes:
> >Hi there folks;
> >
> >Does anyone know how to do the following in a msdos environment?
> >find . -name '*.bak' -exec rm {} ;
> >
> 
> It might be helpful to state what you want to do. The above is
> utterly incomprehensible. Use words.

	Never worked in a Unix environment, eh? :-)

	The above is the standard way to find all files with the extension
.bak from the current directory and underlying subdirectories and delete them.
Buy the MKS Toolkit and you can use that exact command line.

-- 
________________________________________________________________________________

	R. Kevin Laux				Email: rkl1@hound.att.com
	AT&T Bell Labs				Voice: (908) 949-1160

roger@wrq.com (Roger Fulton) (03/01/91)

In article <1991Feb27.072015.7027@ucselx.sdsu.edu> butler@saturn.sdsu.edu (Michael Butler) writes:
>Hi there folks;
>
>Does anyone know how to do the following in a msdos environment?
>find . -name '*.bak' -exec rm {} ;

Get the excellent DEL replacement PDELETE from
wuarchive.wustl.edu in /mirrors/msdos/dirutl/pdel42.zip.




.
-- 
Roger Fulton
roger@wrq.com

einari@rhi.hi.is (Einar Indridason) (03/01/91)

In article <valley.667677123@gsbsun> valley@uchicago (Doug Dougherty) writes:
>>In article <1991Feb27.072015.7027@ucselx.sdsu.edu> butler@saturn.sdsu.edu (Michael Butler) writes:
>>>Hi there folks;
>>>
>>>Does anyone know how to do the following in a msdos environment?
>>>find . -name '*.bak' -exec rm {} ;


(For plain vanilla DOS:)

chkdsk /v | find ".BAK" > 'temp_file.bat'

edit that 'temp_file.bat' and add in front of every line the magic word 'del '

run that file.
You got it.


--
Internet:    einari@rhi.hi.is        |   "Just give me my command line and drag
UUCP:    ..!mcsun!isgate!rhi!einari  |   the GUIs to the waste basket!!!!"

Surgeon Generals warning:  Masking the 8th bit can seriously damage your brain!!

mhr@mendip.UUCP (MHR {who?}) (03/01/91)

In <1991Feb27.072015.7027@ucselx.sdsu.edu>, butler@saturn.sdsu.edu writes:
> Hi there folks;
> 
> Does anyone know how to do the following in a msdos environment?
> find . -name '*.bak' -exec rm {} ;
> 
> Thank you,
> Mike Butler
> butler@cs.sdsu.edu

If you have 4DOS, then GLOBAL del *.bak should do it.

If not, get ahold of the PC Magazine utility SWEEP.COM and use SWEEP DEL
*.BAK from the directory in which you are interested in doing this thing.
Sweep is available from the SIMTEL archive in:

PD1:<MSDOS.PCMAG>VOL4N24.ARC	(contains SWEEP and WAITASEC)

among other places.

Regards.

-- 
Mark A. Hull-Richter    UUCP:  ccicpg!mhr       In all things, restraint,
ICL North America                               especially with respect
9801 Muirlands Blvd                             to posting articles and
Irvine, CA  92713       (714)458-7282x4539      doubly so for flames.

ts@uwasa.fi (Timo Salmi) (03/02/91)

In article <17403@milton.u.washington.edu> roger@wrq.com (Roger Fulton) writes:
>In article <1991Feb27.072015.7027@ucselx.sdsu.edu> butler@saturn.sdsu.edu (Michael Butler) writes:
>>Hi there folks;
>>
>>Does anyone know how to do the following in a msdos environment?
>>find . -name '*.bak' -exec rm {} ;
>
>Get the excellent DEL replacement PDELETE from
>wuarchive.wustl.edu in /mirrors/msdos/dirutl/pdel42.zip.

Quite right.  Another of the many solutions is using sweep.com:
  sweep del *.bak which performs the operation on the default
directory and the whole tree below it.  This has a similar advantage
as the original question's Unix find command, that you can sweep
with commands other than del (vs rm) if you so wish.  Sweep.com is
included in /pc/pcmag/vol4n24.zip at our site. 

The wares are available by anonymous ftp from garbo.uwasa.fi, Vaasa,
Finland, 128.214.12.37, or by using our mail server (use the latter
if, and only if you don't have anonymous ftp).  If you are not
familiar with anonymous ftp or mail servers, I am prepared to send
prerecorded instructions on request.  (If you don't get the
instructions from me within a few days, it will mean that your email
address cannot be reached by a simple email reply.  Contact your
system manager for devicing a proper mail path for you, because
unless you do, you wouldn't be able to utilize the mail server
anyway.)

...................................................................
Prof. Timo Salmi        
Moderating at garbo.uwasa.fi anonymous ftp archives 128.214.12.37
School of Business Studies, University of Vaasa, SF-65101, Finland
Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun

roy%cybrspc@cs.umn.edu (Roy M. Silvernail) (03/04/91)

einari@rhi.hi.is (Einar Indridason) writes:

> >>In article <1991Feb27.072015.7027@ucselx.sdsu.edu> butler@saturn.sdsu.edu (
> >>>Does anyone know how to do the following in a msdos environment?
> >>>find . -name '*.bak' -exec rm {} ;
> 
> (For plain vanilla DOS:)
> 
> chkdsk /v | find ".BAK" > 'temp_file.bat'

For 4dos (which should be on every DOS machine, IMHO :-), it's simply

global del *.bak

or you can use a genuine find, like that in
PD1:<MSDOS.SYSUTL>UXUTL162.ZIP on Simtel.
--
Roy M. Silvernail --  roy%cybrspc@cs.umn.edu - OR-  cybrspc!roy@cs.umn.edu
  perl -e '$x = 1/20; print "Just my \$$x! (adjusted for inflation)\n"'
        [space reserved for clever quote]{mail your submissions}

tporczyk@na.excelan.com (Tony Porczyk) (03/06/91)

The News Manager)
Nntp-Posting-Host: na
Reply-To: tporczyk@na.excelan.com (Tony Porczyk)
Organization: Standard Disclaimer
References: <1991Feb27.072015.7027@ucselx.sdsu.edu> <1991Feb27.154923.28267@ux1.cso.uiuc.edu> <valley.667677123@gsbsun>
Date: Thu, 28 Feb 1991 08:23:45 GMT

In article <1991Feb27.072015.7027@ucselx.sdsu.edu> butler@saturn.sdsu.edu (Michael Butler) writes:
>Does anyone know how to do the following in a msdos environment?
>find . -name '*.bak' -exec rm {} ;

There is a utility "SWEEP". I believe it is a PC Magazine or PC Computing
utility (not sure, though). Go into the directory from which you want
to delete all the bak files down through all sub-directories, and type
SWEEP DEL *.BAK
That will take care of it.

Tony

ianhogg@cs.umn.edu (Ian J. Hogg) (03/10/91)

In article <1991Feb28.082345.11807@novell.com> tporczyk@na.excelan.com (Tony Porczyk) writes:
>The News Manager)
>Nntp-Posting-Host: na
>Reply-To: tporczyk@na.excelan.com (Tony Porczyk)
>Organization: Standard Disclaimer
>References: <1991Feb27.072015.7027@ucselx.sdsu.edu> <1991Feb27.154923.28267@ux1.cso.uiuc.edu> <valley.667677123@gsbsun>
>Date: Thu, 28 Feb 1991 08:23:45 GMT
>
>In article <1991Feb27.072015.7027@ucselx.sdsu.edu> butler@saturn.sdsu.edu (Michael Butler) writes:
>>Does anyone know how to do the following in a msdos environment?
>>find . -name '*.bak' -exec rm {} ;
>
>There is a utility "SWEEP". I believe it is a PC Magazine or PC Computing
>utility (not sure, though). Go into the directory from which you want
>to delete all the bak files down through all sub-directories, and type
>SWEEP DEL *.BAK
>That will take care of it.
>
>Tony

With the GNUish DOS programs I can use the following command:
find . -name '*.bak' -exec rm {} ;


-- 
===============================================================================
Ian Hogg						ianhogg@cs.umn.edu
                                                        (612) 225-1401