Re: Windows equivalent to Unix 'touch' command
2001-10-09 16:31:49
In a perl script, you could use the utime command. I know perl is in the
WinNT reskit, so no additional perl distribution is necessary.
Actually, you may need a newer distribution or a newer reskit with a newer
distribution. I was just testing the mini-script below when I found out
that utime isn't implemented in the perl distribution that's in my NT
reskit. If perl is in the Win2K reskit, would anybody care to try it?
Alex
$filename="d:\\temp\\testfile"; # file to touch
$time=time + 3600; # 1 hour in the future
$rc=utime($time, $time, $filename);
print "$rc files touched\n";
|
|
|