Mark Bergeron wrote:
Basically I want to create a component that I can use for creating a file management type listing. Something along the lines of if it's an html file, show its size, date created and an icon denoting the file type. I want to do the same with other files in the directory. I'm getting closer. Taking more work then I thought.

Is File:Find a type of module like this? Thanks again.
File::Find is a module that recurses through directory trees.
If you had run the below snippet (assuming there are no errors),
you would see what it does.  A stat of each file will get it's
size and creation date and you can get icons from the Apache
webserver or Windoze.

Change /\.plx$/i to /\.html?$/i in snippet to get only html files.

This is simple stuff - if you can't write a little snippet and
try to debug it, then have someone do it for you.  Don't forget
to pay them. :)

Write a script - try testing/debuggin it - if it fails, post it.

use strict;
use File::Find;

&find (\&wanted, 'C:/files');

sub wanted {
       return if -d or not /\.plx/i;
	print qq{    <br><a href="$_">$_</a>\n};
}

__END__
If you're a newbie - try:  http://groups.yahoo.com/group/perl-beginner

--
  ,-/-  __      _  _         $Bill Luebkert   ICQ=162126130
 (_/   /  )    // //       DBE Collectibles   Mailto:[EMAIL PROTECTED]
  / ) /--<  o // //      http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_</_</_     Castle of Medieval Myth & Magic http://www.todbe.com/

_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to