Change filedate

F

Fred Hare

I need to change the file creation dates of textfiles using Perl in
Windows XP. I have path and filename in $filename and the new date in
$newdate but I cannot find the command for changing the filedates.

-- Fred
 
D

David Efflandt

I need to change the file creation dates of textfiles using Perl in
Windows XP. I have path and filename in $filename and the new date in
$newdate but I cannot find the command for changing the filedates.

-- Fred

perldoc -f utime

This works for changing access and modification times on Unix (and like)
systems, but not sure about Windows. It takes a list of NUMERICAL
(seconds past the epoch) access and modification times for first 2
elements of list and rest of list is files to change. It returns number
of files actually changed.
 
F

Fred Hare

David said:
perldoc -f utime

This works for changing access and modification times on Unix (and like)
systems, but not sure about Windows. It takes a list of NUMERICAL
(seconds past the epoch) access and modification times for first 2
elements of list and rest of list is files to change. It returns number
of files actually changed.

Thank you David, this works fine in Win XP...

-- Fred
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,250
Latest member
Charlesreero

Latest Threads

Top