Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delete files
Message
From
31/12/2012 11:44:11
 
 
To
31/12/2012 11:40:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01560963
Message ID:
01560966
Views:
47
Sir, I Prepared 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
See attached image

Now the question is how to delete files old than 24 hours?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform