Re: How to open a windows folder ?



How can I open Windows Explorer, and automatically select a file? I see
several software in Delphi can do this, but couldn't found any
documentation about.

Example: I want to open in Windows Explorer the file c:\tmp\file.txt

The function to open the "c:\tmp" folder is posted here, but how can I
do the opened Windows Explorer to "point"/select the "file.txt" file?
Is there a code example?

Thanks in advance

Daniel


Nicholas Sherlock wrote:
> Robert Puts wrote:
> > I need to open a windows folder (not the windows open dialog, but the actual
> > folder) from within delphi, something like
> >
> > cFld:="C:\Windows\System32";
> > OpenFolder(cFld);
>
> Easy, use shellexecute!
>
>
> uses shellapi;
> begin
> shellexecute(handle,'open','C:\windows\system32',nil,nil,sw_shownormal);
> end;
>
> Cheers,
> Nicholas Sherlock

.



Relevant Pages

  • Searching for Delphi code snippets using Vistas Windows Explorer?
    ... Are others able to search for strings in Delphi .pas files using Windows ... Windows Explorer in Vista Ultimate ...
    (comp.lang.pascal.delphi.misc)
  • Re: Delphi 2005 Faster
    ... > I have discovered a similar problem: if I start Delphi 2005, ... > delete my paging file using Windows Explorer, it hangs the whole system! ...
    (borland.public.delphi.non-technical)
  • Re: closing paradox table
    ... Or, perhaps, Delphi? ... Through a feature in the ... Windows Explorer? ... Tony McGuire ...
    (comp.databases.paradox)
  • Re: How to open a windows folder ?
    ... How can I open Windows Explorer, ... several software in Delphi can do this, ... documentation about. ... Prev by Date: ...
    (comp.lang.pascal.delphi.misc)
  • Re: Attachment Location question
    ... Well since the folder the attachment was copied into ... Explorer search (that ... >> However, when I check that location using Windows Explorer, no sub-folder ... >> exist within the Temporary Internet Files either. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)