How do I create an html list from list of files?

I would like to create an html web page which looks in a specific directory and then lists the names of the files, as a link, to the files in that directory.  This is for an intranet purpose.

ie. Folder1 has 10 files, all pdf files with various names.  I want to create a web page for the intranet, which lists all those 10 files, and if you click on the name of the file then it will open the pdf files.
100questionsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Tim PhillipsWindows Systems AdministratorCommented:
This software looks like it will do what you want:  http://www.dimin.net/software/HTMLDirCreate/
0
MurfurFull Stack DeveloperCommented:
Here's one I wrote way back in 2008... it is very simple but effective and each file or directory is a link that you can click on to open. I use it as the index for my WIP directory so any file or mini-app can be opened with a single click and without having to remember all the paths to type in the browser URL.

It is PHP but the same principle applies for other languages
<?php
echo"<html>";
echo"<head>";
echo"<title>File List</title>";
echo"<style type=\"text/css\">";
echo"<!--";
echo"body,td,th {";
echo"font-family: Verdana, Arial, Helvetica, sans-serif;";
echo"font-size: 11px;";
echo"color: #333333;";
echo"}";
echo"-->";
echo"</style>";
echo"</head>";
echo"<body>";
echo "<h2>Files/Directories</h2>";
echo "This folder contains:<br /><br />";

$dir = opendir(getcwd());
while (false !== ($file = readdir($dir)))
{
	if(true == is_dir($file)&&$file!=="."&&$file!==".."&&$file!=="phpmyadmin"&&$file!=="signoff"&&$file!=="internal")
	{
	echo "<li>&lt;dir&gt;&nbsp;<a href=\"$file\">$file</a></li>";
	}
}

$dir = opendir(getcwd());
while (false !== ($file = readdir($dir)))
{
	if(false == is_dir($file)&&$file!=="."&&$file!==".."&&$file!==".htaccess"&&$file!==".htpasswd"&&$file!==".bash_history"&&$file!=="index.php"&&$file!=="index.php.bak")
	{
		echo "<li>file&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"$file\">$file</a> ".round(filesize($file)/1000)."kb</li>";
	}
}
?>

Open in new window

0
100questionsAuthor Commented:
One can use ARCLab Dir2 HTML software.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
100questionsAuthor Commented:
This works.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.