Answers.Body: <p>You can use my free <a href="https://www.cs.kent.ac.uk/%7Edjb/pgn-extract/" rel="nofollow noreferrer">pgn-extract</a> program with the <code>-F</code> flag to output the final position as a FEN string in a comment at the end of the game. If you don't want to include the moves then <code>--dropply -1</code> will omit all but the final move of the game in the output. For instance:</p>
  <pre><code>pgn-extract -F --dropafter -1 games.pgn
  </code></pre>
  <blockquote>
  <p>[Event &quot;Milwaukee Northwestern&quot;] [Site &quot;?&quot;] [Date &quot;1957&quot;] [Round &quot;?&quot;]
  [White &quot;Fischer, Robert J.&quot;] [Black &quot;Kampars, N.&quot;] [Result &quot;1/2-1/2&quot;]
  [SetUp &quot;1&quot;] [FEN &quot;8/pp4p1/3nk2p/2p2p2/5P2/2P1K1PP/PP2B3/8 w - - 2 37&quot;]</p>
  <ol start="37">
  <li>Bd3 { &quot;8/pp4p1/3nk2p/2p2p2/5P2/2PBK1PP/PP6/8 b - - 3 37&quot; } 1/2-1/2</li>
  </ol>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-10T06:41:40.567Z
Answers.LastActivityDate: 2023-09-10T06:41:40.567Z
Answers.UserDisplayName: kentdjb
Body: <p>I have a .pgn database. I like to extract all of the final positions into a new pgn database. I do not have ay programming skills. What is the best way to do this?</p>
  
Tags: <endgame>
Title: Output A List of final positions
ThreadText: # Output A List of final positions
  
  (Asked by: username_0 on 2023-09-10)
  
  I have a .pgn database. I like to extract all of the final positions into a new pgn database. I do not have ay programming skills. What is the best way to do this?
  
  **Tags:** endgame
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-09-10. Score: 2
  
  You can use my free pgn-extract program with the -F flag to output the final position as a FEN string in a comment at the end of the game. If you don't want to include the moves then --dropply -1 will omit all but the final move of the game in the output. For instance:
  pgn-extract -F --dropafter -1 games.pgn
  
  
  [Event "Milwaukee Northwestern"] [Site "?"] [Date "1957"] [Round "?"]
  [White "Fischer, Robert J."] [Black "Kampars, N."] [Result "1/2-1/2"]
  [SetUp "1"] [FEN "8/pp4p1/3nk2p/2p2p2/5P2/2P1K1PP/PP2B3/8 w - - 2 37"]
  
  Bd3 { "8/pp4p1/3nk2p/2p2p2/5P2/2PBK1PP/PP6/8 b - - 3 37" } 1/2-1/2
  
  
  ---
  
  