user-1: I want to use data directory from a different location (external SSD) on a Windows machine. When I save the path for it in bitcoin.conf it still uses old data directory. How can I use datadir in bitcoin.conf?
bitcoin.conf file:

datadir=F:\bitcoin-mainnet

debug.log logs:

2021-03-05T01:34:22Z Config file arg: datadir="F:\\bitcoin-mainnet"

It still uses old data directory which doesn't have data for a synced full node (mainnet):


user-1: This got resolved but not sure why specifying path in bitcoin.conf for datadir doesn't work.
Workaround:
Open "%UserProfile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Bitcoin Core"
Right click on "Bitcoin Core (64-bit)" and go to properties.
The target for this shortcut should be "C:\Program Files\Bitcoin\bitcoin-qt.exe" -datadir=F:\bitcoin-mainnet
OR
Open command prompt/powershell and run "bitcoin-qt.exe" with datadir path
C:\Program Files\Bitcoin>bitcoin-qt.exe -datadir="F:\bitcoin-mainnet"


-1: <p>I want to use data directory from a different location (external SSD) on a Windows machine. When I save the path for it in <code>bitcoin.conf</code> it still uses old data directory. How can I use <code>datadir</code> in <code>bitcoin.conf</code>?</p>
<p><code>bitcoin.conf</code> file:</p>
<pre>
datadir=F:\bitcoin-mainnet
</pre>
<p><code>debug.log</code> logs:</p>
<pre>
2021-03-05T01:34:22Z Config file arg: datadir="F:\\bitcoin-mainnet"
</pre>
<p>It still uses old data directory which doesn't have data for a synced full node (mainnet):</p>
<p><a href="https://i.stack.imgur.com/P5WcK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/P5WcK.png" alt="data-dir-info" /></a></p>
 -1: <p>This got resolved but not sure why specifying path in <code>bitcoin.conf</code> for <code>datadir</code> doesn't work.</p>
<p><strong>Workaround:</strong></p>
<p>Open &quot;<em>%UserProfile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Bitcoin Core</em>&quot;</p>
<p>Right click on &quot;Bitcoin Core (64-bit)&quot; and go to properties.</p>
<p>The target for this shortcut should be <em>&quot;C:\Program Files\Bitcoin\bitcoin-qt.exe&quot; -datadir=F:\bitcoin-mainnet</em></p>
<p><strong>OR</strong></p>
<p>Open command prompt/powershell and run &quot;bitcoin-qt.exe&quot; with <code>datadir</code> path</p>
<p>C:\Program Files\Bitcoin&gt;bitcoin-qt.exe -datadir=&quot;F:\bitcoin-mainnet&quot;</p>
<p><a href="https://i.stack.imgur.com/7u1Ty.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7u1Ty.png" alt="full-node-sync" /></a></p>
