in reply to Stats for files using File::Find and DFS information

I have not tried this on DFS, but it works fine on a regular file system, and there is no reason for it to do otherwise on DFS :
use strict; use diagnostics; use warnings 'all'; use File::Find; use File::stat; use Time::localtime; system("cls"); for (@ARGV){ find sub { -d and print "\n$File::Find::name ================\n"; return unless -f; my $sb = stat($_); my $mt = localtime $sb->mtime; my $ct = localtime $sb->ctime; printf " %s, %s bytes, Mod:%02d/%02d/%02d Creat:%02d/%02 +d/%02d\n", $_, $sb->size, $mt->mon()+1,$mt->mday(),$mt->year %100, $ct->mon()+1,$ct->mday(),$ct->year %100 ; } ,$_ ; }

     "Income tax returns are the most imaginative fiction being written today." -- Herman Wouk

Replies are listed 'Best First'.
Re^2: Stats for files using File::Find and DFS information
by blackadder (Hermit) on Jul 12, 2005 at 08:20 UTC
    Thanks,...This is good.

    But how about the file owners? Any idea how can I obtain this information please?

    Regards

    Blackadder
      Just read one off Tye's posts, Stat() under Win32 will always return 0 for file onwership,...need to use Win32::Perms.

      Thanks

      Blackadder