M
M
mamonic2017-07-19 14:57:50
cmd/bat
mamonic, 2017-07-19 14:57:50

BAT/CMD How can I delete the searched file?

Hello. There is a batch file that searches for lines in a text file and writes the result to another file. What needs to be added to the code so that after the execution of the batch file, the text file in which the search was performed is deleted?
FINDSTR /L "keyword" result.txt >> found.txt

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JaxxDexx, 2017-07-19
@mamonic

del result.txt
More precisely:

FINDSTR /L "keyword" result.txt >> found.txt && del result.txt

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question