Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Lightning1 on April 19, 2023, 09:52:50 AM



Title: Please help changing directory to which the blockchain is saved on my computer
Post by: Lightning1 on April 19, 2023, 09:52:50 AM
Hello Bitcoin Forum,

This is my second topic posted here.

I would like to change where the blockchain from Bitcoin Core is saved on my windows computer but have not figured out how to do it. Could someone here please help me?

I thought it would be a simple thing to do, but I have not figured it out.

Lightning1


Title: Re: Please help changing directory to which the blockchain is saved on my computer
Post by: hosseinimr93 on April 19, 2023, 10:20:12 AM
Right-click on the shortcut to bitcoin-qt.exe, go to "Properties" and add the following command at the end of "target".

Code:
-datadir=YourNewLocation


Assuming you want to change the directory to a folder named ABC in drive D, the target should be set as follows.

Code:
"C:\Program Files (x86)\Bitcoin\bitcoin-qt.exe" -datadir=d:\ABC

OR:

Code:
"C:\Program Files\Bitcoin\bitcoin-qt.exe" -datadir=d:\ABC


Title: Re: Please help changing directory to which the blockchain is saved on my computer
Post by: nc50lc on April 21, 2023, 04:15:06 AM
I would like to change where the blockchain from Bitcoin Core is saved on my windows computer but have not figured out how to do it. Could someone here please help me?
If you're using the GUI, you can set it in the "Welcome Screen" where you've initially set the data directory and other settings.
To launch Bitcoin Core with it, start Bitcoin-qt with the command line option: -choosedatadir
The advantage of this is you don't have to use a specific shortcut with the -datadir command line option.

Here's a simple guide to do it:
  • Go to Bitcoin Core's install directory, it's in "C:\Program Files\Bitcoin" by default. (copy the path for the next step)
  • Open 'Command Prompt' (use search if you can't find it) and 'Change Directory' to the dir above using the command: cd "C:\Program Files\Bitcoin"
  • Then start Bitcoin Core's GUI with the said command line option using the command: bitcoin-qt.exe -choosedatadir
  • The Welcome Screen will open where you can set the datadir.

Take note that your old data directory wont be automatically moved to the newly set dir, you'll have to manually move everything in it.


Title: Re: Please help changing directory to which the blockchain is saved on my computer
Post by: MCUKing on May 05, 2023, 06:16:50 AM
Here's a simple guide to do it:
  • Go to Bitcoin Core's install directory, it's in "C:\Program Files\Bitcoin" by default. (copy the path for the next step)
  • Open 'Command Prompt' (use search if you can't find it) and 'Change Directory' to the dir above using the command: cd "C:\Program Files\Bitcoin"
  • Then start Bitcoin Core's GUI with the said command line option using the command: bitcoin-qt.exe -choosedatadir
  • The Welcome Screen will open where you can set the datadir.

Take note that your old data directory wont be automatically moved to the newly set dir, you'll have to manually move everything in it.

Hmm senior guided well in detail but keep in mind before doing this you must completely close the Bitcoin Core. As of now, you can use the new directory but  Also as the senior said the Old data directory data needed to be manually moved. for this, again don't forget to close the Bitcoin core and then you'll need to copy the entire old directory content you can find by default old data using this route;
 
Code:
"C:\Users<username>\AppData\Roaming\Bitcoin"