#!/usr/bin/perl -w use strict; $| =1; my $path = 'C:\temp'; my @lines = `"dir /Q $path"`; foreach my $line (@lines) { next unless $line =~ m|^\d+/\d+|; my ($owner, $file) = ($line =~ /\\(\w+)\s+(.*)$/)[0,1]; print "$owner\t $file\n"; } __END__ prints: Marshall trace.pl Marshall trace.txt Marshall transpose.pl Marshall transpose1.pl ...etc...
In reply to Re: How to get filesystem ownerships
by Marshall
in thread How to get filesystem ownerships
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |