5

Is there a way to sort a PGN chess game by date and export the sorted games as a new PGN file?

4

I have not tried this myself, but there is a forum post on chess.com that has instructions on how to do this in SCID (http://www.chess.com/forum/view/help-support/sorting-a-pgn)

  1. Make an empty scid database
  2. Import your games
  3. Do database maintenance - Sort by date
  4. Export your databse to PGN
| improve this answer | |
  • The OP didn't ask what was the cheapest or the best tool, just if there was a way. Naturally, free is great. But I think Chessbase is worth the price. So I would stick with my answer regardless of cost. – ezaspi Dec 18 '13 at 4:14
2

I am sure there are many programs that include this functionality. I would be surprised if SCID (http://scid.sourceforge.net/) did not have it. There should be one or more online services that provide this function. In the end of the day, you can write your own script in e.g. Python that does this easily and nicely. The trick is that some games appear as duplicates in less well maintained PGN files. Another trick is that some games are missing certain annotation fields. Some fields could also be filled in with incorrect type of data or simply be empty. So if you go down the road of writing your own scripts, consider writing quality check scripts that make sure the PGN format is followed and that the information is complete.

| improve this answer | |
  • Well, I don't see how to do it in Scid. – SmallChess Dec 15 '13 at 23:42
  • @Kinderchocolate then you should include this information in your question: "I did not find a way to do this in Scid". – Rauan Sagit Dec 16 '13 at 7:54
  • If you can provide a bit more information, I can accept you as the answer. – SmallChess Dec 16 '13 at 23:32
  • According to scid.sourceforge.net/help/Sorting.html, the sorted order is saved only for non-read-only Scid database files. So perhaps try to save your PGN database as a Scid database. Then sort the Scid database according to e.g. date. Then try to export this Scid database as a PGN file. Additionally, PGN files are plain text and have a clear format and date field. You could write a script (in e.g. Python) that sorts the file by date or try to search for such a script online. By the way, does ChessBase Light (free version) support this function? – Rauan Sagit Dec 18 '13 at 11:56
1

You can do it with ChessBase: http://chessbase-shop.com/en/products/chessbase12_download

| improve this answer | |
  • You accepted this as the best answer? There should be many more ways that are free of charge. Chessbase 12 is an expensive software. – Rauan Sagit Dec 15 '13 at 1:20
  • 1
    Because there wasn't anything better. – SmallChess Dec 15 '13 at 23:41
  • @StudentT it is of course your right to choose which answer that suits you best :) Still, in my opinion, Chessbase is not the only way to go in terms of recording your games and taking care of them. Cheers. – Rauan Sagit Oct 15 '14 at 8:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.