I would take a look at a combination of Perl's builtin "stat" function as
well as Win32::Perms by Dave Roth (http://www.roth.net).

Look at the Perldocs for specifics about "stat". Here is a quick example:

$filename = "d:/temp/Cajun Dixie Cups - Ico Iko.mp3";
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,
$blocks) = stat($filename);
print "File Size = $size bytes\n";
print "File Last Access Time = ", scalar localtime($atime),"\n";
print "File Last Modified Time = ", scalar localtime($mtime),"\n";

There is documentation on Dave Roth's site on Win32::Perms but with it you
can retrieve/set file level premissions.

Kind regards,
Trevor J. Joerges
--------------------------------------------
$_=q;rrUSFWPSZK.ZKPFSHFT,rkvtuZbopuifsZQZibdl
rrqpxfsfeZcyZQ,,riuuq://xxx.%.dpn,ru~@%.dpn ,rrr8-)
;;s;\~;kpfshft;g;s;\%;tfoenjnf;g;y;B-x;A-w;;
s;P;perl;g;s;,;\n;g;s;Y; ;g;s;q;\t;g;print;
--------------------------------------------

----- Original Message -----
From: Makarov Gera x8521
To: '[EMAIL PROTECTED]'
Sent: Tuesday, September 24, 2002 7:58 PM
Subject: Collecting directory and file info. on Windows NT


Hi there,

I am looking for a way of collecting directory and file information on
Window NT, i.e. permissions, ownership, size, creation and modification
timestamp etc and putting it in a csv file. If you know of any existing
scripts somewhere on the web could you please let me know.
Thanks in advance.

Regards,

Gera Makarov
Oracle DBA
CitiPower Pty



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This email message has been swept for the presence of
computer viruses

CitiPower Pty. ACN 064 651 056
**********************************************************************


_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to