Post
Topic
Board Bitcoin Technical Support
Re: EXCEPTION: St9bad_alloc std::bad_alloc bitcoin in ProcessMessages()
by
shorena
on 17/01/2016, 16:44:26 UTC
as far as i know exporting privatekey can only be done one by one through API.

Cant you use bumpwallet?

Code:
dumpwallet "filename"

Dumps all wallet keys in a human-readable format.

Arguments:
1. "filename" (string, required) The filename

Examples:
> bitcoin-cli dumpwallet "test"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "dumpwallet", "params": ["test"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

It would give you a nice file that you can split by # of lines (mind the header though) and reimport into different wallet files via a short script.