Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Simon Arnold
  Where is Simon Arnold?
 Halifax
 United Kingdom
 Simon Arnold
 To: maxime martel
  
 quebec
 
 maxime martel
 Tags
Subject: RE: How can i get the TIME CREATION of a file ?
Thread ID: 33738 Message ID: 33794 # Views: 1 # Ratings: 0
Version: Visual FoxPro 7 Category: General VFP Topics
Date: Wednesday, December 03, 2003 6:38:39 PM         
   


> The only things ldtCreate return is " " if i make like this (nFileHandle is set to 42):
>
> DECLARE SHORT GetFileTime IN WIN32API INTEGER hFile, STRING @lpftCreation,STRING @lpftLastAccess, STRING @lpftLastWrite
> STORE REPLICATE(CHR(0), 8) TO ldtCreate, ldtAccess, ldtModified
>
> nFileHandle = FOPEN("c:\sonydvapp\analyse.avi")
> lnTest = GetFileTime(nFileHandle, @ldtCreate, @ldtAccess, @ldtModified)
> ? ldtCreate
>
> FCLOSE(nFileHandle)
>
>
> > Add before lnTest = GetFileTime(...:
> >
> > STORE REPLICATE(CHR(0), 8) TO ldtCreate, ldtAccess, ldtModified
> >
> > >
> > > I thanks for your help i really appreciate. But when i try this :
> > >
> > > *nFileHandle use this as the file handle use fopen()
> > > DECLARE SHORT GetFileTime IN WIN32API INTEGER hFile, STRING @lpftCreation,STRING @lpftLastAccess, STRING @lpftLastWrite
> > >
> > > nFileHandle = FOPEN("c:\sonydvapp\analyse.avi")
> > >
> > > lnTest = GetFileTime(nFileHandle, @ldtCreate, @ldtAccess, @ldtModified)
> > >
> > > FCLOSE(nFileHandle)
> > >
> > > I've got an error message : ldtCreate is not found.
> > >
> > > Max...
>
>
> Max...

I pefer using the Scripting Object for these things:
LOCAL oFS AS Object

oFS = CreateObject("Scripting.FileSystemObject")
oF = oFile.GetFile("d:\Ghost.exe")
MessageBox( oF.DateCreated )		&& Returns Date and Time of Creation, use TTOC to split these.



Simon Arnold.


ENTIRE THREAD

How can i get the TIME CREATION of a file ? Posted by maxime martel @ 12/2/2003 5:49:34 PM
RE: How can i get the TIME CREATION of a file ? Posted by Toby Mosby @ 12/2/2003 7:31:39 PM
RE: How can i get the TIME CREATION of a file ? Posted by maxime martel @ 12/3/2003 3:38:53 PM
RE: How can i get the TIME CREATION of a file ? Posted by Yuri Rubinov @ 12/3/2003 5:12:47 PM
RE: How can i get the TIME CREATION of a file ? Posted by maxime martel @ 12/3/2003 5:21:43 PM
RE: How can i get the TIME CREATION of a file ? Posted by Simon Arnold @ 12/3/2003 6:38:39 PM
Thanks it still work! Posted by maxime martel @ 12/3/2003 7:42:47 PM