+ Reply to Thread
Results 1 to 5 of 5

Thread: PGN to FEN conversion

  1. #1
    Junior Member
    Join Date
    Dec 2006
    Posts
    4

    PGN to FEN conversion

    Sorry if this is the wrong forum to post this but I've been trying (without success) to locate a PGN to FEN converter that can read in pgn games and convert them to FEN.

    Currently I have 50 pgn files containing an average of 15 games apiece. I would like to convert all of them to FEN notation without taking forever (the only PGN to FEN converter I know of is an applet that accepts only 1 game at a time) :P.

    Does anyone know of a freeware converter?

  2. #2

    Re:PGN to FEN conversion

    saw this thread on avlerchess.

    Does it help?
    http://www.avlerchess.com/chess-computer/PGN_to_Fen_conversion_100832.html

  3. #3
    Junior Member
    Join Date
    Dec 2006
    Posts
    4

    Re:PGN to FEN conversion

    Thx for the link, but unfortunatly I saw that link also. What the user there is looking for and got, was a simple grep command to extract a FEN board position from a text file containing a bunch of FEN board positions.

    My PGN games look like this:
    [Event "It "]
    [Site "London "]
    [Date "1984.??.??"]
    [Round "3"]
    [White "Adams Michael "]
    [Black "Dickenson Neil F "]
    [Result "1-0"]
    [ECO "C07"]
    [PlyCount "99"]
    [EventDate "1984.??.??"]

    1. e4 e6 2. d4 d5 3. Nd2 c5 4. exd5 Qxd5 5. Ngf3 cxd4 6. Bc4 Qd6 7. O-O Nf6 8.
    Nb3 Nc6 9. Nbxd4 Nxd4 10. Nxd4 a6 11. Nf3 b5 12. Bd3 Bb7 13. a4 Ng4 14. Re1 Qb6
    15. Qe2 Bc5 16. Rf1 b4 17. h3 Nf6 18. Bg5 Nh5 19. Be3 Bxe3 20. Qxe3 Qxe3 21.
    fxe3 Ng3 22. Rfe1 Ne4 23. Ne5 Nc5 24. Bc4 Ke7 25. a5 Rhd8 26. Red1 Rac8 27. b3
    Rc7 28. Rxd8 Kxd8 29. Nd3 Nxd3 30. Bxd3 Rc5 31. Ra4 Kc7 32. Kf2 g6 33. g4 Bc6
    34. Rxb4 Rxa5 35. Rf4 f5 36. g5 Rd5 37. Rh4 Rd7 38. Bxa6 Rd2+ 39. Ke1 Rxc2 40.
    Rxh7+ Kd6 41. Bc4 Bd5 42. Rg7 Rh2 43. Rxg6 Rxh3 44. Kd2 Rg3 45. Rg8 Bxc4 46.
    bxc4 Kc5 47. g6 Kd6 48. c5+ Kc7 49. g7 Kb7 50. c6+ 1-0

    If I had a text file containning the positions I wouldn't have been looking for this .
    As a short example the first move for white in FEN would be:
    rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1

    So looking for a program to convert the whole game to this format and then to happily go on to converting a different game.<br><br>Post edited by: DKATyler, at: 2006/12/19 00:05

  4. #4
    Junior Member
    Join Date
    Dec 2006
    Posts
    4

    Re:PGN to FEN conversion

    Ach, re-read that post completly and noticed the pgn2fen program mention. I'll use that to do my conversions.

  5. #5

    Re:PGN to FEN conversion

    glad I could help :-)

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts