user111967: I would like to new address generate with this command
bitcoin-cli -testnet getnewaddress "adr1" "p2sh-segwit"  but I get this msg:
error message:
Wallet file not specified (must request wallet RPC through /wallet/<filename> uri-path).
Try adding "-rpcwallet=<filename>" option to bitcoin-cli command line. 

then I added the -rpcwallet command like that:
bitcoin-cli -testnet -rpcwallet=/home/bitcoin/.bitcoin/ getnewaddress "adr1" "p2sh-segwit"  but I got an error again like this:
error message:
Requested wallet does not exist or is not loaded````

what should I do?

thank you


user48884: -rpcwallet takes the name of the wallet, not the path to the datadir (as you appear to have done) or the path to the wallet file.
To get a list of the names of the wallets currently loaded, you can use the listwallets command.

111967: <p>I would like to new address generate with this command</p>
<p><code>bitcoin-cli -testnet getnewaddress &quot;adr1&quot; &quot;p2sh-segwit&quot; </code> but I get this msg:</p>
<pre><code>error message:
Wallet file not specified (must request wallet RPC through /wallet/&lt;filename&gt; uri-path).
Try adding &quot;-rpcwallet=&lt;filename&gt;&quot; option to bitcoin-cli command line. 
</code></pre>
<p>then I added the -rpcwallet command like that:
<code>bitcoin-cli -testnet -rpcwallet=/home/bitcoin/.bitcoin/ getnewaddress &quot;adr1&quot; &quot;p2sh-segwit&quot; </code> but I got an error again like this:</p>
<pre><code>error message:
Requested wallet does not exist or is not loaded````

what should I do?

thank you
</code></pre>
 48884: <p><code>-rpcwallet</code> takes the name of the wallet, not the path to the datadir (as you appear to have done) or the path to the wallet file.</p>
<p>To get a list of the names of the wallets currently loaded, you can use the <code>listwallets</code> command.</p>
