Is there a way to automatically send bitcoins from one wallet to another?

17

4

Say I have 2 wallets, an older non-encrypted one and a fresh new encrypted wallet with all new addresses. If I have an address in the older wallet that may receive some bitcoins in the future is there away to set it up so that these bitcoins will automatically be sent to an address in the new encrypted wallet. Or do I have to keep my old wallet for ever in case an address in it receives some bitcoins and then manually send them on to the new wallet.

kirian

Posted 2011-10-12T21:14:20.067

Reputation: 3 179

Answers

9

You may use /etc/crontab on your Ubuntu:

* * * * * root /usr/local/bin/bitcoin_resender

And script shall looks like:

$ cat /usr/local/bin/bitcoin_resender
#!/bin/bash
if [ $(echo "$(bitcoind getbalance) > 0" | bc) -eq 1 ];then
      bitcoind sendtoaddress YOUR_NEW_ADDRESS $(bitcoind getbalance) "Comment for resender"
fi

It will check every minutes your bitcoind balance and resend each bitcoins to YOUR_NEW_ADDRESS.

user6203

Posted 2011-10-12T21:14:20.067

Reputation:

4

Short answer, no you can not make it automatically forward. You'd have to setup a script that checked the old wallet (bitcoind loaded with that wallet) for a balance and have it transfer to the new one after that.

tysat

Posted 2011-10-12T21:14:20.067

Reputation: 1 421

3

If you import the private key into Mt. Gox, they will then monitor that address and sweep any payments received into your Mt. Gox exchange account balance.

Stephen Gornick

Posted 2011-10-12T21:14:20.067

Reputation: 26 118

3

There is a tool to import/export addresses from one wallet to another called Pywallet. You can use it to export all address from your old wallet and import then into the new one, and then run bitcoin with -rescan option to update balance.

EDIT: Just went through the forum thread, it seems that Pywallet doesn't work yet with 0.4 encrypted wallet, so might have to wait a bit for the update.

Serith

Posted 2011-10-12T21:14:20.067

Reputation: 5 220

PyWallet 1.2 supports AES encryption/decryption now (github).

Joric 2012-02-06T09:25:52.303