geth --exec command does not work with transactions?

Im trying to run

geth --exec "web3.eth.sendTransaction({from: web3.eth.coinbase, to: '0x2d96cefbdec4c5a6ea88d9496fdeddefa561adcd', value: web3.toWei(1, 'ether'), gas:21000});"

or

geth --exec "web3.eth.sendTransaction({from: web3.eth.coinbase, to: '0x2d96cefbdec4c5a6ea88d9496fdeddefa561adcd', value: web3.toWei(1, 'ether'), gas:21000});" attach

from a .bat file

But it doesnt work

I would like to have a command that sends the entire wallet in one transaction to another adress. But this will do for now.

What would you do to solve this?
Sign In or Register to comment.