forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


binary value returned by the @FILE T pseudo-attribute
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Sat Dec 30, 2006 6:43 am    Post subject: binary value returned by the @FILE T pseudo-attribute Reply with quote

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 Cool
Back to top
View user's profile Send private message Visit poster's website
DaveR
Valued Contributor
Valued Contributor


Joined: 03 Sep 2005
Posts: 413
Location: Australia

PostPosted: Sat Dec 30, 2006 7:53 am    Post subject: Reply with quote

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
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Sat Dec 30, 2006 7:24 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Sun Dec 31, 2006 3:03 am    Post subject: Reply with quote

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? Rolling Eyes

Can I try Gadget as demo? (I'm broke as usual right now).

Thanks
Back to top
View user's profile Send private message Visit poster's website
DaveR
Valued Contributor
Valued Contributor


Joined: 03 Sep 2005
Posts: 413
Location: Australia

PostPosted: Sun Dec 31, 2006 6:09 am    Post subject: Reply with quote

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
View user's profile Send private message
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Sun Dec 31, 2006 9:32 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Sun Dec 31, 2006 11:52 pm    Post subject: Reply with quote

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? Rolling Eyes

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Thu Jan 04, 2007 2:46 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Thu Jan 04, 2007 5:26 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Thu Jan 04, 2007 8:16 pm    Post subject: Reply with quote

Thanks
Well I think I confused everyone to start Smile

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 Cool
Back to top
View user's profile Send private message Visit poster's website
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Thu Jan 04, 2007 8:58 pm    Post subject: Reply with quote

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. Question Question

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Fri Jan 05, 2007 8:29 am    Post subject: Reply with quote

I wish my XP worked like that or that good Laughing

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. Cool
Back to top
View user's profile Send private message Visit poster's website
Hooligan
VDS Developer
VDS Developer


Joined: 28 Oct 2003
Posts: 480
Location: California

PostPosted: Fri Jan 05, 2007 1:38 pm    Post subject: Reply with quote

Here's an interesting artical that ought to throw a wrench in your works...

http://msdn2.microsoft.com/en-us/library/ms724290.aspx

Hooligan

_________________
Hooligan

Why be normal?
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Fri Jan 05, 2007 2:57 pm    Post subject: Reply with quote

Hooligan wrote:
Here's an interesting artical that ought to throw a wrench in your works...

http://msdn2.microsoft.com/en-us/library/ms724290.aspx

Hooligan


Hooligan,
This is the exact article that I used to build the @GetFile(DATETIME) function in GadgetX Wink 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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Fri Jan 05, 2007 2:59 pm    Post subject: Reply with quote

vtol wrote:
I wish my XP worked like that or that good Laughing

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. Cool


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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group