The quote in question is indeed by von Moltke The Elder, not Napoleon. This is a condensed version of a longer remark he made in his writings on the Franco-Prussian War:
"No operation plan extends with any certainty beyond the first encounter with the main body of the enemy. It is only the layman who, as a campaign develops, thinks he sees the original plan being systematically fulfilled in every detail to its preconceived conclusion."
I think everyone would agree that the shorter version captures the essence of what he meant however.