Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: file timestamp and Windows 7

by mjscott2702 (Pilgrim)
on Jan 05, 2011 at 08:59 UTC ( #880542=note: print w/ replies, xml ) Need Help??


in reply to file timestamp and Windows 7

On a Windows 7 machine with NTFS, modification time was successfully updated using:

Cygwin

$ ls -goc dummy.txt; perl -e 'utime undef, undef, "dummy.txt"'; ls -go +c dummy.txt -rw-r--r--+ 1 0 2011-01-05 08:44 dummy.txt -rw-r--r--+ 1 0 2011-01-05 08:49 dummy.txt

and ActiveState perl:

>dir dummy.txt 05/01/2011 08:49 0 dummy.txt >perl -e "utime undef, undef, 'dummy.txt'" >dir dummy.txt 05/01/2011 08:53 0 dummy.txt

I think the file system format (NTFS here) may be significant - also make sure you have write permission on the files you are updating.


Comment on Re: file timestamp and Windows 7
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://880542]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (16)
As of 2014-09-18 17:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (120 votes), past polls