Any respectable battle between Batman and Thor would unquestionably bring about Batman's demise inside seconds. That being said, Batman loves to play a bit dirty and is not above cheating if he needs to. This could work in his advantage.
Remember that time Batman pulled that stunt on Wonder Woman with the nanite injection? we could well see the Dark Knight whip out that tactic and hypnotizing Thor into believing that he's fighting a somewhat virtual or mirrored opponent. Thor with his ' Never give up' attitude would surely just keep fighting himself to exhaustion, Leaving Batman with an advantage.
Also, Batman could feed on Thor's ego and demand they fight like men without weapons and just bare fists, AND with any luck Batman could make a swift move picking up Mjölnir (Thor's Hammer), and hammering the crap out of the big man. This, taking into account that Batman CAN actually pick it up, However, Beta-Ray Bill and Wonder Woman were worthy enough to lift Thor's hammer, Maybe, Just Maybe Batman might be able to as well...
But is that a risk worth taking?
How do you think Batman could defeat Thor?