NetTalk Central

Author Topic: Show the contents (files) of a folder  (Read 4373 times)

hkalmbach

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
    • Email
Show the contents (files) of a folder
« on: May 08, 2018, 01:21:52 AM »
Hello,

I have a web app where the user can look at dokuments attached to a machine. In the browse the document paths are shown and the documents can be opened in the browser (pdf's, word doc's, ...). This works fine.
Now a user has a lot of documents and does not want to attach each document to the machine, but wants to attach the folder where the documents a stored to the machine.
In the clarion windows program its no problem to have links to documents in the data base as well as a link to a folder. If the user wants to see the folder I can open an explorer window to show the content of the folder.
Is it possible to do something similar with NetTalk? That means to have the path of a folder in the database, show it to the user and when he clicks on it to show him the contents of this folder?

Thanks for every hint.

Cheers
Heinz

bshields

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
    • Inhabit
    • Email
Re: Show the contents (files) of a folder
« Reply #1 on: May 08, 2018, 03:29:57 AM »
Hi Heinz,

I'm sure there are lots of ways.

I do it by using the clarion memory driver (you could also use a physical file).

I use the sessionid within the memory file to separate sessions.

I use the DIRECTORY command to load the session. I also use a sessionvalue to manage refreshing the memory table. So I don't have to load the memory table all the time (speed is a consideration for me).

I do all this so I can use a stock nettalk browse to manage the display.

Regards
Bill


broche

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
Re: Show the contents (files) of a folder
« Reply #2 on: May 08, 2018, 05:45:34 AM »
Here is some code I use:

Attached CLW file.  I look at all customers and fetch the files if needed, you might want to use a single customer.
I will take the advice on the other post and use the session value.

Brian.
Brian