ZenHeathen<p>Gah. Since I've done any of this stuff years ago, everything's changed.</p><p>Hey, <a href="https://beige.party/tags/coding" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>coding</span></a> <a href="https://beige.party/tags/Windows" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Windows</span></a> <a href="https://beige.party/tags/batch" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>batch</span></a> peeps:</p><p>Trying to make a very short batch file to run a couple of commands. I will put the file into PATH, and all it is meant to do is to change my current directory to the one where my plain text notes live, and list the files, *and then, crucially, when the batch ends, leave me in that directory*. I want to open PowerShell, type the name of the batch file, and be left waiting in the directory where those notes live with them already listed, in one step.</p><p>Why does this not work:<br>cd c:\Users\username\FilesDir<br>cmd /r dir /w /o</p><p>The directory listing that's shown is for the right directory. But when the batch file ends, I'm still in the directory I was in when I called it. All the searching I'm doing is telling me that this should work. Why doesn't it?</p>