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).
XKPassword Super practical website for those who need to generate one or a list of passwords based on words (more secure).
Photopea A free alternative to Photoshop (pretty close anyway), and runs in your browser - this works surprisingly good!
Down For Every One or Just Me? Checks if a website (URL) is up or down, for every one or just you ... Awesome to test when a link is not working.
KODI (a.k.a. XBMC) KODI (XBMC) is probably the best media center application out there, suitable for multiple platforms.
NAPS2 - Not Another PDF Scanner 2 Wonderful simple and reliable scanner application for Windows users. This still depends on your Windows having the proper scanner drivers installed, but it makes scanning to images or PDFs a lot easier.
ViMediaManager ViMediaManager is a media manager for Mac OS X, allowing you to gather, store, and manage information, extra art, trailers and television tunes for your movie, television etc for use with for example XBMC.
Links Page These and more of our favorite links can be found on the Links Page.
New Downloads
MiniWOL2 MacOS (64 bits Apple Silicon)Date: 2023-08-01 - Size: 1.2 MBminiWol is a simple, but effective application to send Wake On LAN to network devices. This is the signed 64 bit MacOS ARM (Apple Silicon) version.
ConnectMeNow4-v4.0.10-macOS-arm64.dmgDate: 2023-07-07 - 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.10-macOS-x86-64.dmgDate: 2023-07-07 - 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.2.3-Windows-32bit-setup.exeDate: 2023-04-12 - 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.2.2-Linux-GTK-64bits.tar.gzDate: 2023-04-11 - 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.2.2-Linux-QT5-64bits.tar.gzDate: 2023-04-11 - 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.
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).