title: How to use Windows File Explorer to select and return a directory using Python?
body: <p>I have a script that takes files off of remote network nodes and saves them to a remote drive.  Right now, my scripts require a hard coded destination for its location, for example:</p>
  <pre><code>dest_path_cfg = f&quot;G:\\path\\to\\my\\folder&quot;
  </code></pre>
  <p>I would like to update this script so that a user running it could select the folder that they wanted to use to save files via File Explorer.  I've seen how I can use:</p>
  <pre><code>import subprocess
  subprocess.Popen(r'explorer /select,&quot;C:\path\of\folder\file&quot;')
  </code></pre>
  <p>to open a file explorer window to a given directory, but I'm not sure how to use subprocess to allow a user's selection to be returned to the python script so that it can be acted on later.</p>
  <p>Right now I'm only looking at Windows compatibility, but I would like to add Mac/Linux flexibility in the future.</p>