Import wallet.dat into a new Bitcoin-Qt client I had Bitcoin-Qt on my computer with several bitcoins in my wallet, using Vista. Then my computer crashed.  Finally I was able to get my computer fixed and download a new version of Bitcoin-Qt.  Now I would like to import my original wallet.dat from the old client which was encrypted into an new version of Bitcoin-Qt.  How do I do that?
First, close the Bitcoin-Qt client.
Then you have to locate your Bitcoin folder. For Windows, it should be here:
%APPDATA%\Bitcoin
and for Linux:
~/.bitcoin
In that folder, there should be a wallet.dat file.

If you currently have no bitcoins in your wallet, you can just delete that file and replace it with your backup.
If you have some bitcoins in this wallet as well, backup that wallet file as well, or send all the coins to an address from your backed up wallet.

When you placed the other wallet.dat file in place, you should run Bitcoin-Qt with the -rescan option. Here's how to do that in Windows:

Go to C:\Program Files (x86)\Bitcoin using Windows Explorer.

In that folder, hold shift and right-click and select Open command window here (picture).

In the command prompt, type bitcoin-qt.exe -rescan and hit enter (picture).


Now Bitcoin-Qt should start and rescan the blockchain to calculate the balances of the addresses in your wallet.dat file.
(Source for pictures: cant see bitcoin after restore of backup)