View Full Version : locating and listing then linking files

sir pannels
07-01-2002, 11:06 PM
hey there,
ok need a script that finds a dir .. the dir will be a variable from url like http://whwatver.com/cgi-bin/script.pl?dirname=whatever
and it opens that "whatever" dir and lists every.txt file in that dir and if you click one of the names of the txt files listed it is linked to the txt file...i havent got very far argh im stumped....

got a lil bit but not much luck...can anyone hep me?
heres what i got which aint much use hehe


$dirname =$FORM{dirname};




if ($list=~ m/$dirname/g){
if ($found eq 'yes' ) {
print "list of files with <br> between\n";
else {
print "No resluts found for $name in our database sorry!\n";

argh any ideas?
thanks lot:)
sir p

07-02-2002, 04:43 AM
i dont get it , you could just get all the files in the dir, (if there is a dir) and then print the array contents, as links,

or am i geting the thing wrong?

and on you rlast script you got all th contents of a dir into an array


sir pannels
07-02-2002, 02:36 PM
yeh sorry the script wrong.
your right calilo thats what im after.. so the dir should be found by the url
so if it was to get all files in a dir called "blah" which is located under another dir called "guitar" it would be like www.whatever.com/cgi-bin/myscript.pl?maindir=guitar&dir=blah
hmm does that make sense?
thanks dude:thumbsup:
sir p