Skip to content

Instantly share code, notes, and snippets.

@MattWoodhead
MattWoodhead / ExplorerOnItem.py
Created June 25, 2017 14:21
Open windows explorer with a specific folder or file selected
import subprocess
def explorer_on_file(url):
""" opens a windows explorer window """
subprocess.Popen(f'explorer /select,"{url}"')
explorer_on_file(r"C:\Python\python.exe")