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 <[email protected]> on behalf of Klaus
major-k via use-livecode <[email protected]>
Sent: Saturday, June 19, 2021 3:50 PM
To: How to use LiveCode <[email protected]>
Cc: Klaus major-k <[email protected]>
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
> <[email protected]>:
>
> 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
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode