In a recent game Ryan Zimmerman actually hit the ball twice on his swing. Here is the play:

The question becomes is this anything other than a cool moment.
First place to check – is it a foul ball?
Here is the FOUL BALL definition:
A FOUL BALL is a batted ball that settles on foul territory between home and first base, or between home and third base, or that bounds past first or third base on or over foul territory, or that first falls on foul territory beyond first or third base, or that, while on or over foul territory, touches the person of an umpire or player, or any object foreign to the natural ground.
A foul fly shall be judged according to the relative position of the ball and the foul line, including the foul pole, and not as to whether the infielder is on foul or fair territory at the time he touches the ball.
I see nothing in that definition that supports this type of double hit as being a foul ball.
Ok, so is the batter out?
Section 6.05 has a few rules that are close to applying.
6.05 A batter is out when—
(g) His fair ball touches him before touching a fielder. If the batter is in a legal position
in the batter’s box, see Rule 6.03, and, in the umpire’s judgment, there was no intention to interfere with the course of the ball, a batted ball that strikes the batter or his bat shall be ruled a foul ball;(h) After hitting or bunting a fair ball, his bat hits the ball a second time in fair territory. The ball is dead and no runners may advance. If the batter-runner drops his bat and the ball rolls against the bat in fair territory and, in the umpire’s judgment, there was no intention to interfere with the course of the ball, the ball is alive and in play. If the batter is in a legal position in the batter’s box, see Rule 6.03, and, in the umpire’s judgment, there was no intention to interfere with the course of the ball, a batted ball that strikes the batter or his bat shall be ruled a foul ball;
Both of these definitions start with “after hitting a fair ball”. A ball that hits the bat and not the ground yet (or has not come to rest) is not a fair ball – yet. So, I don’t see either of these definitions applying.
The spirit of both of these rules is that the batter has interfered with the chance to get an out. On this type of double hit, there is no interference.
So, I don’t see a rules basis to call it anything other than a weird swing that made contact with the ball twice. Plus, in practical purposes, if an umpire can pick this up in real time, he has better eyes than me.
Bottom line, swinging and hitting the ball twice is much different than the bat striking the ball a second time once the swing is completed.
Plays like this are covered on page 40 of RuleGraphics. See examples and ordering information at our website.