I have a big problem. I have a list of files that my script find and
list them in a little gui.
I need this function:
when i d-click on each item, I want explorer opens and selects that
item inside windows explorer.
like that beautiful buttom in iTunes.
what is that trick?
Thanks in advane.
Farshid Ashouri.
-
import os
-
os.system("c:/windows/explorer.exe")
-
this opens the exlorer
you must know the file path/file name in your application which you want to show in explorer, when you have made that code, use
os.system("c:/windows/explorer.exe /select,c:\test.txt")
this would now open explorer and select "test.txt"
I would prefer to use /n option also...
os.system("c:/windows/explorer.exe /n,/select,c:\test.txt")
now it removes that nasty file tree view from the left ^^
more info about windows explorer.exe
http://support.microsoft.com/kb/130510
ofcourse this isn't the perfect solution, because windows folder must be at c:/windows for this to work... I think that you can check where's your windows folder using os module, but I'm not sure