0

I need to replace a string in a file A, with empty string. And I need to do it using Batch script.

Input: A.txt A.txt contains "xyz", which I need to replace with empty string in same file A.txt.

I need to replace only "xyz" from the file A.txt, not the entire file. The file A.txt contains contains several other strings.

Please let me know if possible.

Anand
  • 2,239
  • 4
  • 32
  • 48

1 Answers1

1

This will replace the xyz with nothing, which is effectively an empty string.

echo.>a.txt
foxidrive
  • 40,353
  • 10
  • 53
  • 68
  • I believe the OP wants to replace only "xyz" with an empty string, not the entire file content. But the question is a bit unclear. – dbenham Apr 06 '14 at 15:27
  • @dbenham The OP hasn't replied so anything could be the case. :) I took the question at face value and he didn't mention anything else in the file. – foxidrive Apr 06 '14 at 15:29