Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: David Mustakim
  Where is David Mustakim?
 Jakarta
 Indonesia
 David Mustakim
 To: Tariq Mehmood
  Where is Tariq Mehmood?
 BAHAWALPUR
 Pakistan
 Tariq Mehmood
 Tags
Subject: RE: File Time
Thread ID: 365809 Message ID: 365824 # Views: 46 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Monday, December 31, 2012 5:47:54 PM         
   


scan the table and issue a "delete file" or "erase" command against the file that the table record shows datetime("of date+time fields converted") being older than value of "datetime()-(24*3600)". I'm sure you can code it yourself. At new year eve I'm always too lazy to do coding, ... am looking at half empty JD while typing here.

David
..
.



> > ADir()
> >
> > David
> > ..
> >
>
>
> Sir, I Prepare these codes
>
>
>
> create cursor ctableinfo (sno n(3),cname c(20), ddate d, ctime c(11))
> 
> mydatadir=(sys(5)+alltrim(sys(2003))+'\TABLES')
> 
> set exclusive on
> local afiles, ncount, i
> dimension afiles(1,1)
> ncount = adir(afiles,mydatadir+"\"+"*.*")
> =asort(afiles,1)
> i=1
> for i = 1 to ncount
> 	select 0
> 	use mydatadir+"\"+(afiles(i,1)) again
> 	fc=fcount()
> 	a=mydatadir+"\"+(afiles(i,1))
> 	fname=justfname(a)
> 	lupd1=fdate(a)
> 	ltime1=ftime(a)
> 
> 	insert into ctableinfo (cname,ddate,ctime);
> 		values (fname,lupd1,ltime1)
> 
> endfor
> set exclusive off
> 
> select ctableinfo
> brow
> 

> and data is as
>
>
> Now the question is how to delete files old than 24 hours?
>
>
> _______________________________
> Impossible is not a fact. Its an opinion.

ENTIRE THREAD

File Time Posted by Tariq Mehmood @ 12/31/2012 3:43:31 PM
RE: File Time Posted by David Mustakim @ 12/31/2012 4:32:44 PM
RE: File Time Posted by Tariq Mehmood @ 12/31/2012 4:52:02 PM
RE: File Time Posted by David Mustakim @ 12/31/2012 5:47:54 PM