Page 1 of 1

link to a folder

Posted: Wed Aug 29, 2012 1:33 pm
by guscobos
How can I create a link to a server or folder on my network?

Re: link to a folder

Posted: Wed Aug 29, 2012 1:54 pm
by David
Can you explain a bit on what you are looking for here? Does this mean that you want Windows Explorer to open to a particular folder?

The web browser has no built-in capability to open Windows Explorer, so some custom programming would be required.

If the requirement is as simple as just running an 'explorer' command on the local PC, Genie's PC command applet could possibly be used, see here for details:

http://www.profoundlogic.com/docs/displ ... ration+API

Re: link to a folder

Posted: Wed Aug 29, 2012 4:26 pm
by Scott Klement
Here's a quick utility that might help you....

This is a command, named OPENFLR... put it in QCMDSRC with member named OPENFLR:

Code: Select all

CMD        PROMPT('Open Folder')                 
                                                 
PARM       KWD(FLR) TYPE(*CHAR) LEN(112) MIN(1) +
           EXPR(*YES) PROMPT('Windows folder')   
Here's a corresponding CL program, to go in the QCLSRC file, and named OPENFLRCL:

Code: Select all

PGM  PARM(&FLR)                              
                                             
     DCL VAR(&CMD) TYPE(*CHAR) LEN(123)      
     DCL VAR(&FLR) TYPE(*CHAR) LEN(112)      
                                             
     STRPCO PCTA(*NO)                        
     MONMSG IWS4010                          
                                             
     CHGVAR VAR(&CMD) +                      
     VALUE('explorer "' *TCAT &FLR *TCAT '"')
                                             
     STRPCCMD PCCMD(&CMD) PAUSE(*NO)         
                                             
ENDPGM                                       
Compile these members with the following commands. I suggest putting them somewhere that will be in your library list.

Code: Select all

CRTCLPGM PGM(OPENFLRCL) SRCFILE(QCLSRC)
CRTCMD CMD(OPENFLR) SRCFILE(QCMDSRC) PGM(OPENFLRCL)
Now you should be open to open a Windows folder from either IBM i Access (PC5250), or Genie by typing something like:

Code: Select all

OPENFLR FLR('i:\Documents\case5476\')
This should open that folder on the user's screen. In Genie, you'll have to tell it to trust a signed Java applet first (see the link David provided) but once you've done that, it should open as you expect.

Does this help?