I like to use the full path to the file and use the /SELECT switch.  This opens 
the folder AND selects the file.

on mouseUp

   set the hideConsoleWindows to true

   get shell("explorer.exe /SELECT," & quote & tPathToFile & quote)

end mouseUp


From: use-livecode <use-livecode-boun...@lists.runrev.com> on behalf of Klaus 
major-k via use-livecode <use-livecode@lists.runrev.com>
Sent: Saturday, June 19, 2021 3:50 PM
To: How to use LiveCode <use-livecode@lists.runrev.com>
Cc: Klaus major-k <kl...@major-k.de>
Subject: Re: Open a folder on the desktop from a LiveCode app

 CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.

Hi Paul,

> Am 19.06.2021 um 20:48 schrieb Paul Dupuis via use-livecode 
> <use-livecode@lists.runrev.com>:
> What is the "best" way (or any way) to open a folder on the Windows desktop 
> from a Livecode script.
> For example:
> on openFolder pPath -- where pPath is the path and name to a document (file)
>   set itemDel to slash
>   delete last item of pPath -- leaves the the path to the folder containing 
> the document
>   -- now, how do I open this on the desktop (i.e in Explorer)?

launch document pPath
## :-)

> end openFolder



use-livecode mailing list
Please visit this url to subscribe, unsubscribe and manage your subscription 

Reply via email to