Open file explorer to specific directory?

Started by MikeinFL, July 22, 2020, 06:05:20 PM

Previous topic - Next topic

MikeinFL

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



Ken Sproul

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+"\."
Ken Sproul
DPI Information Service, Inc.
Pivotal Systems LLC

MikeinFL

Works!  I was trying everything but never but the "." at the end!  thanks!

Quote from: ksproul 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+"\."

Mike King

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.
Mike King
President - BBSysco Consulting - http://www.bbsysco.com
eMail: mike.king@bbsysco.com