0

I would like do a batch that delete all the text present between in_point and out_point of example.txt like this:

bla bla lba aaa uuu
in_point

jhfwjeblwqblf

out_point
bla bla bla
abc cfgr qwerty ecc...

The batch has to delete only "jhfwjeblwqblf" (but it's variable, it can be more or less: the batch however have to delete all). How can I do this?

  • Not possible in .bat, but can be done using PowerShell. Is that ok? And don't you delete the in_point and out_point lines? – harrymc Feb 16 at 20:52
  • I don't have to delete in_point and out_point – Camillo Gatto Feb 17 at 0:09
  • @harrymc fallible: it is possible in a .bat providing that the example.txt is a plain text file. In any case, Powershell seems to be a better choice… – JosefZ Feb 17 at 22:10
  • 1
    that's almost like a dare saying its not possible. I would write it if I had the time to throw at it. – Larryc Feb 18 at 6:31

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.