1) MrAndronGroup: Members Posts: 1Joined: 21 Jan 2005Location: SeattleIP: 24.16.--.--
Posted:
Looking for some script that will show whats in a directory and list the files for download. Any help would be appreciated
Thanks Fred
2) Angus TurnbullGroup: Moderators Posts: 4042Joined: 7 Dec 2003Location: New ZealandIP: 210.54.--.--
Posted:
You need a CGI script. Try looking for a PHP, Perl or ASP script for the job; JavaScript from the browser can't easily access a list of files by itself (however you can use it to provide a nice interface to a list of files ;).
Good luck - Angus.
3) ps3ripsGroup: Guests IP: 62.3.--.--
Posted:
I've been looking for somethig like this client side but activeX won't do it as its not a windows OS. Is there another way?
It should be in javascript and be hosted on my site, then I browse there to get a list of directories - or drives. files etc?.
4) ps3ripsGroup: Guests IP: 62.3.--.--
Posted:
by the way I've also tried this code " write("The contents of " + getCurrentFolder());
fileName = findFirstFile("*.*"); // Find the first file matching the filter while(fileName.length) { write(fileName); fileName = findNextFile(); // Find the next file matching the filter }"
which i can get to work if i use a javascript editor on a win machine but if I host it and call the file it will only give the server directories (I think) and I could use php for that.
I thought Javascript could do it as its a cleint side language.
5) Angus TurnbullGroup: Moderators Posts: 4042Joined: 7 Dec 2003Location: New ZealandIP: 203.173.--.--
Posted:
It is a client side language. It's also got a security model that is expressly designed to prevent web pages doing exactly what you're trying to achieve :).
If you're on a LAN you might be able to sign scripts / rig browser privileges to allow it, otherwise you're looking at Java/ActiveX/etc to do it sorry.