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).
XMedia Recode Excellent tool for Windows users to convert pretty much any video format to any other video format, including some helpful options like removing unwanted tracks.
Ubuntu Ubuntu is probably one of the most used Linux distro's out there. Very well supported and a great Linux distro
XKPassword Super practical website for those who need to generate one or a list of passwords based on words (more secure).
Security Awareness Tip of the Day Great resource to make you online-life more secure - definitely some great tips here and a recommended read.
IcoMoon Ultimate place to create your own icon fonts, with existing icons and/or your own designs, for your computer or webpage, ... for free.
Elementary OS (Freya) Freya, a.k.a. Elementary OS, is my favorite Linux distribution. It looks slick and works great. Highly recommend it.
Links Page These and more of our favorite links can be found on the Links Page.
New Downloads
ConnectMeNow4-v4.0.8-macOS-arm64.dmgDate: 2023-03-18 - Size: 2.6 MBVersion 4 of ConnectMeNow - A tool for more convenient mounting of network shares under macOS. This is the Apple Silicon version (not suitable for Intel).
ConnectMeNow4-v4.0.8-macOS-x86-64.dmgDate: 2023-03-15 - Size: 3 MBVersion 4 of ConnectMeNow - A tool for more convenient mounting of network shares under macOS. This is the Intel version which works on Intel and Apple Silicon Macs.
MovieScanner2-2.1.3-Windows-32bit-setup.exeDate: 2023-03-09 - Size: 18.6 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.1.3-Linux-QT5-64bits.tar.gzDate: 2023-03-08 - 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-2.1.3-Linux-GTK-64bits.tar.gzDate: 2023-03-08 - 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.1.3-macOS-64bit.dmgDate: 2023-03-08 - Size: 26.3 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).