Answers.Body: <p>You can do it with pgn-extract via a combination of the -R flag, to select the tags you want to retain (and their ordering), and the --xroster option to omit all those tags not listed in the roster file. For instance, if you want only White, Black and Result tags included with each game, place White, Black and Result (one per line) in a file called <code>roster</code>, say and then run pgn-extract as follows:</p>
  <pre><code>pgn-extract -C -N -V -R roster --xroster -newfile.pgn oldfile.pgn
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-10T01:39:15.230Z
Answers.Text: Thank you!  This worked!  I'll look more at the flag commands in the future.  Much appreciated!
Answers.UserDisplayName: hangejj
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-08T05:55:38.120Z
Answers.LastActivityDate: 2022-09-08T05:55:38.120Z
Answers.UserDisplayName: kentdjb
Body: <p>Anyone aware of a way to do a mass edit of the header in a pgn file that has multiple games?</p>
  <p>Currently I've tried using pgn-extract and the line I have tried is:</p>
  <pre><code>pgn-extract -C -N -V -newfile.pgn oldfile.pgn
  </code></pre>
  <p>This does cleanup any annotations in the moves list but the header still remains the same.</p>
  <p>Here's an example of a header. In the below header example, say I'd want to get rid of the &quot;Round 29&quot; portion .</p>
  <blockquote>
  <p>[Event &quot;F/S Return Match&quot;] [Site &quot;Belgrade, Serbia JUG&quot;] [Date
  &quot;1992.11.04&quot;] [Round &quot;29&quot;] [White &quot;Fischer, Robert J.&quot;] [Black
  &quot;Spassky, Boris V.&quot;] [Result &quot;1/2-1/2&quot;]</p>
  </blockquote>
  
Tags: <pgn>
Title: PGN Header Edit
ThreadText: # PGN Header Edit
  
  (Asked by: username_0 on 2022-09-07)
  
  Anyone aware of a way to do a mass edit of the header in a pgn file that has multiple games?
  Currently I've tried using pgn-extract and the line I have tried is:
  pgn-extract -C -N -V -newfile.pgn oldfile.pgn
  
  This does cleanup any annotations in the moves list but the header still remains the same.
  Here's an example of a header. In the below header example, say I'd want to get rid of the "Round 29" portion .
  
  [Event "F/S Return Match"] [Site "Belgrade, Serbia JUG"] [Date
  "1992.11.04"] [Round "29"] [White "Fischer, Robert J."] [Black
  "Spassky, Boris V."] [Result "1/2-1/2"]
  
  **Tags:** pgn
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-09-08. Score: 3 | Accepted answer
  
  You can do it with pgn-extract via a combination of the -R flag, to select the tags you want to retain (and their ordering), and the --xroster option to omit all those tags not listed in the roster file. For instance, if you want only White, Black and Result tags included with each game, place White, Black and Result (one per line) in a file called roster, say and then run pgn-extract as follows:
  pgn-extract -C -N -V -R roster --xroster -newfile.pgn oldfile.pgn
  
  > **Comments:**
  > **username_0**: Thank you!  This worked!  I'll look more at the flag commands in the future.  Much appreciated!  
  
  ---
  
  