Hi Boanne,
I don't know if this will help, but here goes.
Ithink you can use the del command and pass a list of files to it to
delette. This can be done from youre batch file.
Another thought is instead of > zoo.txt, (writting the output to a txt
file) redirect the output to a del loop, 1 file at a time as youre batch
file finds it.
Pete
On 1999-06-11 Boanne said:
>Hello Everyone,
>For the first time I in a looooooong time I want to write a batch
>file and have run into something I don't know how to do. All
>help and suggestions will be appreciated :) My OS is OpenDOS,
>and I have looked through the dos thoroughly with no results, but
>the problem could be that I don't know the proper terminology for
>what I'm looking for. Or maybe what I want to do can't be done
>with a batch file...
>What I want to do is search for a text string in a text file, and
>then delete *only* the files that contain that text string. Note
>that all the files I will be searching and deleting have the same
>extension - so I must be careful I don't delete the files I want
>to keep by mistake.
>The first part is easy. Let's say the text string I want to
>search for is "elephant". Ok, the line that does this is:
>find /f elephant c:\directoryname\*.txt > zoo.txt
>This will give me a plain text file that is a list of all the
>files that contain the string "elephant" in a file called zoo.txt
>And here is where I get stuck. How do I pass the filenames from
>zoo.txt back to the batch file and delete them?
>Thanks :)
>Boanne
>PS- To Dale Hoogeveen: Your batch file adventures are contagious!
><grin>
>- --
>[EMAIL PROTECTED]
>A Dinosaurs Garden (collection of DOS links and files)
>http://www.sound.net/~ashelton/dinosaur/dg.htm
>*Press Enter to test... Release to detonate...
To unsubscribe from SURVPC send a message to [EMAIL PROTECTED] with
unsubscribe SURVPC in the body of the message.
Also, trim this footer from any quoted replies.