<p>Do not use backslash and space symbols in folder name</p>

CC BY-SA 4.0
2018-12-02T04:59:24.593Z
2018-12-02T04:59:24.593Z
amaclin
<p>I just encountered this issue, too, and removing spaces (escaped or otherwise) appears to have solved the issue.</p>

<p>Like the OP, I was using a path containing <code>Application\ Support</code>. </p>

<p><code>$HOME/Library/Application\ Support/Bitcoin</code> is the MacOS default, though, so hopefully most people won't need to set that explicitly.  </p>

CC BY-SA 4.0
2018-12-20T05:17:45.250Z
Curiously, though, `datadir` seems to be autogenerated in my `bitcoin.conf` file every time I run `bitcoind`. 

That leads to issues on future runs whenever I'm using the default path, which contains `Application Support`
CypherPoet
CC BY-SA 4.0
2018-12-20T04:37:40.590Z
2018-12-20T04:37:40.590Z
CypherPoet
<p>anyone ever had a similar issue where the directory exists but bitcoin-cli isn't recognizing it? Perhaps this is related to me setting the folder up as a symlink to my external HDD? </p>

<p>Thank you!
aaronson</p>

<pre><code>-Mac-mini:~ $ bitcoin-cli -regtest generate 1
Error reading configuration file: specified data directory "/Users/---/Library/Application\ Support/Bitcoin" does not exist.
-Mac-mini:~ $ cd /Users/---/Library/Application\ Support/Bitcoin
-Mac-mini:Bitcoin $ ls
banlist.dat bitcoind.pid    chainstate  db.log      peers.dat
bitcoin.conf    blocks      database    debug.log   wallet.dat
</code></pre>

CC BY-SA 4.0
2018-11-30T19:12:46.260Z
Do not use backslash and space symbols in folder name
amaclin
CC BY-SA 4.0
2018-12-01T18:02:16.670Z
@aaronson If that was the solution, can either of you turn it into an answer so it can be marked accepted?
Pieter Wuille
<api><bitcoin-cli>
Specified data directory does not exist - but it does...
aaronson
# Specified data directory does not exist - but it does...

(Asked by: username_0 on 2018-11-30)

anyone ever had a similar issue where the directory exists but bitcoin-cli isn't recognizing it? Perhaps this is related to me setting the folder up as a symlink to my external HDD? 
Thank you!
username_0
-Mac-mini:~ $ bitcoin-cli -regtest generate 1
Error reading configuration file: specified data directory "/Users/---/Library/Application\ Support/Bitcoin" does not exist.
-Mac-mini:~ $ cd /Users/---/Library/Application\ Support/Bitcoin
-Mac-mini:Bitcoin $ ls
banlist.dat bitcoind.pid    chainstate  db.log      peers.dat
bitcoin.conf    blocks      database    debug.log   wallet.dat

**Tags:** api, bitcoin-cli

> **Comments:**
> **username_1**: Do not use backslash and space symbols in folder name  
> **username_2**: @username_0 If that was the solution, can either of you turn it into an answer so it can be marked accepted?  

---

## 2 answers

### Answer by username_1 on 2018-12-02. Score: 1

Do not use backslash and space symbols in folder name


---

### Answer by username_3 on 2018-12-20. Score: 0

I just encountered this issue, too, and removing spaces (escaped or otherwise) appears to have solved the issue.

Like the OP, I was using a path containing `Application\ Support`.

`$HOME/Library/Application\ Support/Bitcoin` is the MacOS default, though, so hopefully most people won't need to set that explicitly.

> **Comments:**
> **username_3**: Curiously, though, `datadir` seems to be autogenerated in my `bitcoin.conf` file every time I run `bitcoind`.   That leads to issues on future runs whenever I'm using the default path, which contains `Application Support`  

---

