How to get list of files in a folder on server?


hey guys im developing an app and wants to get the list of files (their downloading link ) stored in folder on my website server.
how is it possible ?



the ftp extension offers the RemoteFileNames method to get the filenames of a remote directory



thanks . but its paid. not suitable for student like me.


not getting example apk link here


the apk file is not available to download
see chapter “Test the functionality of the FTP extension” here how to test it


In a similar situation I wanted to get all the csv files of my server of a particular directory. I did it with php. This php code is at the same directory where i want to get the list.

I can’t paste it so download it csvlist.txt (604 Bytes)
rename it as csvlist.php

that code returns a string with all the csv filenames separated by comma.

By opening this file’s URL by WebViewer component, you get into WebViewer.WebView String the response, after that you can split the response by commas and put it in an array.


You got an example of this?


Hello! I have tried your file but in return I always see a blank page and nothing in WebViewer.WebView String. What can be the reason?
I have used your file as is. May be I need to change something?
For example, in line 23 there is an echo command with the following parameters:
echo 'window.AppInventor.setWebViewString
I thought that may be I should change AppInventor to the name of my app? But I did contrary - I have created an app with the name AppInventor and it doesn’t help.


My app looks like this:
and showing me in Label1 just the following text - “Folder1” and on a new line “Folder2”.

However, if in browser on my laptop I use the link and then select - view source code of the page, then for the script in empty folder I see this script:
while for the folder with scv file I see this:

So, your script is working, but do not setting up WebViewer.WebView String properly. Any ideas?


Use the extension ExtendWebViewer [Free] Extended Web Viewer Extension
There is a method:
when extendWebViewer1 onLoadingFinish
Over here you get the WebViewString

The window.AppInventor.setWebViewString(""); is a command that JavaScript can send the result to WebViewer (to your app).