title: edit a specific line in text file using batch command
body: <p>I have a textfile which contains the following text.</p>
  
  <p>"Module"</p>
  
  <blockquote>
  <pre><code> {
      "ModuleSignature" = "8:MergeModule.6F1248514B3047E99E4EE8A129CB8605"
      "Version" = "8:1.0.0.0"
      "Title" = "8:uoipmsm"
      "Subject" = "8:"
      "Author" = "8:Microsoft"
      "Keywords" = "8:"
      "Comments" = "8:"
      "SearchPath" = "8:"
      "UseSystemSearchPath" = "11:TRUE"
      "TargetPlatform" = "3:1"
      "PreBuildEvent" = "8:"
      "PostBuildEvent" = "8:"
      "RunPostBuildEvent" = "3:0"
      }
  </code></pre>
  </blockquote>
  
  <p>In the above; I want to change the Version number which I will give when I trigger a build from a tool. </p>
  
  <p>I wanna pass a parameter <strong>$Version</strong> in batch file, it has to take the version number from the tool I use and update the same in that text file.</p>
  
  <p>For ex: in the above text i wanna code it as "Version" = "8:$Version" hence when ever I provide a version number while triggering a build, it has to update the same in this text file. </p>
  
  <p>Could you please guide me how to edit the specific line. I am new to windows batch scripting. </p>
  
  <p>and i hav to add one more point... in the text file i have to modify the version in the line number 399. So the batch file has to jump to line num 399 in that text file and modify the same. Kindly help me to fix the same ...</p>
  
  <hr>
  
  <p>I had saved the above script in a text pad and saved the same as ver.bat; and also in the same folder I saved the Intext file. When I mention the line number which to be replaced, it is removing the contents which are present after "=" symbol, from line 1 to 399 . </p>
  
  <p>Before running the batch file:</p>
  
  <pre><code>"ModuleSignature" = "8:MergeModule.6F1248514B3047E99E4EE8A129CB8605"
  "Version" = "8:1.0.0.0"
  "Title" = "8:uoipmsm"
  "Subject" = "8:"
  "Author" = "8:Microsoft"
  "Keywords" = "8:"
  "Comments" = "8:"
  "SearchPath" = "8:"
  "UseSystemSearchPath" = "11:TRUE"
  "TargetPlatform" = "3:1"
  "PreBuildEvent" = "8:"
  "PostBuildEvent" = "8:"
  "RunPostBuildEvent" = "3:0"
  </code></pre>
  
  <p>I mentioned the line number as 10 and after tat if I run the batch file; i get the following output;</p>
  
  <pre><code>"ModuleSignature" = 
  "Version" = ""
  "Title" = 
  "Subject" = 
  "Author" = 
  "Keywords" = 
  "Comments" = 
  "SearchPath" = 
  "UseSystemSearchPath" = 
  "TargetPlatform" = 
  "PreBuildEvent" = 
  "PostBuildEvent" = 
  "RunPostBuildEvent" = 
  </code></pre>
  
  <p>Any idea??</p>