Do you know how to get the username of the person who placed a file in a directory?
This link mentions that ActivePerl does not have "getpwuid"
http://docs.activestate.com/activeperl/5.10/faq/Windows/ActivePerl-Winfaq5.html#Certain_functions_don_t_seem_to_
This code only prints a 0 for the uid.
use File::stat;
use User::pwent;
my $file = 'C:\dev\test.txt';
$stat = stat( $file );
print "User id = " . $stat->uid . "\n";
print "Time = " . $stat->mtime . "\n";
use Win32::OLE;
my $objShell = Win32::OLE->CreateObject("Shell.Application");
my $objFolder=$objShell->Namespace("c:\\dev") or die "$!" ;
my $a = $objFolder->ParseName("test.txt") or die "$!" ;
print $objFolder->GetDetailsOf($a, 8) or die "$!" ;
Thank you,
Kevin
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.