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:
dest_path_cfg = f"G:\\path\\to\\my\\folder"
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:
import subprocess
subprocess.Popen(r'explorer /select,"C:\path\of\folder\file"')
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.
Right now I'm only looking at Windows compatibility, but I would like to add Mac/Linux flexibility in the future.