Here the 6 most important pgn-extract commands from my work in computerchess, because pgn-extract is a very powerful tool, but the number of possibilities makes it a little bit complicated to use. So here, the most important things, you can do with pgn-extract: Delete games with complete identical notation: pgn-extract --quiet -D source.pgn --output unique.pgn ------------------------------------------------------------------------------------------------------- Delete only openings/games with identical endpositions: pgn-extract --quiet --fuzzydepth 0 -D source.pgn --output unique.pgn ------------------------------------------------------------------------------------------------------- Delete Chess960 and other games starting from FEN-code (not from chess starting position): pgn-extract --quiet --nosetuptags source.pgn --output nofen.pgn ------------------------------------------------------------------------------------------------------- Cut all games after a fix number of plies (for making opening-sets out of games for example): pgn-extract --quiet --plylimit 16 source.pgn --output cut8mvs.pgn (16 is the number of plies, after the cutoff is done) ------------------------------------------------------------------------------------------------------- Add played games to a file: pgn-extract --quiet -W -abase.pgn newgames.pgn (add the games in newgames.pgn to base.pgn. File base.pgn must already exist, but may be empty) ------------------------------------------------------------------------------------------------------- Delete played games of one engine in a file (mention, this is quite slow, compared to other pgn-extract operations, dont worry): pgn-extract --quiet -W -tdelete_engine -nnewbase.pgn -otrash.pgn source.pgn This command needs a separate textfile "delete_engine" (no extensions like .txt or so!!!), and in there: Player "Enginename" (important: no empty lines and no space behind the Player "Enginename", otherwise this fails!) This deletes the games played by Enginename out of the source.pgn and writes the remaining games in newbase.pgn. In trash.pgn, the deleted games are stored - if you want to keep them in other files... ------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------- (Add -C -N -V to any of these pgn-extract lines, to delete all comments in the output file games) Stefan Pohl (SPCC), 2024