Hello Everybody,
I have the following code to print the names of mp3 files on a webpage. and i want to be able to either sort them and put them on seperate pages by their directory or artist/album. I was wondering if that was possible.
i.e.
http://127.0.0.1/dirlist
would show

(hed) PE
Beastie Boys
Disturbed
Metallica

then i could click on one of them and it would take me to a page with the files on. But all the files could still be under one dir or mutiple dirs.

thank heaps and i hope you can help...

The code for displaying files is below:
{
struct _finddata_t c_file;
long hFile;
char request[255];
char directory[250] = "c:\\My Music\\";


sprintf(request,"%s%s",directory,"*.mp3");

if( (hFile = _findfirst( request, &c_file )) == -1L )
printf( "No *.mp3 files in C:\\My Music\\!\n" );
else
{
writeHeaders(s, HTTP_200);
sockprintf(s, HTMLSTART"<h1>DirList</h1><ol>", bodyFormat);
writeSock(s, "<br>") ;
writeSock(s, "Listing of .mp3 files in C:\\My Music\n\n" );
writeSock(s, "<br>") ;
writeSock(s, "<br>") ;
writeSock(s, "<br>") ;
writeSock(s, "<li>") ;
writeSock(s, "<a href=\"") ;
writeSock(s, c_file.name) ;
writeSock(s, "\">") ;
writeSock(s, c_file.name);
writeSock(s, "</a>") ;

/* Find the rest of the .mp3 files */
while( _findnext( hFile, &c_file ) == 0 )
{
writeSock(s, "<a href=\"") ;
writeSock(s, c_file.name) ;
writeSock(s, "\">") ;
writeSock(s, c_file.name);
writeSock(s, "</a>") ;
writeSock(s, "<br>") ;
}

_findclose( hFile );
}