I need to dump a bunch of .mp3 files into a folder on my webserver to make them available to a fellow doper.
The problem is, my webserver doesn’t allow a link to a folder, and I don’t feel like coding hundreds of links to long filenames by hand.
I’ve looked around, and the best ready-made solution I could find was this perl script, which works from a list of filenames. The list could be made easily enough w/ the DOS CLI (& maybe notepad if the root directory needs to be added.)
If anyone could suggest a more elegant solution, I’d appreciate it. Otherwise, could someone hold my hand through the process of implementing this perl script?
The main reason that I would like some other approach is that the little perl script doesn’t show the size of each linked file, and I know that the fella has a dialup connection and filesize matters. (The files range from around 100k to several megs)
What I’d like is something outputs a regular index of the sort that webservers typically generate on-the-fly for folders without and index file.
Also, lest moderators worry about copyright issues, the .mp3 files aren’t music, and they are in the public domain.
Why not just upload the files and provide a link from your web page to the directory listing? It’s not elegant but it does satisfy your requirements in the short-term to provide access to the files as well as file sizes (the server does this for you).
That way, you can figure out a way to use the Perl script to generate the web page you need (with links and file sizes).
Duckster: My housemate, who’s the network guy, doesn’t like to allow that. I used to have apache running on my computer, and port-forwarding allowed me to link to stuff in my own folders. I reinstalled apache but it seems that port-forwarding is now disabled on the gateway, so I have to move my files over there if I want to link to them.
Black455: Thank you so much! That’s exactly what I needed, and it’s working perfectly. That’s much more like the amount of time & effort I wanted to invest in it. (ie: less than 30 seconds.)
There’s no need for a web page. Apache will automatically generate a file list for all the files in a directory if it can’t find index.htm, or index.html files ( depending on how Apache is configured ) in the directory. You must make sure also that Apache is configured to allow this type of access. For a directory, enable options indexes
If you are running Microsoft IIS server, it will generate a file list automatically for directories that have no default.htm/html file. Just switch on ‘Directory Browsing’ for that directory and your set.
Dada: From what I could gather, Larry’s host disabled directory browsing via .htaccess. I suppose he could have just made a local .htaccess file, but it’s six of one, half dozen of another.
I don’t think this is a port-forwarding issue, but rather a directory permissions issue. The directory must be readable and executable by others (chmod o+rx) so that the web server can read it.