PxPlus User Forum

Twitter Twitter Twitter

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

MikeinFL

  • Silver Member
  • ***
  • Posts: 25
    • 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



ksproul

  • Silver Member
  • ***
  • Posts: 26
    • 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 Services, Inc.

MikeinFL

  • Silver Member
  • ***
  • Posts: 25
    • 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

  • Administrator
  • Diamond Member
  • *****
  • Posts: 3353
  • Mike King
    • View Profile
    • PVX Plus Technologies
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.