Open a folder on the desktop from a LiveCode app

Eller, Roger roger.e.eller at sealedair.com
Wed Jun 23 14:43:11 EDT 2021


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

~Roger




________________________________
From: use-livecode <use-livecode-bounces at lists.runrev.com> on behalf of Klaus major-k via use-livecode <use-livecode at lists.runrev.com>
Sent: Saturday, June 19, 2021 3:50 PM
To: How to use LiveCode <use-livecode at lists.runrev.com>
Cc: Klaus major-k <klaus at 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 at 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

Best

Klaus




More information about the use-livecode mailing list