🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.lang.php
Article #75

Re: list all files in a directory to a HTML file

#75
From: Tom Mattmann
Date: Wed, 21 Nov 2001 19:18
23 lines
2398 bytes
"Hans" <yammax@zonnet.nl> schrieb im Newsbeitrag
news:9tefnp$s1e$1@nereid.worldonline.nl...
> I got a site containing tours. For each location I got a directory. Now I
> need a CGI script that generates a list from al files in a directory en
puts
> that list on a customisable HTML file. I want also to give a description
of
> the file.
You could use File::Find to fetch a list of files recursively. find() will
call the wanted() function that could do printing and other stuff for you.
See perldoc File::Find.

CGI programming and HTML handling is covered by a range of CPAN modules,
see search.cpan.org and read the modules' documentation.

> I want for each location (directory) a HTML list with all files.
>
> When I get new tours suplied (.doc or .xls or .doc) I just want to copy
that
> file in the right directory, en then it must appear on the list.
>
> Can anybody help me??
Help yourself, perldoc is always your friend. :-)
Technical Details
Message-ID: <3bfc05b5$1_2@news.datacomm.ch>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!195.64.68.27!newsgate.cistron.nl!amsnews01.chello.com!newsrouter.chello.at!newsfeed01.univie.ac.at!newsmaster-01.atnet.at!atnet.at!news.datacomm.ch
References: <9tefnp$s1e$1@nereid.worldonline.nl>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1107bb,a22aff95de013d49
X-Google-Attributes: gid1107bb,public
X-Google-Thread: 1082b7,a22aff95de013d49
X-Google-Attributes: gid1082b7,public
X-Google-Thread: fec76,a22aff95de013d49
X-Google-Attributes: gidfec76,public
X-Google-Thread: fc70a,a22aff95de013d49
X-Google-Attributes: gidfc70a,public
X-Google-Thread: f707c,a22aff95de013d49
X-Google-Attributes: gidf707c,public
X-Google-ArrivalTime: 2001-11-21 11:51:28 PST
From: "Tom Mattmann" <tom.mattmann@gmx.net>
Newsgroups: alt.comp.lang.php,alt.comp.perlcgi.freelance,alt.perl,dk.edb.programmering.perl,it.comp.www.php
References: <9tefnp$s1e$1@nereid.worldonline.nl>
Subject: Re: list all files in a directory to a HTML file
Date: Wed, 21 Nov 2001 20:18:51 +0100
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
NNTP-Posting-Host: 212.254.251.106
Message-ID: <3bfc05b5$1_2@news.datacomm.ch>
X-Trace: news.datacomm.ch 1006372277 212.254.251.106 (21 Nov 2001 20:51:17 +0100)
Organization: Customers of Tiscali DataComm AG - http://www.tiscali.ch/
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!195.64.68.27!newsgate.cistron.nl!amsnews01.chello.com!newsrouter.chello.at!newsfeed01.univie.ac.at!newsmaster-01.atnet.at!atnet.at!news.datacomm.ch