CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
utime not update time stamp in windows

 



ironpaw
Novice

Jan 22, 2003, 8:22 PM

Post #1 of 2 (773 views)
     utime not update time stamp in windows  

I have read there are some utime bugs. Also read there is a restriction on updating timestamps on files you don't own (even with access permissions to them).

I have the following that will happily go through a text file I created containing:

c:\dir\filename.xls , 1023455543 (being seconds since the epoch)

the script reverts all files I OWN to the correct date but non of the files I do not own
:( is there are nother way of doing this in perl win32? I would pass it off to a dos app but I cant find one that handles long file names (doowww).

Any ideas on setting time stamps for files you can right but don't own?

my script
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";} Thanks lads I am not advanced but this seems to be an advanced question. utime man
mentioned requiring ownership of files.
###############
All Life is Kaos
###############


Jasmine
Administrator / Moderator

Jan 22, 2003, 9:19 PM

Post #2 of 2 (772 views)
     Re: [ironpaw] utime not update time stamp in windows [In reply to]  

Please refrain from duplicate posts. Original post at http://perlguru.com/gforum.cgi?post=19286

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives