How do I find a renamed wallet whose name I can't remember?

5

I bought BTC in 2011 and renamed my wallet.dat to something else that I cannot remember. How can I find my wallet file on my computer? I'm prepared to use the command line and scripting.

phan

Posted 2013-11-20T17:20:08.890

Reputation: 151

What operating system are you using?Nate Eldredge 2013-11-20T22:21:58.770

I'm using Windows 7.phan 2013-11-25T15:00:09.267

Answers

2

Place to start - use the linux "file" command, which will show the following for a bitcoin wallet (at least in the client I use)

wallet.dat: Berkeley DB (Btree, version 9, native byte-order)

So - you could run something like:

find / -type f exec file '{U}' \; | grep "Berkeley DB"

That would be a start!

Geoff Maciolek

Posted 2013-11-20T17:20:08.890

Reputation: 21

This worked for me: find / -type f | xargs file | grep "Berkeley DB (Btree, version 9, native byte-order)"Gareth Davidson 2013-11-25T04:29:47.090

My wallet file is on Windows 7. I don't use Linux. :(phan 2013-11-25T15:00:45.943

Well - you could install "cygwin" and execute the command there (it's more or less a linux environment for windows) - or you could figure out the header and paste it into the "content" part of the Windows search.

Or you could boot from a linux LiveCD / LiveUSB! – Geoff Maciolek 2013-11-25T22:39:28.557

2

In Windows 7 download and install Altap Salamander 2.54 (Google for it)

It's file manager (you can use any other file manager as well)

Then press Ctrl and key F to bring search window

Then set all options exactly as in this screen: http://s21.postimg.org/5qdx5cb1j/search.png

In Containing field enter: name"1 (each wallet has this text inside) and then click: Find Now

It takes a while to search entire disc C:

To speed up the process You can setup also Advanced options - see this screen: http://s21.postimg.org/xzb01t1wn/advanced.png

(I presume that Your wallet size is from 30KB to 10MB. If not change second value)

Smart

Posted 2013-11-20T17:20:08.890

Reputation: 21

Thanks for your comment. I noticed your png file shows search results only ending in .dat. I believe I renamed my wallet file something innocuous like config.sys. In that scenario, will the Find function still find the wallet file, or does it depend on the extension ending in .dat? Also, if I find it I WILL tip you, not sure why you edited that comment out. :) You'd deserve it.phan 2013-11-28T03:56:07.577

1

Write a script (e.g. Perl, Python, Ruby... ) that opens every file on your computer and looks inside it to check the format. I'm not sure what that format is exactly. It may be as simple as a certain constant sequence of bytes at the beginning (a so-called "magic number").

RentFree

Posted 2013-11-20T17:20:08.890

Reputation: 2 391

How do I "check the format". I can write scripts but I have no idea how to do those 3 words, "check the format".phan 2013-11-22T16:37:11.110

First you have to find out what the wallet.dat format is... is there a "magic number" at the beginning that identifies it? Many file formats have such a magic number. If so, your script must open each file in binary reading mode and read the length of bytes that would be in the magic number and see if it matches the particular bytes for the wallet.dat magic number. You may be able to use PyWallet (https://en.bitcoin.it/wiki/Pywallet) as a helper from your script. Or at least you could look at the source for Pywallet to see if there are any clues about the existence of a magic number.

RentFree 2013-11-22T16:47:52.597