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 Previous  1, 2
 
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: Mon Jan 08, 2007 5:18 pm    Post subject: Reply with quote

Yeah I know.
Like I kept trying to saying before, its not older, its newer Laughing
its crazy...
Anyways, sound like your timestamps in Gadget willbe real nice.
Thanks
Back to top
View user's profile Send private message Visit poster's website
Dave Heck
Valued Newbie


Joined: 02 Mar 2002
Posts: 34
Location: Union, CT USA

PostPosted: Sun Dec 07, 2008 5:06 pm    Post subject: Strange issue/possible bug in VDS 6 @File function? Reply with quote

I apologize for this being a little long-winded, but I've been stumped by this for a couple hours and doing some testing over the last hour or so to make sure of what I'm seeing. I thoght I'd try to save someone else the wasted time.

I believe I have uncovered some of the answers to the date issue/questions posed here although I don’t know if this behavior is by design or possibly considered a bug. I'm working on a routine that will load the contents of a folder into a list, then loop through the list getting the date with the @File function. I need to act upon the files based on the modified date.

The @File function returns different results depending on whether you put quotes around the filename or not. I came across this because some of the files I’m working on are cookies and they have the "@" sign in them. I wanted to be sure the IDE didn't try to interpret the filename as a Function.

Below is the setup, test scripts and results of what I am getting. I have used a file utility to modify the file dates to ensure all 3 dates are different making it possible to determine what date is returned.

SETUP:
Folder C:\Test
File in folder: test.txt
File Create date: Sunday, January 01, 2006, 12:00:00 AM
File Modified date: Monday, January 01, 2007, 12:00:00 AM
File Accessed date: Today, December 07, 2008, 10:51:05 AM

Test Script 1: display “raw” file date value
%%Date_withoutquotes = @FILE(C:\Test\Test.txt,T)
%%Date_withquotes = @FILE(@chr(34)C:\Test\Test.txt@chr(34),T)
INFO "Date without quotes: "%%Date_withoutquotes@CR()"Date with quotes: "%%Date_withquotes
EXIT

Test Script 1 Results:
%%Date_withoutquotes: 39083 (Modified Date value)
%%Date_withquotes returns: NULL


Test Script 2: Use @DateTime to convert the results
%%Date_withoutquotes = @DATETIME(MM/DD/YYYY,@FILE(C:\Test\Test.txt,T))
%%Date_withquotes = @DATETIME(MM/DD/YYYY,@FILE(@chr(34)C:\Test\Test.txt@chr(34),T))
INFO "Date without quotes: "%%Date_withoutquotes@CR()"Date with quotes: "%%Date_withquotes
EXIT

Test Script 2 Results:
%%Date_withoutquotes returns: 01/01/2007 (Modified Date)
%%Date_withquotes returns: 12/07/2008 (Accessed Date)

_________________
Dave Heck
dheck1961@cox.net
Union, Connecticut USA
Back to top
View user's profile Send private message Send e-mail
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Mon Dec 08, 2008 7:50 pm    Post subject: Reply with quote

Quote:

Test Script 2 Results:
%%Date_withoutquotes returns: 01/01/2007 (Modified Date)
%%Date_withquotes returns: 12/07/2008 (Accessed Date)

%%Date_withquotes is returning today's date, not the Accessed date.
That would be because your first test results show you are sending nothing(NULL) to the @file function.

Not that this helps anything you guys are trying to figure out really, but probably good to know.

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page Previous  1, 2
Page 2 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