A
azu_daioh
I'm trying to write code that will kill any other old files in the
same folder. Here's what i have so far:
Dim xPath As String
Dim xExt As String
Dim xFile As String
Dim xDate As Date
Dim xOldFileName As String
xPath = "\\Location\folder\myCompactDB"
xDate = Format(Date - 1, "mmddyyyy")
xFile = "*"
xExt = ".mdb"
xOldFileName = xPath & xDate & xFile & xExt
If xDate < Format(Date, "mmddyyyy") Then
Kill xOldFileName
End If
same folder. Here's what i have so far:
Dim xPath As String
Dim xExt As String
Dim xFile As String
Dim xDate As Date
Dim xOldFileName As String
xPath = "\\Location\folder\myCompactDB"
xDate = Format(Date - 1, "mmddyyyy")
xFile = "*"
xExt = ".mdb"
xOldFileName = xPath & xDate & xFile & xExt
If xDate < Format(Date, "mmddyyyy") Then
Kill xOldFileName
End If