PxPlus User Forum

Main Board => Discussions => Programming => Topic started by: MikeinFL on July 22, 2020, 06:05:20 PM

Title: Open file explorer to specific directory?
Post by: MikeinFL on July 22, 2020, 06:05:20 PM
How to programmatically open file explorer to a specified directory?  Not asking to chose a file or directory like   GET_FILE_BOX does but to have explorer just open.  SYSTEM_HELP EXPLORER.EXE opens explorer but I don't see how to indicate a path directory to open to.

Mike


Title: Re: Open file explorer to specific directory?
Post by: Ken Sproul on July 22, 2020, 06:59:29 PM
Try using system_help with the folder you want to open +"\.":
For example, this should open the current working directory of the pxplus server or windx session:
system_help lwd+"\."
Title: Re: Open file explorer to specific directory?
Post by: MikeinFL on July 22, 2020, 08:34:12 PM
Works!  I was trying everything but never but the "." at the end!  thanks!

Try using system_help with the folder you want to open +"\.":
For example, this should open the current working directory of the pxplus server or windx session:
system_help lwd+"\."
Title: Re: Open file explorer to specific directory?
Post by: Mike King on July 24, 2020, 10:04:35 AM
Just thought I'd post this...

On my system I have the following program saved in _cmd/shex in my starting directory:

0010 ENTER x$,ERR=*NEXT
0020 LET x$=STP(x$,2)
0030 IF x$="" THEN LET x$=LWD
0040 INVOKE "explorer "+x$
0050 END

This allows me at PxPlus command line to simply enter shex or shex directory and to have the Windows Explorer open.

You could also put this in *cmd/shex for system wide usage.

Note: It would need some tweaking to work under WindX.