ironpaw has asked for the wisdom of the Perl Monks concerning the following question:
This works great loyally skipping any file not owned by me (which I don't want it to). I am running it from Win2k and the files are on Unix/Samba but the same thing happens locally. Any advice ideas would be great.use Win32::OLE; use File::stat; open(CSV, "c:/temp/doctime.txt"); #csv of filename , date @title = <CSV>; for ($i = 0; $i < scalar(@title); $i++) { ($file1[$i], $date[$i] $blank[$i]) = split(",", $title[$i]); } for ($a = 0; $a < scalar(@file1); $a++) { $access=$date[$a]; $filez = $file1[$a]; print "File name # $filez\n"; print "Previous date # $access\n"; utime $access, $access, $filez || die print "couldn not set utime for +$filez\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: setting time stamps on files
by castaway (Parson) on Jan 23, 2003 at 07:31 UTC | |
by ironpaw (Novice) on Jan 24, 2003 at 00:50 UTC | |
by castaway (Parson) on Jan 24, 2003 at 12:40 UTC | |
by byrned (Initiate) on Jan 25, 2003 at 00:35 UTC |