uses
windows;
var
hfind:HANDLE;
CurrentTime:FILETIME ;
PathName:pchar;
ans:systemtime;
new:systemtime;
begin
PathName:='C:\Users\Computer\Desktop\fb\pascal\mystuff\tester';
hFind := CreateFile( PathName, GENERIC_WRITE,FILE_SHARE_WRITE,nil,OPEN_EXISTING,FILE_FLAG_BACKUP_SEMANTICS,0);
GetFileTime(hFind, @CurrentTime,nil,Nil);
CloseHandle(hFind);
FileTimeToSystemTime(Currenttime,ans);
writeln('folder details:');
writeln('year ',ans.year);
writeln('month ',ans.month);
writeln('day of week ',ans.dayofweek);
writeln('hour ',ans.hour);
writeln('minute ',ans.minute);
writeln('second ',ans.second);
writeln;
hFind := CreateFile( PathName, GENERIC_WRITE,FILE_SHARE_WRITE,nil,OPEN_EXISTING,FILE_FLAG_BACKUP_SEMANTICS,0);
GetSystemTime(&new);
SystemTimeToFileTime(@new,@currenttime);
writeln(SetFileTime(hFind, @CurrentTime, @CurrentTime, @CurrentTime));
CloseHandle(hFind);
GetFileTime(hFind, @CurrentTime,nil,Nil);
CloseHandle(hFind);
FileTimeToSystemTime(Currenttime,ans);
writeln('new folder details:');
writeln('year ',ans.year);
writeln('month ',ans.month);
writeln('day of week ',ans.dayofweek);
writeln('hour ',ans.hour);
writeln('minute ',ans.minute);
writeln('second ',ans.second);
readln;
end.