newcoder54
Technical User
I have a function that works fine to kill files over 2 days old but wish I could kill files that have file names ending with, for example, a sequence number.
For example I want the function to kill files like this
C:\My Documents\Johnson datafile-544.doc
but not to kill C:\My Documents\Johnson Datafile.doc
Any ideas,
Here is what works and needs your great ideas!
Thanks, Larry
Function KillOldFiles()
Dim MyStamp As Date
MyStamp = FileDateTime("c:\My Documents\Johnson data file number-544.doc")
If MyStamp < (Now() - 2) Then
Kill "c:\My Documents\Johnson data file number* doc"
'
End If
End Function
For example I want the function to kill files like this
C:\My Documents\Johnson datafile-544.doc
but not to kill C:\My Documents\Johnson Datafile.doc
Any ideas,
Here is what works and needs your great ideas!
Thanks, Larry
Function KillOldFiles()
Dim MyStamp As Date
MyStamp = FileDateTime("c:\My Documents\Johnson data file number-544.doc")
If MyStamp < (Now() - 2) Then
Kill "c:\My Documents\Johnson data file number* doc"
'
End If
End Function