Copying a file timestamp to another file
Posted: Fri Oct 15, 2010 10:26 pm
How do I copy a file's timestamp (created, accessed, modified) from one file to another?
Here's what I tried, but it doesn't work:
What am I doing wrong?
Here's what I tried, but it doesn't work:
Code: Select all
Procedure CopyFileStamp(file1.s, file2.s)
Protected created=GetFileDate(file1, #PB_Date_Created)
Protected accessed=GetFileDate(file1, #PB_Date_Accessed)
Protected modified=GetFileDate(file1, #PB_Date_Modified)
SetFileDate(file2,created,created)
SetFileDate(file2,accessed,created)
SetFileDate(file2,modified,created)
EndProcedure