You are not logged in.
What's wrong with the following PascalScript?
begin
ShowMessage(DateToStr(FileTimeModified(FileName)));
ShowMessage(DateToStr(FileTimeCreated(FileName)));
end.
I keep getting "30/12/1899" for every file! Why doesn't this work?
Offline
I am getting same output. I guess it is a bug...
Regular Expressions are not as hard to understand as you may think. Check ReNamer's manual or nice Regular Expressions tutorial for more info and start to use full power of applications that use them (like ReNamer, Mp3Tag and so on).
Offline
Guess Denis needs to look into it then...
Offline
You must use FILEPATH instead of FILENAME, because FileName is the preview name, while FilePath is the full path to the original file.
P.S. Sorry for delay, just came back from my holidays...
Offline
Yup, seems to work...
Offline
It would be nice, if you could update user manual.
From: function FileTimeModified(const FileName: WideString): TDateTime;
To: function FileTimeModified(const FilePath: WideString): TDateTime;
Cause that was what made us confused...
Regular Expressions are not as hard to understand as you may think. Check ReNamer's manual or nice Regular Expressions tutorial for more info and start to use full power of applications that use them (like ReNamer, Mp3Tag and so on).
Offline
krtek, that's a very good suggestion.
Actually, it might be a good idea if we all contributed short one line descriptions of each PascalScript function to be added to the manual. Some are self-evident by their names, but others might be a bit confusing. Also, for those who haven't ever touched Pascal/Delphi, even common things like how to write different kinds of loops like repeat-until, for etc. is confusing, since not all languages are alike.
Or maybe like the RegEx topic we can have one PascalScript topic with tips and tricks...
Offline
The FileName parameter is actually named correctly, because it doesn't have to be a full path, it can be a relative path to the current directory. Instead, it is the FileName variable in the PascalScript is badly named by me, because it should really be called Preview or NewName. But now it is too late to rename it, it will break all written scripts.
Offline