<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Rich</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>I don't think that DOS alone will do what
you need.</FONT></DIV>
<DIV><FONT face="Courier New" size=2>The following should work within an Access
Module to</FONT></DIV>
<DIV><FONT face="Courier New" size=2>do what you're looking for.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Dave</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New"
size=2>==================================</FONT></DIV>
<DIV><FONT face="Courier New" size=2>Option Compare Database</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Function DelByDate()<BR>Dim TheFileDate As
Date<BR>Dim theFile As String<BR>Dim HowOld As Integer</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>ChDrive
("C:")
'set to meet your needs<BR>ChDir
"C:\Temp"
'set to meet your needs</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>theFile = Dir("*.*")</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Do While theFile <> ""<BR>TheFileDate
= FileDateTime(theFile)<BR>HowOld = DateDiff("d", TheFileDate,
Date)</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>If HowOld > 5 Then<BR>Debug.Print
theFile, HowOld, TheFileDate<BR>'Kill (theFile)<BR>End If</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>theFile = Dir()<BR>Loop</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>End Function<BR></FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=Rich_Lavsa@pghcorning.com
href="mailto:Rich_Lavsa@pghcorning.com">Lavsa, Rich</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=accessd@databaseadvisors.com
href="mailto:'accessd@databaseadvisors.com'">'accessd@databaseadvisors.com'</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, March 18, 2003 2:13
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [AccessD] OT: DOS COMMAND</DIV>
<DIV><BR></DIV>Hello all,<BR><BR>I know this has nothing to do with Access
however I am trying to spark my<BR>brain back to the early 90's. I am
trying to write a DEL statement that<BR>will go and delete files in a certain
directory that are older then 5 days.<BR><BR>I can't remember if there were
switches and/or [attributes] that you could<BR>use in a single command line or
if you had to write a Batch file to do this.<BR><BR><BR>Again I apologize for
this OT, but I'm positive some of you know
this<BR>stuff!!<BR><BR>Rich<BR>_______________________________________________<BR>AccessD
mailing list<BR><A
href="mailto:AccessD@databaseadvisors.com">AccessD@databaseadvisors.com</A><BR><A
href="http://databaseadvisors.com/mailman/listinfo/accessd">http://databaseadvisors.com/mailman/listinfo/accessd</A><BR>Website:
<A
href="http://www.databaseadvisors.com">http://www.databaseadvisors.com</A><BR></BLOCKQUOTE></BODY></HTML>