Hi guys,
I was just wondering what the best way to go about this was. I am using .net cf 2.0 and i need to delete any photos that were created over 2 weeks ago.

The code i am using at the moment is:

VB Code:
  1. Dim allPhotos() As String = IO.Directory.GetFiles(SYS_PHOTO_DIRECTORY)
  2.         Dim dt As DateTime
  3.         Dim fourteenDays as Integer = 14 'This is actually declared as a global variable as it will be used for other areas of my program.
  4.         For i As Integer = 0 To allPhotos.GetUpperBound(0) Step 1
  5.             dt = File.GetCreationTime(allPhotos(i)).ToLongDateString
  6.             If dt < Date.Now.AddDays(-(fourteenDays)) Then
  7.                 File.Delete(allPhotos(i))
  8.             End If
  9.         Next

and i was just wondering two things:
1) will this delete photos 13 days old or 14 days old

2)is this the best way to do this?