View Full Version : Explore File
Imagine Programming
08-13-2008, 08:56 AM
Hey folks, is there a way to explore the folder of the selected file and select that file?
i guess it is possible with Shell.Execute, but i am not sure,
thanks, CB
longedge
08-13-2008, 09:45 AM
How about something like -
strSplit = String.SplitPath("File") and then
strFolder= strSplit.Folder
File.Find (strFolder)
p.s. Just read your post again "explore the folder of the selected file and select that file", if you already have the file name can't you just use that?
Imagine Programming
08-13-2008, 09:51 AM
thanks, but i ment Explore the folder and select the file in that explorer window:)
longedge
08-13-2008, 10:02 AM
Ahh... Explorer command line switches are given here (http://support.microsoft.com/kb/130510) so you could just build it and then open a Windows Explorer window using the command line that you have built.
Imagine Programming
08-13-2008, 10:13 AM
great thanks!:)
the code :
result = File.Run(_WindowsFolder.."\\explorer.exe", "/select,\"calc.exe\"", "", SW_SHOWNORMAL, false);
i use this for other goals but this is nice:) thanks!
RizlaUK
08-13-2008, 10:17 AM
can also be done with "Shell.Execute" but i cant remember how :eek:
Imagine Programming
08-13-2008, 10:52 AM
can also be done with "Shell.Execute" but i cant remember how :eek:
lol that's exactly what i thought:P i have done it before but i can't find the project i used it in :wow
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.