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


> 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