I was working on a problem today that required matching up the 3-letter codes KEGG uses for identifying genomes to the NCBI RefSeq codes used for DNA molecules in the genomes I'm working with (e.g. NC_031415). Because I couldn't find such a mapping file I had to do it myself. Here's how.
Then, I used lftp to find all of the RefSeq files within each directory. I just chose the '.rpt' files, any of the unique files would do. I parsed the resulting file to get the ftp directory name and the RefSeq ID.
Then, I joined the two files on their common column: the NCBI ftp directory name. I don't care about the directory name so then I make a new file without it.
From here I've written a script (download: idreplacer) that uses the lproks_1.txt and lproks_2.txt files provided by NCBI to interconvert names and IDs.
et voila! Here's the final KEGG to RefSeq ID mapping file.