0

Is there a way to insert a password to a wallet.dat file from windows cmd?

I'm a newbie, so please be as specific as you can.

That wallet.dat file needs rescan, which I want to make after I insert the password. This I can't do from bitcoin core gui (version 0.22), since once running it starts rescanning immediately and so no menu appears and I can't do anything till it's finished the rescan.

Thanks

2 Answers 2

2

Is there a way to insert a password to a wallet.dat file from windows cmd?

  1. Run cmd
  2. Change directory to run bitcoind.exe. If Windows is installed in C drive:
    cd "C:\Program Files\Bitcoin\daemon"
    
    
  3. Open another command prompt, change directory to above path and run this command:
    bitcoin-cli.exe walletpassphrase "my pass phrase" 60
    
    
    https://bitcoincore.org/en/doc/0.21.0/rpc/wallet/walletpassphrase/

You can also do this using PowerShell. However I am not sure if this will help with rescan issue.

1
  • Thanks @Prayank ! You can check my answer for how I did it
    – mikest
    Commented Dec 30, 2021 at 10:59
2

Using the info @Prayank provided, I managed to do it the following way:

Run first cmd session and changed directory to where bitcoind.exe resides. Then run bitcoind.exe

Run second cmd session, changed directory to the same one as above and then run

bitcoin-cli loadwallet directory_where_wallet.dat_resides

bitcoin-cli encryptwallet "my pass phrase"

1
  • Cool. I think I misunderstood earlier and was not aware that wallet is not encrypted already.
    – user103136
    Commented Dec 30, 2021 at 11:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.