• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Indexing a folder with just files.

KrAzE

Weaksauce
Joined
May 16, 2006
Messages
91
I have a very very simple web site I have developed for a local club. They have a newsletter that I have somone scan and send to upload to a directory on the webserver. Right now the entire website is built using simple HTML and a few javascripts to pull some dynamic content.

On the newsletter page, I currently have to index the newsletters myself, but would like a simple script or way to simply grab the files in that folder and display them as links to be able to view or download (they are all PDF).

Anyone know of a quick way. The only thing I could guess would be a IFRAME with the index customized which would be a horrible way of going about it.

I may eventually use a CMS to develop this site, but I have a feeling no one will update any of the content besides the newsletter and the Calander (I used google calander so I could let somone else do it and still integrate it in the site.)

If you need the site for the example, www.foe437.org (newsletter page)

Keep in mind this site is for an older generation, so more simple is better.
 
Well, I'll start with the easiest way to do this.

Why not get rid of the page displaying this stuff and turn on directory browsing for this specific directory? You're already allowing certain people to upload to the directory, so why not allow people to browse it?

Once you can explain why this isn't an ideal situation I'm sure someone will post with a better response. :)

2.png
 
The folder itself is public, but the script actually uploads to the folder, not any users.

To view how I would like it formatted, just see http://foe437.org/newsletter.html

Like I said before, we are dealing with an older crowd, so the least ammount of information I can present to them the better.

Thanks!
 
cold fusion would be a much better solution to use. I do not know if that application is within your budget, but I would look into that.

Another route might be to create a dir listing and save it as a *.txt and then use JScript to read that listing and create the hyperlinks. It will not be automatic, but it'll still save time.
 
cold fusion would be a much better solution to use. I do not know if that application is within your budget, but I would look into that.

Another route might be to create a dir listing and save it as a *.txt and then use JScript to read that listing and create the hyperlinks. It will not be automatic, but it'll still save time.
Agreed. A server-side language is a strong candidate here for this problem. Depending on your host server, PHP or ASP.Net would be a free alternative. Either could read the contents of a particular directory, return the filenames, and you could loop through to build some "a" tags. Other languages can do the same, I just tossed out those two for sake of simplicity.

I don't think the "dir listing into .txt file" would be an appropriate solution for the OP. While this is a possible approach, I'm not sure it is probable approach given the OP's implicit requirements from the first post. It would require the user to manually update the txt file on the server after uploading/deleting/modifying the PDF files stored on the server, thus creating an additional step for the user. This also introduces potential user data entry errors.
 
I don't think the "dir listing into .txt file" would be an appropriate solution for the OP. While this is a possible approach, I'm not sure it is probable approach given the OP's implicit requirements from the first post. It would require the user to manually update the txt file on the server after uploading/deleting/modifying the PDF files stored on the server, thus creating an additional step for the user. This also introduces potential user data entry errors.

While its not a completely automatic solution, it would update and keep all the file names spelled correctly.
 
While its not a completely automatic solution, it would update and keep all the file names spelled correctly.
Doing this requires local machine logon (ex: SSH, RDP, etc.) or permissions that allow remote code execution. The latter could be wrapped within an executable or batch/script file, but the former gets too dangerous (unless the OP is comfortable with providing local logon of the production environment to the end user).

Again, your suggestion is a possible approach. But I'm doubtful this is a practical solution for the implied technical level of the end user.
 
It is also possible to use XML as a translator. Again using a dir listing saved to a txt file (I know, its not the most automatic way, however it would be easier then inputting and adding code manually. The XML file would read the txt and format it, and your HTML would in turn call the XML file. A batch file would easily update the txt and XML in sequence to keep everything up to date with one execution.

PHP or ASP.Net would be a better solution, if you can get one stalled on your server. Cold Fusion costs, but makes dynamic web design extremely easy (might not be needed on your site, aside from this particular page).
 
Back
Top