Unless they are super-intelligent nanobots that somehow know what is a battery that would just lead to alot of fried circuits etc (and possibly people if the amount of electricity released was strong enough and sustained for any period of time). But then again it's magic (as opposed to more...