views:

335

answers:

1

In Python, how to jump to file in Windows Explorer (like in Winamp)? I found a solution for jumping to folders:

import subprocess
subprocess.Popen('explorer "C:\path\of\folder"')

but I have no solution for files. Please help.

+9  A: 

From Explorer.exe Command-Line Options for Windows XP

import subprocess
subprocess.Popen(r'explorer /select,"C:\path\of\folder\file"')
Blair Conrad
Thanks !! Been hacking my brain over this one..
gpgemini