| View previous topic :: View next topic |
| Author |
Message |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Sat Dec 30, 2006 6:43 am Post subject: binary value returned by the @FILE T pseudo-attribute |
|
|
The packed binary value returned by the @FILE(name,T) pseudo-attribute converted to a normal date/time format using the @DATETIME function returns the ACCESSED TODAY.
I just need the MODIFIED DATE is all.
Does anyone know how to run it through the BIN to get the Modified DATE, its prolly just a HEX conversion.
Thanks for looking  |
|
| Back to top |
|
 |
DaveR Valued Contributor


Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Sat Dec 30, 2006 7:53 am Post subject: |
|
|
I believe the file dates/times aren't in the file itself but stored in the partition's file table. _________________ cheers
Dave |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Sat Dec 30, 2006 7:24 pm Post subject: |
|
|
vtol,
I think Dave is correct, however with GadgetX you could use the @GetFile(DATETIME) which will return the last modified datetime stamp that you can give to the VDS @DateTime function. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Sun Dec 31, 2006 3:03 am Post subject: |
|
|
IC
So that would be interesting on like a burned CD format.
I know, the @file(name,T) gives a binary number, but when converted with @datetime() it turns out to be the Last accessed number.
I need the MODIFIED Date(compile date).
But are you saying that if you reformat your partition and move it from CD and back and forth it could you could loose the oringinal compile date?
Can I try Gadget as demo? (I'm broke as usual right now).
Thanks |
|
| Back to top |
|
 |
DaveR Valued Contributor


Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Sun Dec 31, 2006 6:09 am Post subject: |
|
|
Usually when you copy or move a file the operating system copies the original created and modified date/time. Most FTP programs have an option to retain the original file's date/times. _________________ cheers
Dave |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Sun Dec 31, 2006 9:32 pm Post subject: |
|
|
IC
I guess that explains why its so easy to get the real file date with a server command.
When you say Partition Table, are you referring to the one in DOS that you can pass the /MBR parameter to with Fdisk? I was thinking that(HD table) would stay a tiny CMOS writible area.
But maybe you meant Windows writes it own version of that table as a massive second copy.
Interesting... |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Sun Dec 31, 2006 11:52 pm Post subject: |
|
|
| vtol wrote: | IC
So that would be interesting on like a burned CD format.
I know, the @file(name,T) gives a binary number, but when converted with @datetime() it turns out to be the Last accessed number.
I need the MODIFIED Date(compile date).
But are you saying that if you reformat your partition and move it from CD and back and forth it could you could loose the oringinal compile date?
Can I try Gadget as demo? (I'm broke as usual right now).
Thanks |
Vtol
The VDS @file(name,T) returns a floating point number that represents the last access or modified date time of the file. The DATETIME values are not "binary". Binary is 1's and 0's. Take a look at the following knowledge base article by MAC at http://www.vdsworld.com/forum/viewtopic.php?t=919
It is not very clear by the VDS help file exactly what date time stamp that the @file(name,T) returns but as far as I can tell it defaults to the modified datetime if the modified datetime is not found I think it will return the last accessed datetime. I do believe that it is OS and File System dependent.
Anyway GadgetX can be used for 45days as a demo. I have an update for the @GetFile(DateTime) that will be released soon that will allow you to get the Created datetime, LastAccess datetime, or the Modified datetime stamps for the given file. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Thu Jan 04, 2007 2:46 pm Post subject: |
|
|
I always thought @file(name,T) returned the file time stamp (i.e. date written or modified.) VDS uses the Delphi file access routines not the Windows API so it returns the value in TSearchRec.Time. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Jan 04, 2007 5:26 pm Post subject: |
|
|
| jules wrote: | | I always thought @file(name,T) returned the file time stamp (i.e. date written or modified.) VDS uses the Delphi file access routines not the Windows API so it returns the value in TSearchRec.Time. |
As far as I know there is 3 date time stamps applied to a file but the OS. These are Creation date time, Last Access date time, and Modified date time. The first one and last one are obvious but the Last Access date time stamp is just the last time the file was read and not nessaray the last time it was written too. I am not familiar enough with Delphi so I don't know which of the 3 date time stamps TSearchRec.Time returns? I know it is not the Creation date time so it would have to be either the Last Access or Modified date time stamp. Also I do know that not all the Win32 file systems populate the Last Access date time fully (e.g. ... most removable drives like Thumb drives, SD cards, Compact Flash, or any file system that uses FAT 12) in these cases the @File(name,T) returns the modified date time.
Anyway I have an update to GadgetX that will allow you to choose which of the 3 datetime stamps that you need. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Thu Jan 04, 2007 8:16 pm Post subject: |
|
|
Thanks
Well I think I confused everyone to start
First I've allways noticed every since I started using Windows XP that I disliked the Properties simply because about 60% of the time the Modified date would be older than the Creation date.
So so for years I've been wrong and using the Modified date as the REAL Creation date.
After vigorous testing the last few days (in Windows2000pro) I found that the VDS @file,T + @datetime gave the TRUE Creation date everytime, or at least the oldest date of the three which I also been calling the Compiled date.
So I will be testing this on Windows XP and Windows 98se in the next few weeks, since my program will allways use VDS filedate as long as it keeps working as it did in Windows 2000 Professional.
I was real happy to find out VDS was as good or better than DOS DIR and a few downloaded Filedate getters utilitys.
Thanks for helping me on this very much  |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Jan 04, 2007 8:58 pm Post subject: |
|
|
vtol,
My experience with Windows XP is that the @file(name,T) returns the datetime stamp of when the file was last modified. With the exception of a new file this datetime stamp should always be newer than the created date. On new files the created date and Modified date should be the same date.  _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Fri Jan 05, 2007 8:29 am Post subject: |
|
|
I wish my XP worked like that or that good
My problem is the Creation Date is a few years newer than the Modified Date a lot of the time, so that leads me believe something is wrong somewhere.
And I've never intentionally messed with file dates that I'm aware of.
Maybe I eat too many Cayennes and Jalapenos in the summer.
Well maybe in XP I will get the same result you get, that would save my sanity at least.  |
|
| Back to top |
|
 |
Hooligan VDS Developer


Joined: 28 Oct 2003 Posts: 480 Location: California
|
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Fri Jan 05, 2007 2:57 pm Post subject: |
|
|
Hooligan,
This is the exact article that I used to build the @GetFile(DATETIME) function in GadgetX Now that I am updating this function to include the other file datetime stamps it should be complete. _________________ Home of
Give VDS a new purpose!

Last edited by vdsalchemist on Fri Jan 05, 2007 3:06 pm; edited 1 time in total |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Fri Jan 05, 2007 2:59 pm Post subject: |
|
|
| vtol wrote: | I wish my XP worked like that or that good
My problem is the Creation Date is a few years newer than the Modified Date a lot of the time, so that leads me believe something is wrong somewhere.
And I've never intentionally messed with file dates that I'm aware of.
Maybe I eat too many Cayennes and Jalapenos in the summer.
Well maybe in XP I will get the same result you get, that would save my sanity at least.  |
Vtol,
The creation date is the first date time that the file was ever introduced to the operating system. In other words it is the date that the file was first saved to the harddrive. This can account for the creation date being older. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
|