[python-win32] Find Target

2008-04-03 Thread Rickey, Kyle W
I am trying to figure out how to show a specified file in explorer. I know I can call os.startfile(directory) to show the containing directory, but I would like the file to be selected also. Is there an API call that windows makes to do this? For example, right click on a shortcut and go to

Re: [python-win32] Find Target

2008-04-03 Thread Rickey, Kyle W
:[EMAIL PROTECTED] On Behalf Of Tim Roberts Sent: Thursday, April 03, 2008 11:42 AM To: Python-Win32 List Subject: Re: [python-win32] Find Target Rickey, Kyle W wrote: I am trying to figure out how to show a specified file in explorer. I know I can call os.startfile(directory) to show

Re: [python-win32] Find Target

2008-04-03 Thread Tim Roberts
Rickey, Kyle W wrote: Tim, let me rephrase. I'm not trying to display the shortcut dialog, only reproduce the behavior that happens when you click 'Find Target'. For instance, I've generated a file and I want show the user that file in explorer. Find Target just follows a shortcut and

Re: [python-win32] Find Target

2008-04-03 Thread Scott Nelson
Kyle, If I understand you correctly, and if your not stuck on using os.startfile(), you can use explorer.exe's command line options to do this (and more). os.system('%SystemRoot%\explorer.exe/e,/select=C:\MyFolder\subfolder\MyFile. txt') See thisfor more info:

Re: [python-win32] Find Target

2008-04-03 Thread Tim Roberts
Rickey, Kyle W wrote: Tim, thanks for your patience :). I think I'm still miscommunicating to you what I need to do. Let's throw the whole shortcut idea out the window and start from scratch. My code generates a file, I want to open the directory (which is known) containing that file and