Reveal in Find on Windows

Roger Eller roger.e.eller at sealedair.com
Thu Feb 23 06:53:10 EST 2017


Launch document is good, but the OP wants to simply open a folder, and as
stated in his first post, reveal or select a specific file.  I'll try the
handler on Windows when I get to the office.

~Roger

On Feb 22, 2017 10:45 PM, "Mike Bonner via use-livecode" <
use-livecode at lists.runrev.com> wrote:

> Just remembered, you can bipass the shell call entirely..
>
> launch document sRootFolder -- native lc command.  Just need to do as I
> mentioned and be sure its a folder you're dealing with. (otherwise it will
> launch the apropos app to match the file type)
>
> It will probably work for both platforms. (my mac is down or I'd check
> there)
>
> On Wed, Feb 22, 2017 at 8:41 PM, Mike Bonner <bonnmike at gmail.com> wrote:
>
> > I can't test it on mac, but 2 things. First, if your path is a folder but
> > doesn't have the trailing / you'll end up in the wrong place so you might
> > consider doing a check:
> > if there is a file sRootFolder then delete item -1 of sRootFolder
> >
> > Then for the windows segment use "start":
> >
> > put ("start " & sRootFolder) into tShell  -- also noted there is a typo,
> > you use tRootfolder rather than sRootfolder in your example above
> >
> > I _think_ start is available all the way down to xp, but I can't check to
> > make sure.
> >
> >
> > On Wed, Feb 22, 2017 at 8:06 PM, Sannyasin Brahmanathaswami via
> > use-livecode <use-livecode at lists.runrev.com> wrote:
> >
> >> this is what I have so far…
> >>
> >> command openWorkingFolderInFinder pFolderFile
> >>     set the itemdel to "/"
> >>     put pFolderFile into sRootFolder
> >>     delete item -1 of sRootFolder
> >>     switch platform()
> >>         case "MacOS"
> >>             put ("open " & quote & sRootFolder & quote) into tShell
> >>             break
> >>         case "Win32"
> >>             put ("explorer.exe /n/root," & tRootfolder) into tShell
> >>             break
> >>     end switch
> >>     get shell(tShell)
> >> end openWorkingFolderInFinder
> >>
> >> Can anyone test if this opens a folder on Windows?
> >>
> >> tks
> >>
> >>
> >> On 2/22/17, 4:59 PM, "use-livecode on behalf of Sannyasin
> >> Brahmanathaswami via use-livecode" <use-livecode-bounces at lists.
> runrev.com
> >> on behalf of use-livecode at lists.runrev.com> wrote:
> >>
> >>     OK  I studied the doc here:
> >>
> >>     https://support.microsoft.com/en-us/help/130510/command-line
> >> -switches-for-windows-explorer
> >>
> >>     and actually the use cases are more often to open a folder
> >>
> >>     but I don't have windows to test
> >>
> >>     does this work to open a folder window on Win32?
> >>
> >>     get shell (”explorer.exe /n,/root,c:\windows\system32\m
> >> y-project-folder")
> >>
> >>
> >>     BR
> >>
> >>
> >>
> >>     On 2/22/17, 1:54 AM, "use-livecode on behalf of Roger Eller via
> >> use-livecode" <use-livecode-bounces at lists.runrev.com on behalf of
> >> use-livecode at lists.runrev.com> wrote:
> >>
> >>         get shell (”explorer.exe /select,c:\windows\system32\se
> >> lected_file.txt")
> >>
> >>         Source:
> >>         http://stackoverflow.com/questions/29970897/cmd-file-tasks-
> >> open-directory-and-select-file
> >>
> >>         ~Roger
> >>
> >>
> >>
> >> _______________________________________________
> >> use-livecode mailing list
> >> use-livecode at lists.runrev.com
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >
> >
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list