Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to know de time stamp of a file while ffirst return false ?

98 views
Skip to first unread message

j...@igsoft.be

unread,
Jun 5, 2013, 5:43:55 AM6/5/13
to
all is in the title...

It doesn't happend in every environment, but only sometimes...

Ffirst return false while the file really exist.

The problem is that I have to know the timestamp of the file...

How can I do ?


Jean-Luc

Jamal

unread,
Jun 5, 2013, 9:38:05 AM6/5/13
to
http://comp.lang.clipper.visual-objects.free-usenet.eu/ffirst-return-false-while-file-is-there_T66554358_S1

Jamal

wrote in message
news:453d0b3f-1bc1-4b25...@googlegroups.com...

j...@igsoft.be

unread,
Jun 5, 2013, 11:20:42 AM6/5/13
to
Hello Jamal

Thank you for your answer.
I already seen that post.
But I need to know the timestamp of the file ! That's why I use Ffirst() and Fdate()

Jean-Luc

Jamal

unread,
Jun 5, 2013, 2:18:17 PM6/5/13
to
How about FDate() + FTime() ?

Jamal

wrote in message
news:be4e30bb-57dd-42fe...@googlegroups.com...

j...@igsoft.be

unread,
Jun 5, 2013, 6:07:53 PM6/5/13
to
Yes, but to use Fdate() I have to to use Ffirst() first !

fDate():
Return the date stamp of the file found by FFCount(), FFirst(), or FNext().

And FFirst says the file is not there !

Jean-Luc

Karl-Heinz

unread,
Jun 6, 2013, 3:55:15 AM6/6/13
to
Hi Jean-Luc,

> fDate():
> Return the date stamp of the file found by FFCount(), FFirst(), or
> FNext().
>
> And FFirst says the file is not there !
>

Not sure what you finally need: Timestamp or Datestamp ? Anyway, the Func
below uses the WIN-API directly and gives you both ;-)

BTW. GetFDate() and GetFTime() are VO buildin functions.

Regards
Karl-Heinz

--------------------------------------------------------

FUNCTION GetFileDateTime ( cFileName AS STRING , dDate REF DATE , cTime REF
STRING ) AS LOGIC PASCAL
LOCAL struFindData IS _winWIN32_FIND_DATA
LOCAL hFile AS PTR
LOCAL lOK AS LOGIC

IF ( hFile := FindFirstFile( String2Psz ( cFileName ) , @struFindData) )
!= INVALID_HANDLE_VALUE

lOK := TRUE

dDate := GetFDate( @struFindData.ftLastWriteTime )


cTime := GetFTime( @struFindData.ftLastWriteTime )


FindClose ( hFile )

ENDIF


RETURN lOK

dlzc

unread,
Jun 6, 2013, 10:20:39 AM6/6/13
to
Dear j...:

On Wednesday, June 5, 2013 2:43:55 AM UTC-7, j...@igsoft.be wrote:
...
> It doesn't happend in every environment, but only
> sometimes...
> Ffirst return false while the file really exist.

When it fails to work, is there, or is there not, a hidden file in that directory called "desktop.ini"?

David A. Smith

j...@igsoft.be

unread,
Jun 7, 2013, 4:28:10 AM6/7/13
to
David,
I will look is there is a hidden file called "desktop.ini"

Karl-Heinz,
Thank you, yes I need to fetch the date and the time of the file to know if it's newer...
I will try your function..

Jean-Luc

dlzc

unread,
Jun 7, 2013, 9:59:08 AM6/7/13
to
Dear j...:

On Friday, June 7, 2013 1:28:10 AM UTC-7, j...@igsoft.be wrote:
> I will look is there is a hidden file called
> "desktop.ini"

If you look using Windows, there will be as soon as you look. You might create a new directory, add a file, then use your ffirst function to see if it smokes.

Then open the directory, drop in a couple of pictures, double click on the pictures (at this point I think Explorer makes this file). Then try your program to see if it smokes.

Not so much that this will do anything more than point the folks that might make VO 2.9, to a fix... and that if you report your results.

David A. Smith

Dirk (Belgium)

unread,
Jun 10, 2013, 3:47:14 AM6/10/13
to
Jean Luc,

Why not using the function Directory(...)
This returns an array with all information about that specific file...
It can also 'see' hidden and system files...

Dirk, Belgium

=================================
--

0 new messages