Thu Jul 1st 2004 13:08:50: Folder Contents Listing Script

A number of times I've wanted to bung a load of files in a folder on a webserver, and then get the server to give a listing of that folder's contents. Now not being an apache/linux expert I can never work out how to do it. Therefore this morning I wrote this. It's a php file which you can bung in a folder and it will generate a list of all the files in that folder.


Nice script. I was wanting a way to get all the file names from all my folders and this worked. Good job!


Comment by James Hendrix at 17:06 on Fri 24 June 2005

It looks should be very helpful...i was looking all over the net for something with this feature...thank you for your work!

Comment by trialanderror at 21:27 on Wed 13 July 2005

The script seems to work fine. Thanks a lot. It would have been nicer if it could show with ICONS which one is file and which one is folder and a bit more interesting as design... but thats extra... the function to list the FILES and FOLDERS works fine!

Comment by Alex at 11:21 on Wed 31 August 2005

Perfect! Thanks!

Comment by Miles Cooley at 6:21 on Sun 24 December 2006

I've been looking for something like this for some time. I love it. Thanks.

Comment by W A Lapcevic at 2:22 on Wed 11 April 2007

Thank you! A client just asked for this and I had no idea how to do it.

Comment by Sabine at 13:02 on Mon 23 June 2008

This script works perfectly and is easy to adjust for each users needs! Usually tutorials or sample scripts on line are written so only those fully versed in that scripting language can do anything with it. This is awesome! Thanks.

Comment by Andrew at 15:22 on Thu 10 July 2008

nice!!! saved me some time. Tnx

Comment by Pratamishus at 7:39 on Fri 8 August 2008


Did any one ever find how to display icons instead of just pain text?

It could be super for photos etc...

Veru many many thanks.

Comment by Hairymonster at 12:03 on Tue 30 December 2008

Hi I would love to find out how to hide the folder's path but keep the index of /foldername to stop people copying it - can anyone show me how to do this?

Awesome script by the way, really helped me out.

Comment by Hiding folder path but keeping folder name? at 2:41 on Tue 3 February 2009

Great, thanks!

Comment by LC at 20:20 on Sun 24 April 2011

Add New Comment

(Never displayed publically)
HTML Tags allowed - <b>bold</b>, <i>italic</i> and <a href="http://...">Links</a>
Type "NoSpam" in Here:


<< Back