Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!
Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.
Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!
Ad Blocking Detected
Please consider disabling your ad blocker for our website.
We rely on these ads to be able to run our website.
You can of course support us in other ways (see Support Us).
So I ran into this little issue ... (thanks to user Granny646) Since Windows 8, it seems that Windows doesn't like file dates prior to 1980. This seems a mixed bag of certain functions (for example FileSetDate) not properly supporting dates like that and the Windows File Explorer not displaying it either.
Again: Windows File Explorer will not show a date when file date is set to a date to prior 1980.
However: this is not a filesystem limitation (tested with NTFS, not and issue under macOS and Linux either).
So how do we set the file date with a date like that in Lazarus Pascal? I found a little function for that (minor modification from this one by howardpc):
uses ... FileUtil, Windows ...
...
function SetFileDate(const aFilename: string; aDate: TDateTime): boolean;
var
fileHandle : THandle;
fileTime : TFILETIME;
LFileTime : TFILETIME;
LSysTime : TSystemTime;
begin
Result:=False;
if not(DirectoryExists(aFilename) or FileExists(aFilename)) then exit;
try
DecodeDate(aDate, LSysTime.Year, LSysTime.Month, LSysTime.Day);
DecodeTime(aDate, LSysTime.Hour, LSysTime.Minute, LSysTime.Second, LSysTime.Millisecond);
if SystemTimeToFileTime(LSysTime, LFileTime) then
begin
if LocalFileTimeToFileTime(LFileTime, fileTime) then
begin
fileHandle:=FileOpenUTF8(aFilename, fmOpenReadWrite or fmShareExclusive);
if SetFileTime(fileHandle, fileTime, fileTime, fileTime) then
Result:=True;
end;
end;
finally
FileClose(fileHandle);
end;
end;
Please consider disabling your ad blocker for our website.
We rely on these ads to be able to run our website.
You can of course support us in other ways (see Support Us).
Ubuntu Ubuntu is probably one of the most used Linux distro's out there. Very well supported and a great Linux distro
7-Zip One of the best, free, and most efficient Windows archive and unarchive utilties around. Support quite a few formats as well.
Put.io Online disk ruimte met Torrent mogelijkheden!
ForkLift Great tool for FTP, SFTP, remote editing of text files (through SSH) and even a great Finder replacement - Not free, but keep an eye on special offerings (I got my copy for $5)
HandBrake Great tool for ripping DVD's and converting video.
WinRAR My favorite file compression/decompression tool. Fast, efficient, and support quite a lot of formats. Unfortunately ... NOT free.
Links Page These and more of our favorite links can be found on the Links Page.
New Downloads
MovieScanner2-2.0.16-Windows-32bit-setup.exeDate: 2022-05-03 - Size: 18.4 MBA small application that uses FFProbe to scan your video files and logs these details in a small database. This is the 32 bit Windows version.
MovieScanner2-2.0.16-Linux-GTK-64bits.tar.gzDate: 2022-05-03 - Size: 29.2 MBA small application that uses FFProbe to scan your video files and logs these details in a small database. This is the 64 bit Linux version for GTK.
MovieScanner2-2.0.16-Linux-QT5-64bits.tar.gzDate: 2022-05-03 - Size: 29.1 MBA small application that uses FFProbe to scan your video files and logs these details in a small database. This is the 64 bit Linux version for QT5.
MovieScanner2-v2.0.16-macOS-64bit.dmgDate: 2022-05-03 - Size: 25.4 MBA small application that uses FFProbe to scan your video files and logs these details in a small database. This is the 64 bit macOS version.
Downloads Page Find these and more Downloads on the Downloads Page, where you will also find articles references, operating system requirements and categories.
Amazon Ads
Support us by doing your shopping at Amazon.com, either click the link, or click one of the links below …
You can also sponsor us through these Amazon offerings:
Please consider disabling your ad blocker for our website.We rely on these ads to be able to run our website.You can of course support us in other ways (see Support Us on the left).