I have the following code that reads a directory on my IIS webserver and places the files in the directory in a temp file. I need to get a list of actual documents in the directory so that I can create links to the documents on my web page created by webspeed.
This works as long as am placing the documents in a directory on my webserver. However, the actual docments are located on a network file server. My understanding is that instead of using a drive letter (C: drive) I need to use the UNC path because IIS is a service and drive letters are not available to it. The UNC path for the network directory is "\\favstor01\fs01\JobDocs\Documents". What syntax would I use in place of the INPUT FROM OS-DIR ("C:\documents")?
The code below works:
Def var x as char.
INPUT FROM OS-DIR ("C:\documents").
REPEAT:
SET x.
CREATE wf. */ this is a temp file I have already defined */
ASSIGN wf_filename = X.
END.
INPUT CLOSE.
{&OUT} "<TABLE>".
FOR EACH wf:
{&OUT} "<TR><TD>" wf_filename "</TD></TR>".
END.
{&OUT} "</TABLE>".
The code below does not work:
INPUT FROM OS-DIR ("http://www.domain-name.com/drawings/").
REPEAT:
SET x.
CREATE wf. */ this is a temp file I have defined */
ASSIGN wf_filename = X.
END.
INPUT CLOSE.
{&OUT} "<TABLE>".
FOR EACH wf:
{&OUT} "<TR><TD>" wf_filename "</TD></TR>".
END.
{&OUT} "</TABLE>".
I can see that "INPUT FROM OS-DIR" should not work, but I do not know what to put in its place.
Jim
This works as long as am placing the documents in a directory on my webserver. However, the actual docments are located on a network file server. My understanding is that instead of using a drive letter (C: drive) I need to use the UNC path because IIS is a service and drive letters are not available to it. The UNC path for the network directory is "\\favstor01\fs01\JobDocs\Documents". What syntax would I use in place of the INPUT FROM OS-DIR ("C:\documents")?
The code below works:
Def var x as char.
INPUT FROM OS-DIR ("C:\documents").
REPEAT:
SET x.
CREATE wf. */ this is a temp file I have already defined */
ASSIGN wf_filename = X.
END.
INPUT CLOSE.
{&OUT} "<TABLE>".
FOR EACH wf:
{&OUT} "<TR><TD>" wf_filename "</TD></TR>".
END.
{&OUT} "</TABLE>".
The code below does not work:
INPUT FROM OS-DIR ("http://www.domain-name.com/drawings/").
REPEAT:
SET x.
CREATE wf. */ this is a temp file I have defined */
ASSIGN wf_filename = X.
END.
INPUT CLOSE.
{&OUT} "<TABLE>".
FOR EACH wf:
{&OUT} "<TR><TD>" wf_filename "</TD></TR>".
END.
{&OUT} "</TABLE>".
I can see that "INPUT FROM OS-DIR" should not work, but I do not know what to put in its place.
Jim