How to change directory using a variable in batch?
<p>I am trying to use a variable to change the current directory in a batch file.
The variable is set as Dan and there is a folder called Dan. It doesn't change though. Here is my code.</p>

<pre><code>cd C:\Users\%username%\AppData\Roaming\PBot\Profiles
set /p profilename=Enter your profile name:
cd %profilename%
</code></pre>