<p>A script exists on GitHub by the name of <a href="https://github.com/rhelwig/coinsweep/tree/master/coinsweep/coinsweeper" rel="nofollow">coinsweep</a>.</p>

CC BY-SA 3.0
2014-07-20T02:09:46.833Z
2014-07-20T02:09:46.833Z
gosuto
<p>If I have a bulk wallet with, say 100000 key pairs (address/private key) and I have received payments on any, say 1000 of them, how can I sweep all the coins to a new address? It would be even better if I can do it from the command line, for example <code>&gt; sweep keypairs.txt 1Q7nrZ7PGWTtKVkQk1mLZovbJKEfLubXtv</code> and all the available coins are transacted to the destination address. The format is for example:</p>

<pre><code>1,"1E4MuBWjv2qZeJH5ti9ig5XMoJHQF63cdX","5JmLyBtdFEaKefsFXPd9E9PmbvT8JogG1V6Yer5jmZ9MX6bXP88"
2,"1BhJsijfGxwbzKgkQj5hRLDnBkmX2Y1RNN","5K5BBepZgaq8n9sJrsoM5inEWCX7W8bh7U8fr2wSP1PAkseasdQ"
3,"1ATP4LHYxqCZhDva661SLWJoN3vdNE2u1J","5JchXy3Y97F3TjaHsMJmyaaik1Gd4DpLP15PegbcvcZ5u2HBJg7"
...
100000,"17GX2ZFSpDip3BR6jMYP5He53tPMZqpSSG","5JyZsU9K2kokXzJQjg5F7mormCcwiPBcBjD3UZXHNwMSPuDGCNK"
</code></pre>

CC BY-SA 3.0
2014-07-14T14:14:38.040Z
Related: [How can I combine all the tiny amounts I've received to minimise transaction fees, and do I need to?](http://bitcoin.stackexchange.com/q/5583/5406)
Murch
CC BY-SA 3.0
2014-07-14T14:27:40.710Z
@Murch, thanks, yes, this is related but the focus in my case is on the large amount of keys with not so tiny transactions. The "dust" is not a problem here, but how to poll all the keys and spend the (say)1% of them that are not empty. This is used to periodically collect per-user unique addresses to cold storage.
Hristo Hristov
<wallet><spending>
How to sweep a bulk wallet?
Hristo Hristov
# How to sweep a bulk wallet?

(Asked by: username_0 on 2014-07-14)

If I have a bulk wallet with, say 100000 key pairs (address/private key) and I have received payments on any, say 1000 of them, how can I sweep all the coins to a new address? It would be even better if I can do it from the command line, for example > sweep keypairs.txt 1Q7nrZ7PGWTtKVkQk1mLZovbJKEfLubXtv and all the available coins are transacted to the destination address. The format is for example:
1,"1E4MuBWjv2qZeJH5ti9ig5XMoJHQF63cdX","5JmLyBtdFEaKefsFXPd9E9PmbvT8JogG1V6Yer5jmZ9MX6bXP88"
2,"1BhJsijfGxwbzKgkQj5hRLDnBkmX2Y1RNN","5K5BBepZgaq8n9sJrsoM5inEWCX7W8bh7U8fr2wSP1PAkseasdQ"
3,"1ATP4LHYxqCZhDva661SLWJoN3vdNE2u1J","5JchXy3Y97F3TjaHsMJmyaaik1Gd4DpLP15PegbcvcZ5u2HBJg7"
...
100000,"17GX2ZFSpDip3BR6jMYP5He53tPMZqpSSG","5JyZsU9K2kokXzJQjg5F7mormCcwiPBcBjD3UZXHNwMSPuDGCNK"

**Tags:** wallet, spending

> **Comments:**
> **username_1**: Related: [How can I combine all the tiny amounts I've received to minimise transaction fees, and do I need to?](http://bitcoin.stackexchange.com/q/5583/5406)  
> **username_0**: @username_1, thanks, yes, this is related but the focus in my case is on the large amount of keys with not so tiny transactions. The "dust" is not a problem here, but how to poll all the keys and spend the (say)1% of them that are not empty. This is used to periodically collect per-user unique addresses to cold storage.  

---

## 1 answers

### Answer by username_2 on 2014-07-20. Score: 1

A script exists on GitHub by the name of [coinsweep](https://github.com/rhelwig/coinsweep/tree/master/coinsweep/coinsweeper).


---

