Delete System Files containing string

Posted by Fuzz Evans on Stack Overflow See other posts from Stack Overflow or by Fuzz Evans
Published on 2013-07-01T22:57:03Z Indexed on 2013/07/01 23:05 UTC
Read the original article Hit count: 206

Filed under:
|
|
|

I am trying to write a batch file that will examine a given directory, read each file for a given string "Example" and then delete any files that contain the string. The files are also System Files so I don't know what the exact extension is or if that matters (maybe you can just omit a file type filter and have it read all files?). Some of the files will be locked from reading as well so it needs to handle access denial errors if that occurs, not sure how batch files handle that.

© Stack Overflow or respective owner

Related posts about string

Related posts about batch-file