PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Open file explorer to specific directory?  (Read 1087 times)

MikeinFL

  • Silver Member
  • ***
  • Posts: 35
    • View Profile
Open file explorer to specific directory?
« 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



Ken Sproul

  • Gold Member
  • ****
  • Posts: 60
    • View Profile
Re: Open file explorer to specific directory?
« Reply #1 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+"\."
Ken Sproul
DPI Information Service, Inc.
Pivotal Systems LLC

MikeinFL

  • Silver Member
  • ***
  • Posts: 35
    • View Profile
Re: Open file explorer to specific directory?
« Reply #2 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+"\."

Mike King

  • Diamond Member
  • *****
  • Posts: 3811
  • Mike King
    • View Profile
    • BBSysco Consulting
Re: Open file explorer to specific directory?
« Reply #3 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.
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com