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.
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.
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.